フィルターのクリア

Error in solve (Incorrect number or types of inputs or outputs for function 'solve'.)

68 ビュー (過去 30 日間)
Laura
Laura 2023 年 10 月 23 日
回答済み: Walter Roberson 2023 年 10 月 23 日
My code is:
I am getting the error:
Error in untitled3 line 4
[x,y]=solve(ec1,ec2)
How to resolve the above error?

採用された回答

Walter Roberson
Walter Roberson 2023 年 10 月 23 日
You did not mention your MATLAB release. Since roughly R2018b that form of solve() has not been available. These days you would need something closer to
syms x y
ec1 = y == x^2;
ec2 = y == log(x+1);
[x, y] = solve(ec1, ec2)
Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.
x = 
0
y = 
0
fimplicit([ec1, ec2], [-0.9 5])
[x, y] = vpasolve([ec1, ec2], 1)
x = 
0.74688174230852863531184994065236
y = 
0.55783233699382337329238431264145

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by