MATLAB Answers


Unknown Matlab code meanings

Asked by Hon Wai Wayne Lee on 22 Apr 2013

for Matlab, do you know any of the following or know where I can find out about them? I searched on the web and couldn't find out what they mean



n_bin = 200



disp(sprintf('mean: %.5g\n',stndrd_dev));

strm = RandStream('mt19937ar','Seed',575)





My version of matlab is 2010 and that maybe why I can't find these in the matlab toolbox doc

thank you


Log in to comment.

2 Answers

Answer by Jan Simon
on 22 Apr 2013
Edited by Jan Simon
on 22 Apr 2013
 Accepted Answer

The question cannot be answered completely:

  1. XTemp, Winc, iTime, iPath, tInsert, rndmat, likeve and thank you could be variables or functions.
  2. The variable n_bin is set to 200.
  3. You can find out the effects of the disp() command easily: Simply let it run and see the output to the command window.
  4. @(t,x) is the header of an anonymous function. It cannot be explained in detail as long as you do not post the complete line.
  5. strm is set to the a reandom stream object, which means, that you initialize a random number generator.

All you ask for is explained exhaustively in the Getting Started chapters of the documentations. You cannot use Matlab efficiently without reading the manuals. It wouldn't be efficient, if we post a rephrased version of all, you can find there already.

  1 Comment

Log in to comment.

Answer by per isakson
on 22 Apr 2013
Edited by per isakson
on 22 Apr 2013

See: RandStream

  1 Comment

I didn't understand what mt19937ar was and what the different values of the seed mean

Log in to comment.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today