For #2: Isn’t the negative square root of a real number x just -sqrt(x)? ]]>

my questions are:

1. how to filter out the real and complex roots of a quadratic equation

2.how to get both the square roots of a real no.

i have tried it using sqrt() fn ,for eg: sqrt(4),but matlab is giving only the +ve root ]]>

I need to store every single outcome from the FOR loop here-under in a matrix. Please see the code below and the comment points to the part in question. Appreciate your advice.

clc

xu = [0:0.1:10];

yu = [0:0.1:10]’;

[X, Y] = meshgrid(xu,yu);

[nrx_x, nrx_y] = size(X);

for ii = 1:nrx_x

for jj = 1:nrx_y

prx_current = [X(ii, jj); Y(ii, jj)]; % Need to store the output of every single loop run in a matrix that is 2 x nrx_x*nrx_y

end

article ߋn oᥙr site. Keep uр tҺe great writing. ]]>