This program gives me the answer like this : c =
-3
c =
4
But I want the answer like this: c =
-3 4
The program:
v = [1 2 -3 4];n = 1;l = length (v);while (n < l)a = v(n);b = v(n+1);n = n+1;if (a < 0 && b > 0)||(a > 0 && b < 0)c = [b]endend
Best Answer