Calling Opensees by Matlab
Moderators: silvia, selimgunay, Moderators
-
- Posts: 1
- Joined: Tue Jul 17, 2012 3:22 am
Calling Opensees by Matlab
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.
!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.
Re: Calling Opensees by Matlab
OpenSees is not obviously set up on your default path .. either set you path env variable or type the full path to OpenSees
!"C:\Users\PEER Center\bin\OpenSees" Example.tcl
!"C:\Users\PEER Center\bin\OpenSees" Example.tcl
Re: Calling Opensees by Matlab
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
I met this situation before.
'opensees' is not recognized as an internal or external command operable program or batch file
I met this situation before.
-
- Posts: 140
- Joined: Sun Oct 03, 2010 11:36 pm
- Location: Hong Kong
Re: Calling Opensees by Matlab
you should throw OpenSees.exe into your tcl file folder
Research Assistant Professor, The Hong Kong Polytechnic University
guanlin@polyu.edu.hk
guanlin@polyu.edu.hk
-
- Posts: 140
- Joined: Sun Oct 03, 2010 11:36 pm
- Location: Hong Kong
Re: Calling Opensees by Matlab
throw OpenSees.exe into your .tcl file folder
then type
system ('opensees *.tcl');
then type
system ('opensees *.tcl');
Research Assistant Professor, The Hong Kong Polytechnic University
guanlin@polyu.edu.hk
guanlin@polyu.edu.hk
Re: Calling Opensees by Matlab
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:-)
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:-)
-
- Posts: 140
- Joined: Sun Oct 03, 2010 11:36 pm
- Location: Hong Kong
Re: Calling Opensees by Matlab
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.
> 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
guanlin@polyu.edu.hk
Re: Calling Opensees by Matlab
hi, you can use this
for k=1:20
mySACfile = sprintf('Opensees SAC%d.tcl\n', k);
s1=strcat(mySACfile);
system (s1);
end
it may help you
for k=1:20
mySACfile = sprintf('Opensees SAC%d.tcl\n', k);
s1=strcat(mySACfile);
system (s1);
end
it may help you
-
- Posts: 3
- Joined: Wed Mar 19, 2014 12:39 am
- Location: IIT Roorkee
Re: Calling Opensees by Matlab
Hello everyone,
I need some help to run OpenSees programs using Matlab if I want to vary some variables(OpenSees program) in every run.
Thank you.
I need some help to run OpenSees programs using Matlab if I want to vary some variables(OpenSees program) in every run.
Thank you.
Re: Calling Opensees by Matlab
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
-
- Posts: 5
- Joined: Tue May 31, 2016 10:39 pm
- Location: Tehran
Re: Calling Opensees by Matlab
use !opensees.exe
Re: Calling Opensees by 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.