I need a loop for that sequence.
T_01=U_01(:,:,1)';
T_01(T_01==0)=nan;
i've got U_01:U_60 so i need T_01:T_60
Anyone knows how to make that loop?
Thank you

 채택된 답변

James Tursa
James Tursa 2015년 5월 6일
편집: James Tursa 2015년 5월 6일

2 개 추천

It appears you have multiple variables in your workspace with names such as U_01, U_02, ... U_60 and you want to make more of these using T. There is a way to construct a loop to process these names using the "eval" function, but as you can already see it is a real pain to deal with variables such as this in your code. The best advice I can give you is to abandon this approach and use cell or struct or multi-dimensional variables instead. E.g., see this link:

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

태그

질문:

2015년 5월 6일

편집:

2015년 5월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by