When I call Opensees by Matlab through the command:
!opensees filename.txt
In the command window of Matlab, an error is reported as:
'opensees' is not recognized as an internal or external command operable program or batch file
Meanwhile, the current directory of Matlab is truly adjusted. Noteworthy, Opensees can directly execute the corresponding text file without any problem.
Would you please guide me where the problem is?
Note that Version of Opensees in 2.3.1 and version of Matlab is 7.
In the command window of Matlab, an error is reported as:
'opensees' is not recognized as an internal or external command operable program or batch file
dear all,
I would like to call OpenSees by Matlab, but my name file is a variable in the Matlab script and I cannot figure out how I could solve the problem...
!OpenSees.exe namefile.tcl does not work in my case because namefile changes at each iteration of my Matlab script.
pinnark wrote:
> dear all,
> I would like to call OpenSees by Matlab, but my name file is a variable in
> the Matlab script and I cannot figure out how I could solve the problem...
>
> !OpenSees.exe namefile.tcl does not work in my case because namefile
> changes at each iteration of my Matlab script.
>
> Waiting for a piece of advice
>
> thanks a lot:-)
try this:
s1=strcat('opensees ','namefile','.tcl');
system (s1);
it may work.
Research Assistant Professor, The Hong Kong Polytechnic University guanlin@polyu.edu.hk
either you need to create a new script with the variables inside or pass the variables as inputs to the program through the argv variables when starting opensees from matlab
I found the easiest way for me was to create a text file from Matlab and then call OpenSees.exe from Matlab using !OpenSees.exe and source the text file generated by Matlab from my main tcl script. This can be included into a for loop in Matlab to run multiple analysis.