필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Can't use subs(sym_array,vector) because Matlab assumes I want to replace the first component of sym_array and not the whole array

조회 수: 1 (최근 30일)
x = sym('x',[1 2 3])
subs(x,[1 2 3])
returns:
[1,2,3,x2,x2,x2,x3,x3,x3]
How do I fix this to return [1,2,3]?

답변 (1개)

Chaitral Date
Chaitral Date 2017년 4월 25일
See the below code,
syms x x1 x2 x3;
x = sym('x',[1 3]);
x=subs(x,[x1,x2,x3],[1, 2,3]);
This will give you,
x =
[ 1, 2, 3]

태그

Community Treasure Hunt

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

Start Hunting!

Translated by