% Find the shortest distance from A to E.
AB =[2 4 3];
BC =[7 4 6; 3 2 4; 4 1 5];
CD =[ 1 4; 6 3; 3 3];
DE =[3; 4];
L = zero (1,100)+1000;
n = 1;
For a= 1:3
L=AB( 1,a);
For b= 1:3
L=L+BC(a,b);
For c= 1:2
L=L+CD(b,c)+DE(c, 1);
l( 1,n)= L;
n = n+ 1;
end
end
end
Minimum = minimum (l)
Run the program to get minL= 1 1.
mathematical model
Mathematical model is a kind of simulation, which uses mathematical symbols, mathematical formulas, programs, graphics and so on to describe the essential attributes of practical topics abstractly and concisely. It may explain some objective phenomena, or predict the future development law, or provide an optimal strategy or better strategy for controlling the development of a certain phenomenon.
Generally speaking, mathematical model is not a direct copy of real problems, and its establishment often requires people to observe and analyze real problems in depth and carefully, and also requires people to use all kinds of mathematical knowledge flexibly and skillfully.