MATLAB Answers

How to say this in MATLAB language?

4 views (last 30 days)
IBM watson
IBM watson on 7 Dec 2018
Commented: IBM watson on 7 Dec 2018
I want to say a plus b equals to 10
math exuation:
a+b=10
how write this in matlab?

  0 Comments

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 7 Dec 2018
Edited: madhan ravi on 7 Dec 2018
Welcome to the club ;-) see syms requires symbolic math toolbox
syms a b
equation=a+b==10

  4 Comments

Show 1 older comment
madhan ravi
madhan ravi on 7 Dec 2018
Anytime :) , yes sure why not ? values can be assigned later on using subs() read the documentation pages to know more about the symbolic world .
Image Analyst
Image Analyst on 7 Dec 2018
But what values do you want ot use for a and b? 2 and 8? 1 and 9? 5.5 and 4.5?
IBM watson
IBM watson on 7 Dec 2018
Matlab will calculate the best values for my fitness function.
Yes, I should and will read the documentation.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by