how can I plot a cartesian grid grid of 100*30 size with stretching in matlab
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is that code correct ? also
close all;
clc;
Mi=0.5;
T=300;
P=1;
gamma = 1.4;
R=287;
vinf = sqrt(gamma*R*T)*Mi;
Nx = 100; % x dimension
Ny = 30; % y dimension
Nxy= Nx*Ny;
% step sizes
dx = 1;
dy = 1;
x = 1:dx:Nx; % x axis
y = 1:dy:Ny; % y axis
%set grid location
for j=1:Ny
for i=1:Nx
x(i)=single(i-1)*dx;
y(j)=single(j-1)*dy;
end
end
0 Kommentare
Antworten (1)
Ameer Hamza
am 18 Mär. 2020
I guess you want something like this
[x,y] = meshgrid(1:100, 1:30);
4 Kommentare
Siehe auch
Kategorien
Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!