getting the error in solving non linear equations

3 ビュー (過去 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 Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by