Struct contents reference from a non-struct array object

syms Cx(t) Cp(t) Cs(t) mim Ks Yxs ms alpha beta;
mi = mim*Cs/(Ks+Cs);
y = dsolve(diff(Cx,t) == Cx*mi , diff(Cs,t) == -Cx*mi/Yxs - ms*Cx , diff(Cp,t) == alpha*diff(Cx,t) + beta*Cx , Cs(0)==34, Cx(0)==0.12);
solCx(t) = y.Cx
solCs(t) = y.Cs
solCp(t) = y.Cp
And i get "Struct contents reference from a non-struct array object". What should i change to fix this problem?

답변 (2개)

KSSV
KSSV 2017년 3월 24일

0 개 추천

You check the class of y it is sym. You are trying to access it like a structure which is not correct.
Walter Roberson
Walter Roberson 2017년 3월 24일

0 개 추천

dsolve is saying that it cannot find the solution. The result is the empty sym rather than a struct of results

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2017년 3월 23일

답변:

2017년 3월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by