MATLAB: How to calculate the value

equation

I have the following values and want to calculate value of alpha such that alpha >=0;
a=rand(1,49);
b=rand(49,49);
c=rand(1,49);
alpha = (-b+real(sqrt(b^2-4*a*c')))/(2*a);
however I'm getting the value of alpha same which should not be true. Is there any error in my code.

Best Answer

You really need to learn the difference between matrix operations and array operations:
and then review what you have written (hint: you need array operations, not matrix operations).
To give you a working solution you should also tell us what MATLAB version you are using.