Home > other >  Novice small white, Matlab to run the code always appear undefined function or variable
Novice small white, Matlab to run the code always appear undefined function or variable

Time:09-27

The Matlab code is as follows:

I novice small white, as paper demand
Use the following code to solve the
CLC
The clear
The Ex=[92.5, 80,70,60,27.5; 92.5, 80,70,60,27.5; 95,85,75,65,30; 92.5, 80,70,60,27.5; 92.5, 80,70,60,27.5; 92.5, 80,70,60,27.5; 92.5, 80,70,60,27.5; 95,85,75,65,30]
En=[2.5, 1.67, 1.67, 1.67, 9, 2.5, 1.67, 1.67, 1.67, 9, 1.67, 1.67, 1.67, 1.67, 10; 2.5, 1.67, 1.67, 1.67, 9;
2.5, 1.67, 1.67, 1.67, 9; 2.5, 1.67, 1.67, 1.67, 9; 2.5, 1.67, 1.67, 1.67, 9; 1.67, 1.67, 1.67, 1.67, 10]
He=[0.4, 0.3, 0.4, 0.4, 0.1, 0.3, 0.3, 0.4, 0.2, 0.1, 0.5, 0.2, 0.1, 0.3, 0.1, 0.3, 0.3, 0.4, 0.4, 0.2, 0.3, 0.3, 0.4, 0.4, 0.2, 0.4, 0.4, 0.5, 0.3, 0.4, 0.4, 0.4, 0.4, 0.3, 0.1, 0.4, 0.3, 0.1, 0.5, 0.1, 0.5, 0.2, 0.1, 0.3, 0.4]
Xi=[83,83,83,83,83,76,76,76,76; 76; 68,68,68,68,68; 82,82,82,82,82; 67,67,67,67,67; 76,76,76,76,76; 69,69,69,69,69; 79,79,79,79,79]
W=[0.0625, 0.0296, 0.0330, 0.0231, 0.0200, 0.0628, 0.0645, 0.0330]
Z=zeros (1, 6)
For m=8
Ui0=zeros (1100) : '
For n=1
En_=En (m, n)
Ex_=Ex (m, n)
He_=He (m, n)
Xi_=xi (m, n)
Eni=normrnd (En_, He_, 1100 0) '
Ui1=exp (- ((xi_. * catalog (1100) '- Ex_. * catalog (1100)'). ^ 2))/(2) * Eni) ^ 2))
Ui0=[ui0, ui1]
End
Z=[Z; ui0]
End
Z (:, 1)=[]
(1:1, Z=[]
Z_1=zeros (1, 5)
For j=I: 1000-8000
Z_1=Z (j, j, :)
Z0=[Z0; Z1]
End
(1:1, Z0=[]
D0=W * Z0
D=[D; D0]
End
D (1:1,=[]
R=ones (1, 1)
For I=1 00
Sum=0
Sum2=0
For j=1
Sum1=D (I, j) * F (j)
Sum=sum + sum1
Sum2=sum2 + D (I, j)
End
R=sum/sum2
R={R, R)
End
R (1)=[]
Erx=mean (R)
Ern=STD (R, 0)
G=Ern/Erx
Disp (' correlation matrix Z '); Disp (Z_1);
Disp (' comprehensive evaluation vector D '); Disp (D (1:1, :));
Disp (' multiple operation to get the comprehensive evaluation of scores of expectations Erx '); Disp (Erx);
Disp (' multiple operation to get the comprehensive evaluation of scores of entropy Ern '); Disp (Ern);
Disp (' confidence factor g '); Disp (g);


Undefined function or variable "x"
For your bosses to give directions, and have a look at whether there are other questions, thank you very much!
  • Related