definision of variables with similar dimensions
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all
I want to define some variablees at the beginning of the program which have the same dimensions.
for example: there are four variables as followed ani I want to define their dimensions whithout frequently repeating "zeros(Y,T)". How can i do this?
"q_counter=zeros(Y,T); tsd_sim= zeros(Y,T); r_sim=zeros(Y,T); s_sim=zeros(Y,T); "
Thanks,
댓글 수: 0
답변 (1개)
Walter Roberson
2012년 1월 21일
zYT = zeros(Y,T);
q_counter = zYT; tsd_sim = zYT; r_sim = zYT; s_sim = zYT;
There is a technical difference between this and what you wrote, but you will only encounter that difference if you are very short on memory.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Continuous Waveforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!