Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in simMegaPressShaped rf_resample: Undefined function ‘resample’ for input arguments of type ‘double’ #16

Open
samuelholly opened this issue Oct 24, 2018 · 3 comments

Comments

@samuelholly
Copy link

Dear FID-A community,

I would like to ask for your kind support.

I tried to run run_simMegaPressShaped. However I get the following error right at the beginning:

Siemens format .pta RF pulse file detected!! Loading waveform now.
Siemens format .pta RF pulse file detected!! Loading waveform now.
Undefined function ‘resample’ for input arguments of type ‘double’.

Error in rf_resample (line 39)
newWaveform(:,1)=resample(RF_out.waveform(:,1),P,Q);

Error in run_simMegaPressShaped (line 109)
refRF=rf_resample(refRF,100);

I’m not sure what could cause the issue.

I will be grateful for any suggestions.

Best regards

@jamienear
Copy link
Contributor

Dear samuelholly,

I think it is quite possible that this issue is due to the fact that the 'resample' function is a member of the MATLAB signal processing toolbox (this is the case at least for MATLAB version 2018, but I'm not sure if this is the same for previous MATLAB versions). Do you have the signal processing toolbox installed with your MATLAB installation? If not, then this would probably explain the error message that you are getting, and you could fix the error by installing the signal processing toolbox. If you do not have access to the signal processing toolbox, then you can simply comment out line 109 of 'run_simMegaPressShaped.m'. This line is designed to speed things up by reducing the number of points in the RF waveform, but the code will still work fine (but a bit slower) without it.

Hint, if you're looking to speed things up further, consider using 'run_simMegaPressShaped_fast.m'. This one produces the same result (minus the spatially resolved output), but in a fraction of the time.

Hope this helps!

Jamie

@samuelholly
Copy link
Author

Dear Jamie,

many thanks!

Best regards

Samuel

@samuelholly
Copy link
Author

Exactly that's the problem, we don't have the Signal processing toolbox.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants