Double = in one line of code
이전 댓글 표시
Can I define a=b=c in one line of code in matlab? if yes what is the syntax?
I do not want to define in double section like a=b; c=b;
댓글 수: 1
James Tursa
2019년 8월 13일
What do you have against a=b; c=b; ?
답변 (2개)
madhan ravi
2019년 8월 13일
doc deal
Andrei Bobrov
2019년 8월 13일
b = 1000;
zz = {b};
[a,c] = zz{[1,1]};
댓글 수: 1
Rik
2019년 8월 13일
Nice hack, although I think deal is more clear when reading the code. I didn't know this syntax also generated a comma-separated list like {:} does.
카테고리
도움말 센터 및 File Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!