Académique Documents
Professionnel Documents
Culture Documents
: Boucle For
clear all
close all
clc
for theta=1:0.01:pi
x=cos(pi+theta)
end
clear all
close all
clc
u=[];
v=[];
for theta=0:0.1:pi
x=cos(theta);
u=[u,x]
y=sin(theta);
v=[v,y]
end
plot(u,v)
clear all
close all
clc
theta=[0,pi/4,pi/3,pi/2,pi]
for i=1:length(theta)
x=cos(theta);
end
plot(theta,x)
clear all
close all
clc
for theta=1:pi
x=cos(theta);
disp(x);
end
plot(theta,x)
TP N 02
clear all
close all
clc
a=exp(5);
theta=30;
x=0:0.05:1;
y=a*x.*cosd(2*theta);
plot(x,y)
TP 03 function
function[s]=section(a,b)
s=a*b;
function[s]= surface(d)
s=pi*((d^2)/4);