[Master Index]
[Index for /tools/hpmatlab/toolbox/matlab/lang]
eval
(/tools/hpmatlab/toolbox/matlab/lang/eval.m)
Help text
EVAL Execute string containing MATLAB expression.
EVAL(s), where s is a string, causes MATLAB to execute
the string as an expression or statement.
EVAL(s1,s2) provides the ability to catch errors. It
executes string s1 and returns if the operation was
successful. If the operation generates an error,
string s2 is evaluated before returning. Think of this
as EVAL('try','catch')
[X,Y,Z,...] = EVAL(s) returns output arguments from the
expression in string s.
The input strings to EVAL are often created by
concatenating substrings and variables inside square
brackets. For example:
Generate a sequence of matrices named M1 through M12:
for n = 1:12
eval(['M' num2str(n) ' = magic(n)'])
end
Run a selected M-file script. The strings making up
the rows of matrix D must all have the same length.
D = ['odedemo '
'quaddemo'
'fitdemo '];
n = input('Select a demo number: ');
eval(D(n,:))
Read and process files with names data1.dat, data2.dat, ...
k = 0;
while 1
k = k+1;
datak = ['data' int2str(k)];
filename = [datak '.dat'];
if ~exist(filename), break, end
eval(['load ' filename]);
X = eval(datak);
% Process data in matrix X.
end
See also LASTERR, FEVAL.
Cross-Reference Information
This is called by
- auwrite /tools/hpmatlab/toolbox/matlab/sounds/auwrite.m
- axis /tools/hpmatlab/toolbox/matlab/graphics/axis.m
- beatcontrol ee2200/beatcontrol.m
- besselap /tools/hpmatlab/toolbox/signal/besselap.m
- cohere /tools/hpmatlab/toolbox/signal/cohere.m
- csd /tools/hpmatlab/toolbox/signal/csd.m
- cztdemo /tools/hpmatlab/toolbox/signal/cztdemo.m
- dialog /tools/hpmatlab/toolbox/matlab/graphics/dialog.m
- diff /tools/hpmatlab/toolbox/matlab/datafun/diff.m
- enveloper ee2200/enveloper.m
- filtdemo /tools/hpmatlab/toolbox/signal/filtdemo.m
- ginput /tools/hpmatlab/toolbox/matlab/graphics/ginput.m
- hostid /tools/hpmatlab/toolbox/matlab/general/hostid.m
- legend /tools/hpmatlab/toolbox/matlab/plotxy/legend.m
- ls /tools/hpmatlab/toolbox/matlab/general/ls.m
- menu /tools/hpmatlab/toolbox/matlab/lang/menu.m
- moddemo /tools/hpmatlab/toolbox/signal/moddemo.m
- pez ee2200/pez.m
- pez_dp ee2200/pez_dp.m
- pez_dz ee2200/pez_dz.m
- pez_ep ee2200/pez_ep.m
- pez_ez ee2200/pez_ez.m
- playsound /tools/hpmatlab/toolbox/matlab/sounds/playsound.m
- print /tools/hpmatlab/toolbox/matlab/graphics/print.m
- psd /tools/hpmatlab/toolbox/signal/psd.m
- psdchk /tools/hpmatlab/toolbox/signal/psdchk.m
- recsound /tools/hpmatlab/toolbox/matlab/sounds/recsound.m
- remez /tools/hpmatlab/toolbox/signal/remez.m
- sosdemo /tools/hpmatlab/toolbox/signal/sosdemo.m
- specchk /tools/hpmatlab/toolbox/signal/specchk.m
- specgram /tools/hpmatlab/toolbox/signal/specgram.m
- spectrum /tools/hpmatlab/toolbox/signal/spectrum.m
- ss2zp /tools/hpmatlab/toolbox/signal/ss2zp.m
- subplot /tools/hpmatlab/toolbox/matlab/graphics/subplot.m
- subscribe /tools/hpmatlab/toolbox/matlab/general/subscribe.m
- terminal /tools/hpmatlab/toolbox/matlab/graphics/terminal.m
- tfe /tools/hpmatlab/toolbox/signal/tfe.m
- zp2ss /tools/hpmatlab/toolbox/signal/zp2ss.m
Produced by mat2html on Wed Feb 8 12:25:18 EST 1995
Cross-Directory links are: ON