Matlab and OpenSees using NeesHub

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
andrett7
Posts: 118
Joined: Fri Dec 04, 2009 5:23 am
Location: Politecnico di Milano

Matlab and OpenSees using NeesHub

Post by andrett7 »

Dear all,

is there the possibility to run a matlab file that calls a tcl file using the OpenSees Lab tool in NEES hub?

Thanks for the interest,
Andrea
Scientists study the world as it is; engineers create the world that never has been.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Matlab and OpenSees using NeesHub

Post by fmk »

no as they had too many people using it and only a few licences. though you could ask. if stuck, try using octave (a free matlab like program that uses exact same syntax so basic .m files work w.o need for any modifications) instead.
andrett7
Posts: 118
Joined: Fri Dec 04, 2009 5:23 am
Location: Politecnico di Milano

Re: Matlab and OpenSees using NeesHub

Post by andrett7 »

Thanks Dr. McKenna for the reply, I'll look for octave.
However, is there some special scripts to run a m file using OpenSees interpreter? For example, in a m file I can run a tcl file using:
!OpenSees Main.tcl

Is there the opposite instruction?

Thanks,
Andrea
Scientists study the world as it is; engineers create the world that never has been.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Matlab and OpenSees using NeesHub

Post by fmk »

the commmand you want is exec, have a look at the example here:

http://opensees.berkeley.edu/wiki/index ... om_a_Scipt
andrett7
Posts: 118
Joined: Fri Dec 04, 2009 5:23 am
Location: Politecnico di Milano

Re: Matlab and OpenSees using NeesHub

Post by andrett7 »

Many thanks Dr. McKenna
Scientists study the world as it is; engineers create the world that never has been.
Ella
Posts: 21
Joined: Mon Dec 16, 2013 1:46 am

Re: Matlab and OpenSees using NeesHub

Post by Ella »

Hi,
Could you tell me please why when we use "!OpenSees Model.tcl", MATLAB calls that file? what does "!" do in MATLAB? Can we use this for other files written in other languages (such as Model.cpp)?!
Thanks a lot
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Matlab and OpenSees using NeesHub

Post by fmk »

you can call any program you want from matlab .. this is not an OpenSeees question ..

http://www.mathworks.com/help/matlab/ma ... l#f0-38522
andrett7
Posts: 118
Joined: Fri Dec 04, 2009 5:23 am
Location: Politecnico di Milano

Re: Matlab and OpenSees using NeesHub

Post by andrett7 »

Hi, I tested the interpreter and a command like:

exec matlab -nosplash -r "FileName" works.

Can I make the same thing with Octave?

exec octave -nosplash -r "FileName"

Thanks,
Andrea
Scientists study the world as it is; engineers create the world that never has been.
andrett7
Posts: 118
Joined: Fri Dec 04, 2009 5:23 am
Location: Politecnico di Milano

Re: Matlab (Octave) and OpenSees using NeesHub

Post by andrett7 »

I found that exec octave -r "FileName.m" does not work. Is there an equivalent command for Octave?

Thanks in advance
Scientists study the world as it is; engineers create the world that never has been.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Matlab and OpenSees using NeesHub

Post by fmk »

the following works for me on NEEShub

exec /usr/bin/octave FileName.m --silent
andrett7
Posts: 118
Joined: Fri Dec 04, 2009 5:23 am
Location: Politecnico di Milano

Re: Matlab and OpenSees using NeesHub

Post by andrett7 »

Many thanks.

Andrea
Scientists study the world as it is; engineers create the world that never has been.
Post Reply