help required in installing ultrasim
2 views (last 30 days)
Show older comments
lurkingleo
on 14 Apr 2016
Commented: Walter Roberson
on 3 Oct 2018
can anybody explain the procedure of installing ultrasim. i have downloaded the zip file and unzipped it in matlab toolbox library and followed the steps according to this link
made a startup.m file and edited usiminit.m and userusim.m files to point the location and made directories for ultrasim
Still it gave me 3 errors which were
Undefined function 'usimcnf' for input arguments of type 'char'.
Error in usimstrt (line 67)
config=usimcnf('initialize',flagg,option);
Error in ultrasim (line 20)
usimstrt;
Error in usim (line 16)
ultrasim
also i have installed matlab in 'D' drive.. but when i have installed it in 'C' drive it was giving some different errors.
i have to use this software for FYP.. and not much help is available on the internet.. Kindly help me out with this issue.
0 Comments
Accepted Answer
Walter Roberson
on 14 Apr 2016
Step 1: Download the source code for ultrasim7 from http://folk.uio.no/ultrasim/download.shtml . Unzip it into a convenient directory that is not under the MATLAB installation directory. Ignore the installation instructions that say that you must put it under the MATLAB installation directory. Use pathtool to add the directory you unzipped into.
Step 2: Use your favorite method to construct a new directory (such as under your Files and Documents) that will be used to store ultrasim related files. In that new directory, make also a directory named "cnf" and another directory named "results"
Step 3: Go into the directory that you unzipped ultrasim into in Step 1, and create finite.m with content
function isfin = finite(X)
isfin = isfinite(X);
And create gcm.m with content
function h = gcm(varargin)
h = gcmus(varargin{:});
Warning: you are going to have problems if you have the Mapping Toolbox! If you have the Mapping Toolbox, then when you are using ultrasim, you should use pathtool to move the ultrasim7 directory to the top of the list, but when you are not using ultrasim then you should move the ultrasim7 directory to the bottom of the path list. (This is not necessary if you are not using the Mapping Toolbox.)
Step 4: Edit the userusim.m file in that same directory; on line 29, comment out the line
USER_ULTRASIMHOME='C:\Documents and Settings\sverre\My Documents\Matlab\ultrasim';
and after that add a assignment to USER_ULTRASIMHOME that is the name of the directory you created in Step 2, the one to store your ultrasim related files. Save the change to userusim.m
Step 5: Edit the usiminit.m file in that same directory; on line 74, comment out the line
ULTRASIMHOME='c:\Program Files\MATLAB\R2006b\toolbox\ultrasimweb\ultrasim';
and after that add an assignment to ULTRASIMHOME that is the name of the directory you unzipped ultrasim7 into in Step 1 (the same directory that the usiminit.m file is in).
Step 6: Now go into the plot subdirectory of where you unzipped ultrasim7, and edit the file gcmus.m . On line 16, comment out the line that says
h = get(get(0,'CurrentFigure'),'CurrentMenu');
and after that add the line
h = gcbo();
-----
Ultrasim7 is now ready for use. You can start it by commanding usim or ultrasim
-----
I do not promise I found all of the problems; I tried a couple of things and fixed what I noticed. I do not know how the program is intended to work, so I did not test much.
4 Comments
Nabeela Madiwale
on 11 Jul 2018
Edited: Walter Roberson
on 12 Jul 2018
Error in usimstrt (line 67)
config=usimcnf('initialize',flagg,option);
Error in ultrasim (line 20)
usimstrt;
I tried doing the above changes but I still have the above errors, how can I resolve these..?
More Answers (1)
izdc90
on 2 Oct 2018
I'm trying to see the 2D response of examples (.cnf) using Ultrasim toolbox, and it gives me the following error:
*Error using datetime/horzcat (line 1210) Could not automatically convert the string 'ARRAY-RESPONSE' to a datetime value because its format was not recognized.
Error in petxt (line 242) Ttxt1 = ['ARRAY-RESPONSE',' ',fig_txt,' ',datetime];
Error in peplot (line 159) petxt(excitation,media,transducer,option,flagg,z,t, ...
Error using eusim (line 60) Error while evaluating Menu Callback*
What could be the cause?
Regards
2 Comments
Sverre Holm
on 3 Oct 2018
Edited: Sverre Holm
on 3 Oct 2018
The problem seems to be 'datetime' which is a function call in Ultrasim. However, "Starting in R2014b, datetime, duration, and calendarDuration are data types dedicated to storing date and time data, and are easily distinguishable from numeric values." This is according to https://blogs.mathworks.com/loren/2015/02/12/introduction-to-the-new-matlab-data-types-for-dates-and-time/
Therefore there is a clash between data types.
In order to fix it, the datetime routine in Ultrasim needs to be renamed, and the relatively few calls to it also.
Walter Roberson
on 3 Oct 2018
Thanks, Sverre Holm,
I notice that the download link I had posted above no longer functions, and I cannot see a working download link at https://www.mn.uio.no/ifi/english/research/groups/dsb/resources/software/ultrasim/download/ . Would there be a newer link available?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!