The solution might be easy but i cant figure out, please take a look at this line of code
eval(['cPDC' num2str(j) num2str(k) '=pdc(j,k,:)']);
assuming j=1 and k=2 (arbitrary), so for time being I am saving something (vector or matrix) in variable cPDC12=.. how can I change this line to save in vector, something like cPDC12(:,i)=.., where i is loop variable. Any help or suggestion will be greatly appreciated.

답변 (1개)

the cyclist
the cyclist 2014년 11월 17일

0 개 추천

I expect you could do this without using eval at all. Read this Q/A for a better way to do this.

카테고리

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

태그

질문:

2014년 11월 17일

답변:

2014년 11월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by