[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
plotting userdefined function
From: |
Andrey |
Subject: |
plotting userdefined function |
Date: |
Mon, 20 Nov 2017 04:44:44 -0700 (MST) |
Hello!
I try to plot userdefined function, but on screen only horizontal line at
50.
What is wrong with my function?
%==========================================
function ua = fnUA(x)
if x > 0.03
ua = 50*sin( 2*3.1415*50*x );
else
ua = 50;
end;
endfunction
x=[0:0.0001:0.09];
plot(x, fnUA(x));
%=========================================
Thanks.
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- plotting userdefined function,
Andrey <=