matlab获得邻接矩阵,matlab – 从其邻接矩阵绘制图形

这段代码展示了如何在Matlab中利用邻接矩阵`A`和坐标矩阵`xy`来绘制图论中的图形。`gplot3`函数通过查找非零元素来确定节点间的连接,并生成用于绘图的线段。返回的`Xout`, `Yout`, `Zout`分别代表3D坐标中的x、y、z轴数据。用户可以选择线型和颜色,或者仅获取坐标数据以供后续使用。" 111758136,10295858,使用CATIA编程创建几何对象,"['三维建模', 'CAD编程', 'CATIA API', '特征创建']
摘要由CSDN通过智能技术生成

请在

Haruna Matsushita之前检查此Matlab功能

function [Xout,Yout,Zout]=gplot3(A,xy,lc)

% gplot‚Ì3ŽŸŒ³•\Ž¦

%

% 2005/04/11 Haruna MATSUSHITA

%GPLOT Plot graph, as in "graph theory".

% GPLOT(A,xy) plots the graph specified by A and xy. A graph, G, is

% a set of nodes numbered from 1 to n, and a set of connections, or

% edges, between them.

%

% In order to plot G, two matrices are needed. The adjacency matrix,

% A, has a(i,j) nonzero if and only if node i is connected to node

% j. The coordinates array, xy, is an n-by-2 matrix with the

% position for node i in the i-th row, xy(i,:) = [x(i) y(i)].

%

% GPLOT(A,xy,LineSpec) uses line type and color specified in the

% string LineSpec. See PLOT for possibilities.

%

% [X,Y] = GPLOT(A,xy) returns the NaN-punctuated vectors

% X

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值