Trying to run one of the examples in Octave. Added the k-wave folder to my path using addpath(genpath('D:/Code/K-Wave')), so I am not sure where the functions are failing.
k-Wave
A MATLAB toolbox for the time-domain
simulation of acoustic wave fields
error: invalid conversion from lazy_index to uint16
(13 posts) (7 voices)-
Posted 7 years ago #
-
Hi kcox,
I haven't tried k-Wave with Octave for some time. If you use
addpath('D:/Code/K-Wave')
and run the example, could you post the whole error stack? What OS, Octave, and k-Wave version are you using?Brad.
Posted 7 years ago # -
Hey Brad,
I switched over to MATLAB and this problem stopped occurring. However, now I am having a bunch of problems with kspaceFirstOrder3D(). It appears that there was a change in dependency for some functions, or just a lack of some functions defined. I went into the function and tried to hard-code some missing things, but the further I get, the more errors that occur. The primary error is
'Undefined function or variable 'use_sg'.' There is also an error occurring with use_kspace, plot_layout, and plot_sim. I am using MATLAB R2015b with the most recent K-wave on Windows 10.Posted 7 years ago # -
Hi kcox,
Something definitely isn't correct, as k-Wave should work straight out the box. Can you remove your current modified version from the path, and then download and add a clean version of k-Wave to the path (using
addpath
withoutgenpath
). Then try to run one of the included examples, and post the whole error stack.Brad.
Posted 7 years ago # -
Brad,
Don't know how my original download got so corrupted, but re-downloading seems to have done the trick! Sorry about that, and thank you for your help!
Kailee
Posted 7 years ago # -
Hi Brad,
ran into the same problem. I would be interested to get it running in Octave.
Here is the error message.Running k-Wave elastic simulation...
start time: 11-Dec-2017 12:32:07
reference sound speed: 2000m/s
error: invalid conversion from lazy_index to uint16I'm running Octave 4.2.1, k-wave 1.2 on Linux Mint 17.3.
Best regards,
Tobias
Posted 6 years ago # -
Have the same trouble as above. Any solutions....
Thank you in advance,
TomaszPosted 6 years ago # -
Is there a more detailed error stack, for example, the particular function or line of code that crashes?
Posted 6 years ago # -
Same problem (in Octave). Any solution to "invalid conversion from lazy_index to uint16"?
cheersPosted 5 years ago # -
I saw this error; new to octave and don't know why this is the answer, but for example
kspaceFirstOrder_inputChecking.m
1526 eval(['sensor_mask_index = ' index_data_type '(sensor_mask_index);']);can be edited to
kspaceFirstOrder_inputChecking.m
1526 eval(['sensor_mask_index = ' index_data_type '(sensor_mask_index(:));']);and it seems to avoid this error
Posted 5 years ago # -
Thanks everyone for flagging this bug and a work around. We will try and spend some time with Octave in the coming releases to see if compatibility can be improved.
Brad.
Posted 5 years ago # -
Had the same issue. Not sure why the eval function is not working with converting the matrix from double to uint. In fact, if I put a break point there and run that exact command in the debug interpreter it runs without error, without the need to place the (:) (in order to convert the already a column matrix to a column matrix.)
Just a heads up, this occurs multiple times in kspaceFirstOrder_inputChecking.m and all instances need to be fixed including:
Line
852
854
952
954
1087
1089
1138
1526Posted 5 years ago # -
Also need to update kspaceFirstOrder_expandGridMatrices.m at lines:
169
208
222Posted 5 years ago #
Reply
You must log in to post.