Problem of reading file in triangle_display.m software

조회 수: 1 (최근 30일)
ali algargary
ali algargary 2022년 7월 17일
편집: ali algargary 2023년 1월 14일
I am working on mesh displaying open source matlab code. When I make a run it gives me the following errors. The code and files are attached below with the error messages.

채택된 답변

KSSV
KSSV 2022년 7월 18일
You may proceed like shown below.
nodes = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1068640/aaa_ele.txt','HeaderLines',1) ; % read the nodal data
vert = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1068645/aaa_node.txt','HeaderLines',1); % read the vertices data
% Remove the last lines
nodes(end,:) =[] ; % last line has some text, remove it
vert(end,:) = [] ; % last lines has some text, remove it ;
t = table2array(nodes(:,2:4)) ; % nodal connectivity data
p = table2array(vert(:,2:3)) ; % coordinates/ vertices
triplot(t,p(:,1),p(:,2)) ; % plot the mesh

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by