Variable x must be of data type double. It is currently of type sym. Check where the variable is assigned a value.

5 次查看(过去 30 天)
%W=3t^2+6t
%W=3t(t+2)
%(-(b)+sqrt(b^2-(4*a*c))/2*a)
%(-(b)-sqrt(b^2-(4*a*c))/2*a)
syms x positive
W=3*x.^2+6*x;
t1=solve(W == 3)
t1 = 
t2=solve(W == 9)
t2 = 
1
t3=solve(W == 45)
t3 = 
3
  4 个评论
Jarrod
Jarrod 2023-10-10
No but the grader it needs to be submitted to gives this error everything is right i just need some leway to convert it

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2023-10-10
x = double(t1);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by