Professional Documents
Culture Documents
01:1];
>> y=x.^2;
>> plot(x,y)
>> X=unifrnd(0,1,1,10)
X=
>> Y=unifrnd(0,1,1,10)
Y=
>> plot(x,y,X,Y*)
plot(x,y,X,Y*)
|
Error: The input character is not valid in MATLAB statements or expressions.
>> plot(x,y,X,Y,'*')
>> fx=X.^2
fx =
>> m=max(fx)
m=
0.9310
>> A=m*(1-0)*(3/10)
A=
0.2793
>> e=0.3333-A
e=
0.0540
>> X=unifrnd(0,1,1,100)
X=
Columns 1 through 13
Columns 14 through 26
Columns 27 through 39
Columns 53 through 65
Columns 66 through 78
Columns 79 through 91
>> Y=unifrnd(0,1,1,100)
Y=
Columns 1 through 13
Columns 27 through 39
Columns 40 through 52
Columns 53 through 65
Columns 66 through 78
Columns 79 through 91
fx =
Columns 1 through 13
Columns 14 through 26
Columns 27 through 39
Columns 40 through 52
Columns 53 through 65
Columns 66 through 78
0.0817 0.5734 0.5681 0.1447 0.3224 0.0058 0.0029 0.2817
0.6071 0.8724 0.0169 0.3236 0.2203
Columns 79 through 91
>> m=max(fx)
m=
0.9923
>> A=m*(1-0)*(36/100)
A=
0.3572
>> e=0.3333-A
e=
-0.0239
>> X=unifrnd(0,1,1,1000);
>> Y=unifrnd(0,1,1,1000);
>> plot(x,y,X,Y,'*')
>> fx=X.^2
fx =
Columns 1 through 13
Columns 14 through 26
Columns 27 through 39
Columns 40 through 52
Columns 53 through 65
Columns 66 through 78
>> m=max(fx)
m=
0.9990
>> X=unifrnd(0,1,1,100)
X=
Columns 1 through 13
Columns 14 through 26
Columns 27 through 39
Columns 40 through 52
0.5385 0.2822 0.9760 0.0364 0.3262 0.9730 0.3650 0.3091
0.1209 0.9158 0.1355 0.3321 0.8975
Columns 53 through 65
Columns 66 through 78
Columns 79 through 91
>> Y=unifrnd(0,1,1,100)
Y=
Columns 1 through 13
Columns 14 through 26
0.2994 0.5916 0.2033 0.6359 0.7984 0.5017 0.6508 0.7960
0.2334 0.6008 0.1125 0.5158 0.8378
Columns 27 through 39
Columns 40 through 52
Columns 53 through 65
Columns 66 through 78
Columns 79 through 91
>> plot(x,y,X,Y,'*')
>> fx=X.^2
fx =
Columns 1 through 13
Columns 14 through 26
Columns 27 through 39
Columns 40 through 52
Columns 53 through 65
Columns 66 through 78
Columns 79 through 91
0.0566 0.0594 0.0110 0.7368 0.4875 0.5384 0.4232 0.2665
0.1065 0.4379 0.0138 0.0218 0.0004
>> m=max(fx)
m=
0.9525
>> e=0.3333-A
e=
-0.0239
>> cont=0;
>> X=unifrnd(0,1,1,1000);
>> Y=unifrnd(0,1,1,1000);
>> plot(x,y,X,Y,'*')
>> fx=X.^2
fx =
Columns 1 through 13
Columns 27 through 39
Columns 40 through 52
Columns 53 through 65
Columns 66 through 78
Columns 79 through 91
>> m=max(fx)
m=
0.9996
>> X=unifrnd(0,1,1,1000);
>> Y=unifrnd(0,1,1,1000);
>> plot(x,y,X,Y,'*')
>> fx=X.^2
fx =
Columns 1 through 13
Columns 14 through 26
Columns 27 through 39
Columns 40 through 52
Columns 53 through 65
Columns 79 through 91
>> m=max(fx)
m=
0.9938
>>
>> plot(x,y,X,Y,'*')
>>
>>
>> plot(x,y,X,Y,'*')
>> cont=0;
>> for i=1=1000
for i=1=1000
|
Error: The expression to the left of the equals sign is not a valid target for an
assignment.
ans =
1000
>> cont
cont =
>> cont=0;
>> for i=1;1000
if(Y(i)<=fx(i))
cont=cont+1;
end
end
ans =
1000
>> cont
cont =
cont =
368