getting the error in solving non linear equations

2 次查看(过去 30 天)
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