MATLAB Answers

Check for missing argument or incorrect argument data type in call to function 'solve'. error

450 ビュー (過去 30 日間)
Aleem Andrew
Aleem Andrew 2021 年 2 月 21 日
回答済み: Deepak Meena 2021 年 2 月 26 日
I am trying to solve for a variable using the solve command. I know I can do so symbollically, but I want to first intiailize the variable and then solve for it since I am using an iterative approach to solve a problem and the variable's value is updated at the end of each iteration. When I execute the code below I get an error message. Can someone explain how this can be done?
a = 0;
a = solve(a+2==5)

回答 (1 件)

Deepak Meena
Deepak Meena 2021 年 2 月 26 日
Hi Aleem,
Refer to this solve documentation. Here as you can need to define a as the symbolic variable fThis
Here is an example
>> syms a
a = solve(a+2==5)
a =

Community Treasure Hunt

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

Start Hunting!

Translated by