필터 지우기
필터 지우기

vpasolve and for loop

조회 수: 2 (최근 30일)
I G
I G 2018년 7월 6일
I am trying to solve numerically symbolic equation. But one variable in my equation is series of values
zv=1:-0.1:0
So, according to my code:
zv=1:-0.1:0
n=length(zv);
j=1:n;
C=15;
eqn=C-64.*(1-zv(j))==0;
R=vpasolve(eqn,x(j),1)
I got mistake in the last row that
`Index exceeds matrix dimensions`.
Other solution which is working is with for loop, but I dont know how to put all solutions (R) in one variable. I got list in my working space where values are changing and it stops when I use all
`zv`
terms:
syms x;
for zv=1:-0.1:0
C=15;
eqn=C-64.*(1-zv(j))==0;
R=vpasolve(eqn,x,1)
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by