Assign values to string array
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
A = [x,y,z1]; B = [1,6,7];
and wherever x comes in program it should be replaced by its values 1, y by 6 and so on.....
thank you
1 件のコメント
Daniel Shub
2012 年 11 月 23 日
I am closing this question as a doit4me. Please say what you have tried.
回答 (2 件)
Matt J
2012 年 11 月 23 日
A=B
It seems like you run into many applications of this command, judging from your previous question here
0 件のコメント
Azzi Abdelmalek
2012 年 11 月 23 日
A={'x','y','z'};
B=[1 6 7];
arrayfun(@(x) assignin('base',A{x},B(x)),1:length(A))
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!