blob: d0b221ac5e3bd7d1419188adae8821367307d8bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Test the Given systems for linearity,y(t)=x(t^2)
clc;
clear;
function x=f1(t),x=t'*t; ,endfunction//x function of t^2
function y=f(t,x), y=x; ,endfunction//y function of y and t
t=-5:0.1:5;
x1=f1(t);
x2=f1(t);
x3=x1+x2;
if f(t,x3)==(f(t,x1)+f(t,x2));
disp('system is linear');
else
disp('system is non linear');
end
|