How transform an string into a variable for manipulation.
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
I have the next cell array
t=[{'x_{1}*x_{3}*x_{3}' },{'x_{3}*x_{3}dx_{1}/dt'}]
How to multiply the array "t" by the vector?
n0=[5;7]
i.e
M=t*n0
Whith this multiplication I want to obtain the following,
M= 5*x_{1}*x_{3}*x_{3} + 7*'x_{3}*x_{3}dx_{1}/dt
I have tried to use the following:
vs=num2cell([n0])
M=cellfun(@times,vs,t,'uni',0)
But I do not obtain the desired results.
Please advice
답변 (0개)
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!