Professional Documents
Culture Documents
1. x=[45,23,17,34,85,29,13,89,100,101,79,80,99,1,5,6,7,3]
count=sum(x)
for k=1:length(x)
end
>> Untitled
x=
Columns 1 through 7
45
23
17
34
85
29
13
Columns 8 through 14
89 100 101 79 80 99
Columns 15 through 18
5
count =
816
4.x=[0:0.01:35];
y=0.4*sqrt(1.8.*x);
plot(x,y)
xlabel('x')
ylabel('y')
title('equation y')
axis([0 35 0 3.5])
5.x=[0:0.01:2];
y=sinh(x);
z=0.5.*exp(x);
plot(x,y,x,z),xlabel('x'),ylabel('y'),gtext('sinh(x)'),gtext('0.5*exp(x)')