필터 지우기
필터 지우기

how to get Coordinatee in this program

조회 수: 3 (최근 30일)
adem ski
adem ski 2021년 5월 8일
hi i want help for get coordinatee for each maille in this program
for exampl the first maille
1 2
8 9
the second
2 3
9 10
clc
clear all
close all
format short
a=6;b=6;
dx=1; %Le nombre de division suivant x nelx
dy=1;
global T_Coord scalex scaley
xlimit=-2;
ylimit=-2;
Nx=(a/dx)+1; %Le nombre de node suivant X
Ny=(b/dy)+1; %Le nombre de node suivant y
Nt=Nx*Ny; %Le nombre de node total
Nmx=(a/dx);
Nmy=(a/dy);
Nmt=Nmx*Nmy;
Cx=0;
Cy=0;
NumNd=0;
for Ix=xlimit:(a+xlimit);
Cx=(Ix);
for Iy=ylimit:(b+ylimit);
Cy=(Iy);
NumNd=NumNd+1;
T_Coord(1,NumNd)=NumNd;
T_Coord(2,NumNd)=Cx;
T_Coord(3,NumNd)=Cy;
end
end
figure
hold on
x=T_Coord(2,:);
y=T_Coord(3,:);
Coord=[x;y]';
plot((x),(y),'.')
sx=x(1,end)+scalex;
sy=y(1,end)+scaley;
axis ([sx -scaley sy]);
%
title ('Maillage');
%
for ti=1:Nt;
text(Coord(ti,2),Coord(ti,1),num2str(ti),'Color','k','FontSize',12)
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by