Concretely, how tranlate the following MATLAB program to SAGE:
n=input('number of vertices n= '); m=input('number of edges m= '); disp('write weighted edges as [v1 v2 w12]'); for i=1:m E(i,:)=input(['arco ',num2str(i), '= ']); end disp(E)
1 | initial version | asked 2012-01-17 10:52:51 +0100 Anonymous |
Concretely, how tranlate the following MATLAB program to SAGE:
n=input('number of vertices n= '); m=input('number of edges m= '); disp('write weighted edges as [v1 v2 w12]'); for i=1:m E(i,:)=input(['arco ',num2str(i), '= ']); end disp(E)
2 | No.2 Revision |
Concretely, how tranlate the following MATLAB program to SAGE:
n=input('number of vertices n= ');
m=input('number of edges m= ');
disp('write weighted edges as [v1 v2 w12]');
for i=1:m
E(i,:)=input(['arco ',num2str(i), '= ']);
end