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!