str1 =
-------------------> Session (re)starting: 06-Feb-2008 09:47:10
exit
str1 =
-------------------> Session (re)starting: 06-Feb-2008 09:25:13
relops
% Get a simple vector to work with
a = 1:9
a =
1 2 3 4 5 6 7 8 9
a > 4
ans =
0 0 0 0 1 1 1 1 1
a < 4
ans =
1 1 1 0 0 0 0 0 0
a >= 4
ans =
0 0 0 1 1 1 1 1 1
a <= 4
ans =
1 1 1 1 0 0 0 0 0
% The next is a test for where a is equal to 4, not to be confused
% with the assignment statement
% a = 4
% which would reset the 1 x 9 vector a to be the 1 x 1 scalar value 4
a == 4
ans =
0 0 0 1 0 0 0 0 0
a ~= 4
ans =
1 1 1 0 1 1 1 1 1
% The inequality operator ~= can take the forms
% !=
% /=
% ^=
% .ne.
% in other languages, so it's one to check on in each case.
% The others are standard in C, C++, Fortran, Perl, Python, ....
echo off;
clc
x = randn(5,1)
x =
-0.43256
-1.6656
0.12533
0.28768
-1.1465
y = x.^5
y =
-0.015145
-12.818
3.0925e-05
0.0019702
-1.9807
exit
str1 =
-------------------> Session (re)starting: 06-Feb-2008 09:58:53
path
MATLABPATH
/nfs/mneme/home/users/bramley/.matlab
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/general
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/ops
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/lang
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/elmat
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/elfun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/specfun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/matfun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/datafun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/polyfun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/funfun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/sparfun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/scribe
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/graph2d
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/graph3d
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/specgraph
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/graphics
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/uitools
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/strfun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/imagesci
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/iofun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/audiovideo
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/timefun
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/datatypes
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/verctrl
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/codetools
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/helptools
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/demos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/timeseries
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/hds
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/guide
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/matlab/plottools
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/local
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/controllib
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simulink
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/blocks
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/components
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/fixedandfloat
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/fixedandfloat/fxpdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/fixedandfloat/obsolete
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simdemos/aerospace
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simdemos/automotive
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simdemos/simfeatures
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simdemos/simgeneral
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/dee
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/dastudio
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/glue
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/stateflow/stateflow
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/rtw/rtw
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simulink/modeladvisor
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simulink/modeladvisor/fixpt
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simulink/MPlayIO
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/simulink/dataobjectwizard
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/fixedpointlib
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/simulink/dataimportexport
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/hdlshared
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/stateflow/sfdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/stateflow/coder
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/compiler
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/control/control
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/control/ctrlguis
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/control/ctrlobsolete
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/control/ctrlutil
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/control/ctrldemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/slcontrollib
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/emlcoder/emlcoder
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/emlcoder/emlcodermex
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/eml/eml
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/fixedpoint/fixedpoint
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/fixedpoint/fidemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/fuzzy/fuzzy
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/fuzzy/fuzdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/images/images
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/images/imuitools
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/images/imdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/images/iptutils
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/imageslib
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/images/medformats
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/instrument/instrument
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/instrument/instrumentdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/slvnv/simcoverage
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nncontrol
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nndemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnanalyze
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nncustom
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nndistance
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnformat
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nninit
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnlearn
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnnetinput
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnnetwork
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnperformance
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnplot
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnprocess
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnsearch
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nntopology
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nntrain
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nntransfer
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnet/nnweight
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnguis
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnguis/nftool
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnguis/nntool
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnobsolete
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnresource
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/nnet/nnutils
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/optim/optim
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/optim/optimdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/optimlib
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/pde
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/signal/signal
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/signal/sigtools
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/signal/sptoolgui
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/signal/sigdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/shared/spcuilib
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/stats
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/vr/vr
/nfs/nfs2/home/data/software/all/matlab-R2007a/toolbox/vr/vrdemos
/nfs/nfs2/home/data/software/all/matlab-R2007a/work
help path
PATH Get/set search path.
PATH, by itself, prettyprints MATLAB's current search path. The initial
search path list is set by PATHDEF, and is perhaps individualized by
STARTUP.
P = PATH returns a string containing the path in P. PATH(P) changes the
path to P. PATH(PATH) refreshes MATLAB's view of the directories on
the path, ensuring that any changes to non-toolbox directories are
visible.
PATH(P1,P2) changes the path to the concatenation of the two path
strings P1 and P2. Thus PATH(PATH,P) appends a new directory to the
current path and PATH(P,PATH) prepends a new directory. If P is already
on the path, then PATH(PATH,P) moves P to the end of the path,
and similarly, PATH(P,PATH) moves P to the beginning of the path.
For example, the following statements add another directory to MATLAB's
search path on various operating systems:
Unix: path(path,'/home/myfriend/goodstuff')
Windows: path(path,'c:\tools\goodstuff')
See also what, cd, dir, addpath, rmpath, genpath, pathtool, savepath, rehash.
Reference page in Help browser
doc path
clc
driver
??? Undefined function or variable 'driver'.
exit
str1 =
-------------------> Session (re)starting: 06-Feb-2008 10:14:59
driver
stack
whos
Name Size Bytes Class Attributes
avg_times 1x4 32 double
floops 1x1 8 double
fnoloops 1x1 8 double
k 1x1 8 double
methodnames 4x8 64 char
n 1x1 8 double
ntests 1x1 8 double
sloops 1x1 8 double
snoloops 1x1 8 double
std_times 1x4 32 double
times 4x100 3200 double
x 1x100 800 double
sum(times)
ans =
Columns 1 through 8
0.25691 0.23338 0.23317 0.23273 0.23596 0.23584 0.23447 0.23681
Columns 9 through 16
0.23529 0.23386 0.23537 0.24699 0.24426 0.24373 0.24497 0.24527
Columns 17 through 24
0.24344 0.24654 0.24503 0.24459 0.24301 0.23933 0.24085 0.2426
Columns 25 through 32
0.23804 0.23961 0.24107 0.24184 0.24206 0.24279 0.24267 0.24446
Columns 33 through 40
0.24423 0.24298 0.24399 0.24633 0.24442 0.24466 0.24357 0.24377
Columns 41 through 48
0.24762 0.24345 0.24309 0.24434 0.24351 0.24315 0.24294 0.24243
Columns 49 through 56
0.24478 0.24484 0.24056 0.23496 0.23442 0.23631 0.23479 0.23598
Columns 57 through 64
0.23419 0.23554 0.23622 0.23519 0.23475 0.23431 0.23707 0.23428
Columns 65 through 72
0.23511 0.2355 0.2346 0.23643 0.24308 0.23034 0.23232 0.23326
Columns 73 through 80
0.2332 0.23301 0.23527 0.2313 0.23378 0.23312 0.23351 0.23477
Columns 81 through 88
0.23294 0.23173 0.23367 0.23421 0.23096 0.23274 0.23128 0.23172
Columns 89 through 96
0.23146 0.232 0.23186 0.23453 0.2356 0.23274 0.23353 0.2328
Columns 97 through 100
0.2348 0.23326 0.23246 0.23296
sum(sum(times))
ans =
23.805
sum(times(:))
ans =
23.805
4*ans
ans =
95.222
clc
close all
driver
Entering keyboard phase
whos
Name Size Bytes Class Attributes
ans 1x1 8 double
avg_times 1x4 32 double
floops 1x1 8 double
fnoloops 1x1 8 double
k 1x1 8 double
methodnames 4x8 64 char
n 1x1 8 double
ntests 1x1 8 double
sloops 1x1 8 double
snoloops 1x1 8 double
std_times 1x4 32 double
times 4x100 3200 double
x 1x100 800 double
n
n =
200
ntests
ntests =
100
% Resetting n to a larger value. Expect to get total time of
% 4*sum(times(:)), when the times are from n = 200.
n = 400
n =
400
return
sum(times(:))
ans =
95.391