Scilab
Posts  1 - 1  of  1
LeszekLuchowski
Hi. I ran into a strange problem in Scilab. My program crashed, and I couldn't find an error in it. Apparently, there isn't any! I managed to isolate the problem by cutting off most of my code and just leaving this:

// ===================================
clear;
clc;

A=[1 0 0 0;
0 0 3 0;
0 2 0 0;
0 0 0 1];

sx=spec(A)
if sx(1)>0.0 // <--- This is where it crashes!
"Positive"
end
// ===================================

The value of sx(1) is an unimpressive real number, about 2.45. Why can I not compare it to zero?
Save
Cancel
Reply
 
x
OK