How do I delete the edge London-Madrid with a code? Not by hand. In matlab clear; clc; s = [1 1 1 2 2 3] t = [2 3 4 3 4
Posted: Fri May 20, 2022 11:58 am
How do I delete the edge London-Madrid with a code? Not by hand.
In matlab
clear;
clc;
s = [1 1 1 2 2 3]
t = [2 3 4 3 4 4]
weights = [1440 840 2610 920 1270 1860]
names = {'Stockholm' 'London' 'Berlin' 'Madrid'};
G = graph(s,t,weights,names)
plot(G,'EdgeLabel',G.Edges.Weight)
In matlab
clear;
clc;
s = [1 1 1 2 2 3]
t = [2 3 4 3 4 4]
weights = [1440 840 2610 920 1270 1860]
names = {'Stockholm' 'London' 'Berlin' 'Madrid'};
G = graph(s,t,weights,names)
plot(G,'EdgeLabel',G.Edges.Weight)