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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 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

Post by answerhappygod »

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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply