Solve more complex problems in matlab
Hello, I have the following problem: Determine m so that the equation (m-2)x²-3mx+(m+2)=0 has one positive root and one negative root.
I have written the following code and I am getting Empty sym: 0-by-1
syms x m
assume(m~=0);
eq = (m-2)*x^2-3*m*x+(m+2) == 0;
eq_roots = solve(eq, x);
x1 = eq_roots(1);
x2 = eq_roots(2);
cond1 = x1 < 0;
cond2 = 0 < x2;
s=solve([cond1, cond2], m, ‘Real’, true,’ReturnConditions’, true)
s.conditions
Is there any way to solve problems like this in matlab?
I am a beginner in matlab and I am using problems that I know how to solve mathematically to train the use of matlabHello, I have the following problem: Determine m so that the equation (m-2)x²-3mx+(m+2)=0 has one positive root and one negative root.
I have written the following code and I am getting Empty sym: 0-by-1
syms x m
assume(m~=0);
eq = (m-2)*x^2-3*m*x+(m+2) == 0;
eq_roots = solve(eq, x);
x1 = eq_roots(1);
x2 = eq_roots(2);
cond1 = x1 < 0;
cond2 = 0 < x2;
s=solve([cond1, cond2], m, ‘Real’, true,’ReturnConditions’, true)
s.conditions
Is there any way to solve problems like this in matlab?
I am a beginner in matlab and I am using problems that I know how to solve mathematically to train the use of matlab Hello, I have the following problem: Determine m so that the equation (m-2)x²-3mx+(m+2)=0 has one positive root and one negative root.
I have written the following code and I am getting Empty sym: 0-by-1
syms x m
assume(m~=0);
eq = (m-2)*x^2-3*m*x+(m+2) == 0;
eq_roots = solve(eq, x);
x1 = eq_roots(1);
x2 = eq_roots(2);
cond1 = x1 < 0;
cond2 = 0 < x2;
s=solve([cond1, cond2], m, ‘Real’, true,’ReturnConditions’, true)
s.conditions
Is there any way to solve problems like this in matlab?
I am a beginner in matlab and I am using problems that I know how to solve mathematically to train the use of matlab equation MATLAB Answers — New Questions