MATLAB: How to successfully run bubble analysis code

bubble analysis

Im doing a project that involves analysing bubbles under the application of ultrasound. This code I was given is used to simulate the bubble oscillation. Once the startup file has been run where values can be chosen, an error occurs in the'BubbleSimCallBack' function which I cant solve. The error message is:
'Error in BS_BubblesimCallback>DisplayPulse (line 42) [particle,pulse,simulation,graph]= …
Error in BS_BubblesimCallback (line 22) [particle, pulse, linear, simulation, graph] = DisplayPulse;
Error while evaluating uicontrol Callback'
Im pretty new to Matlab but I think the error is most likely something small. If anyone was able to run the code successfully and explain what is wrong that would be great!
There are quite a few files needed, this is the link to the download: http://home.online.no/~fam.hoff/Bubblesim

Best Answer

Alexander - when I run the software, the full error message is
Cannot find an exact (case-sensitive) match for 'BS_GUIParameters'
The closest match is: BS_GUIparameters in
/Users/geoff/Development/bitbucket_repos/matlab/testing2/Bubblesim/BS_GUIparameters.m
Error in BS_BubblesimCallback>DisplayPulse (line 53)
[particle,pulse,simulation,graph]= ...
Error in BS_BubblesimCallback (line 22)
[particle, pulse, linear, simulation, graph] = DisplayPulse;
Error while evaluating uicontrol Callback
I changed line 53 to
[particle,pulse,simulation,graph]= ...
BS_GUIparameters(particle,pulse,simulation,graph,'write');
so that the correctly spelt function name is used.
Re-running the startup and pressing the Display Pulse button on the GUI then leads to the following error
Undefined function 'WriteMessage' for input arguments of type 'char'.
Error in BS_ConstantSampleRate (line 24)
WriteMessage('Warning: No anti-alias filter. Signal Processing TB not found.', ...
Error in BS_PlotSpectrum (line 28)
[ti,hi,fs]= BS_ConstantSampleRate(t, h, fs );
Error in BS_PlotInitialPulses (line 27)
BS_PlotSpectrum(graph.spectra, pulse(1).t, 1e-6*pulse(1).p, graph.fmax, pulse(1).fs, 'pulse',
graph.symbol.incoming );
Error in BS_BubblesimCallback>DisplayPulse (line 60)
BS_PlotInitialPulses ( particle, pulse, linear, graph );
Error in BS_BubblesimCallback (line 20)
[particle, pulse, linear, simulation, graph] = DisplayPulse;
Error while evaluating uicontrol Callback
The WriteMessage function should probably be replaced with BS_WriteMessage as that seems to serve the same purpose (and is included in the package). Once you have made that change to the 4-5 files that require this update you can try re-running the app again.
Note that this package seems to be dependent upon the Signal Processing Toolbox so hopefully you have a license for it and will be able to proceed.
Related Question