Display results in one matrix (nested for loops
Show older comments
Hello,
I am working on my final year project, a script that detects moods/emotions generated by audio files. I am currently stuck here:
for i=1:2
for j=4:10
for k=2:3
for l=1:2
for m=1:2
X=(i,j,k,l,m);
End, end, etc.
The reason for this is that each element i,j,k,l,m of the array has several values (i.e. i is 1 or 2, j is 4 through 10 etc.)
Now the problem: I get each possible array in a single line, is there any way to store all of them in a single matrix?
Thank you in advance!
M.
2 Comments
Salaheddin Hosseinzadeh
on 14 Apr 2014
I guess it's
X(i,j,k,l,m)=someting
it won't be a bad idea to correct your code.
You said you want it all in one matrix! Well, they are in one matrix as far as I understand! X is a matrix and apparently that's where you wanna save different values!
Your question is vague!
Mihnea
on 14 Apr 2014
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!