Having some error while using doLayout, will appreciate any help. Incorrect number or types of inputs or outputs for function 'doLayout'.
1 view (last 30 days)
Show older comments
Hi I keep having this error while trying to run this code
Incorrect number or types of inputs or outputs for function 'doLayout'.
clc;
clear all;
close all;
format
A=[1 -1 0 0;0 1 0 -1 ; -1 0 1 0 ;0 0 -1 1]; %D
% To Create topology
DG=A;
DG(1,1)=0;
DG(2,2)=0;
DG(3,3)=0;
DG(4,4)=0;
id={'1','2','3','4'};
DG=digraph(DG,id);
plot(DG)
doLayout(DG);
DG.Nodes(1).Position=[54 158];
DG.Nodes(2).Position=[32 110];
DG.Nodes(3).Position=[74 110]
DG.Nodes(4).Position=[54 62];
dolayout(DG,'Pathsonly',true);
view(DG)
0 Comments
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!