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 | 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
```~~disp(E)~~disp(E)

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.