フィルターのクリア

More efficient code for placing variables in one line?

1 回表示 (過去 30 日間)
Brian
Brian 2013 年 5 月 3 日
Hi,
I've been looking for a while but I can t find any solution. Is there surely a better way than this to define elements:
j= j+1;
MMG(j, 1)=j;
MMG(j, 2)=1;
MMG(j, 3)=xc + r
MMG(j, 4)=xc - r
MMG(j, 5)=yc + r
MMG(j, 6)=yc - r
Apologies, this is probably basic, I couldn't find anything

採用された回答

the cyclist
the cyclist 2013 年 5 月 3 日
編集済み: the cyclist 2013 年 5 月 3 日
MMG(j,1:6) = [j,1,xc+r,xc-r,yc+r,yc-r];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by