| MATLAB Central > MATLAB Newsreader > for loops within statements ? |
|
|
|
Subject: for loops within statements ? From: Juliette Salexa Date: 8 Jul, 2009 20:03:03 Message: 1 of 6 |
|
I have a function called bargraph(input1,input2,...input25) |
|
"Juliette Salexa" <juliette.physicist@gmail.com> wrote in message <h32u1n$ons$1@fred.mathworks.com>... |
|
"Juliette Salexa" <juliette.physicist@gmail.com> wrote in message <h32u1n$ons$1@fred.mathworks.com>... |
|
Usually in MATLAB one would not use input1, input2, input3,... inside a function. You would pass in the matrix A then use A(:,1), A(:,2), A(:,3),.... instead. Either that or use cell arrays or structures to keep the data. For example: |
|
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h32uvm$qqp$1@fred.mathworks.com>... |
|
Subject: for loops within statements ? From: Juliette Salexa Date: 8 Jul, 2009 20:43:02 Message: 6 of 6 |
|
Bruno's method worked FLAWLESSLY, |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
Contact us at files@mathworks.com
