필터 지우기
필터 지우기

From cells to vectors with doubles with loop.

조회 수: 2 (최근 30일)
Kelly Kyriakou
Kelly Kyriakou 2015년 11월 15일
편집: Kelly Kyriakou 2015년 11월 15일
I have this variable which is 1x24 cells and it's like this: [10 7] [13 7;12 7;10 7] [13 7;12 7;10 7] [10 7] [13 7;12 7;10]. I want them to be in vectors like this: 10 7; 13 7; 12 7; 10 7 et.c I wrote a loop for this and it is transposed as I want but it stores only the last value. How I could store all values?
for zena = 1:size(anteola,2)
getresults = results{zena}
assignin('base','colla',getresults(:))
end
Thank you in advance
  댓글 수: 1
Jan
Jan 2015년 11월 15일
Do you see that the missing formatting let your question look strange? "vectors like this: 10 7 13 7 12 7 10 7"?!

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2015년 11월 15일
Return the value of results as an output argument of your function. Creating variables remotely in another workspace is prone to bugs, because it makes it much harder to keep the overview. So my advice is: Avoid assignin strictly.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by