Filter löschen
Filter löschen

Having some error while using doLayout, will appreciate any help. Incorrect number or types of inputs or outputs for function 'doLayout'.

2 Ansichten (letzte 30 Tage)
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)

Antworten (1)

Meet
Meet am 8 Mär. 2023
Hi,
The function dolayout has been removed with MATLAB R2022b. This may be the cause of the error that you are getting. Instead, you can use the layout method for changing the layout of graph objects.
Please refer layout documentation for more details.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by