Info
This question is closed. Reopen it to edit or answer.
How to creat variable number of matrixes into a loop and how to delete cells of them
1 view (last 30 days)
Show older comments
Hello i would like you to know that i am totally newbie in matlab since i ve been practising something less than a month for my lessons at university anyway the problem is the one that follows I have a variable number of angles from a single point mesured them several times but i dont know how many times they ve been measured . All i know is the value of the angles and the form of the matrix that they are inside. So i have a matrix like this a (angle) b (angle) c (angle) d (angle) . . . . n (angle) 0 a (angle) b (angle) c (angle) d (angle) . . . . n (angle) 0 0 0 a' (angle) b' (angle) c' (angle) d' (angle) . . . . n' (angle) Every time the angles are remesured on the matrix follows 1 zero also every time the point changes that the measures have been done follows 3 zeros. So my problem is how i can break this matrix in other smaller that will have the angles from measured from the same point What i tried to do was s1=size(A) i=s1(1,1) for k = 1 : i if A(k) == 0 & A(k+1) ==0 & A(k+2) ==0 j2=j2+1 end B(k,j3)=A(k,1) end but this dont help much cause it creats a matrix B with many 0 and divides each package of angles to a different array .
0 Comments
Answers (2)
Sean de Wolski
on 12 Mar 2011
First read this document:
Your method of using multiple file names is advised against and you should look at using arrays (whether normal or cell) to do the work.
Second, can you please post a s small example and/or break your instructions down to individual lines, please? It's very difficult to follow.
1 Comment
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!