getting the error in solving non linear equations

조회 수: 4 (최근 30일)
sunitha
sunitha 2021년 3월 24일
답변: sunitha 2021년 3월 24일
This is the error i am getting , i didnt understand what that error means . The error is showing in S(i)=vpasolve([eqn1,eqn2],[N,J]);
can u help me
Error using sym.getEqnsVars>checkVariables (line 92)
Second argument must be a vector of symbolic variables.
Error in sym.getEqnsVars (line 56)
checkVariables(vars);
Error in sym/vpasolve (line 132)
[eqns,vars] = sym.getEqnsVars(varargin{1:N});
Error in Untitled (line 46)
Solutions{i}=vpasolve([eqn1,eqn2],[N,J]);

답변 (2개)

KSSV
KSSV 2021년 3월 24일
You have to show us the full code to get a straight help. Without ocde it gets difficult for people to understand what exactly is the problem.
I suspect that, in this line:
Solutions{i}=vpasolve([eqn1,eqn2],[N,J]);
is N, J are symbolic variables? I think not in your case and this is the reason for your error. N, J should be symbolic variables which you are truing to solve in eqn1 and eqn2.
If this is not the case, show us your full code.

sunitha
sunitha 2021년 3월 24일
Now i am not getting any error but i am getting the wrong values.i dont know where i did mistake using the data first i have to find V value using that V value again i have to find out the N J values
The first code is to find the v value
The second code is to find the N J variables
The problem is i am getting the same value 4 even if change the another variables also i am getting the same result
can u please tell me what is the problem with this code? i am trying from the last two days

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by