InverseTampere / TreeQSM

Quantitative Structure Models of Single Trees from Laser Scanner Data
Other
140 stars 45 forks source link

TreeQSM not creating QSM models in results... #21

Open Robin-hartley opened 9 months ago

Robin-hartley commented 9 months ago

Hi there,

I am getting the following error when I try and run individual tree point clouds in TreeQSM:

Error using save Cannot create 'QSM_tree_t1_m1.mat' because 'results' does not exist.

Error in treeqsm (line 469) save(['results/QSM_',str],'QSM')

The code runs, it produces all of the figures for number of branches, branch order, volumes etc, however, it does not produce the QSM models. This same script was working fine up until about 2 months ago and then I tried running it one day and this error occurred. The 'results' folder is there but for whatever reason it is not being recognised. I am not very competent with MATLAB so any assistance in fixing this issue would be much appreciated as I am looking to do a lot of analysis with TreeQSM in the coming months.

Thanks in advance,

RJLH

zoeschindler commented 9 months ago

Hello :) Not my repository, but maybe I can help anyway. So if you have a results folder, it should usually work. Is the folder placed directly in you current working directory? You can get the current working directory with the command pwd. Another guess could be that your name has the wrong data type. In MATLAB, there are characters and strings. Some parts of MATLAB and also TreeQSM require characters, some require strings. I got it through trial and error, because I also don't usually use MATLAB for anything except TreeQSM.

Robin-hartley commented 9 months ago

Yep, that did it! thanks Zoe - I was running the code from another directory, so I just added a folder called "results" to the working directory and it is now writing the results.

Thanks heaps!