I was trying to create a matrix with text in some cases, but I can't. I tried with advices from other answers, but it didn't work.
The text which I want to include is «start» and «end» for two different cases like this:
NM = 5
FF = zeros(NM*2,2);
start = 'start';
ending = 'end';
i=1
while i<=NM
FF(i*2,1) = i
FF(i*2-1,1) = i
FF(i*2,2) = fprintf(start);
FF(i*2-1,2) = fprintf(ending)
i = i+1
end
4 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723880
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723880
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723882
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723882
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723885
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723885
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723893
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/471454-text-in-while-loop-creating-matrix#comment_723893
Sign in to comment.