about if statement and solution
Show older comments
Dear sir,
when I run this bellow code, it shows this error,
code:
syms x
a=solve(x^2+4*x+4);
b=a(1)
if b>2
s=2
else
s=3
end
error:
Undefined function or method 'gt' for input arguments of type 'sym'.
Error in ==> solution at 4
if b>2
my target is, I have to compare the value of 'x' in the equation with constant. but I got this error.
please help me the solution for my problem..
Accepted Answer
More Answers (0)
Categories
Find more on Utilities for the Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!