Calculating the circulation given specific parameters
9 次查看(过去 30 天)
显示 更早的评论
I am trying to calculate the circulation using the following code. Although the code works, the calculated data doesn't make sense as I get a linear plot. I would also like to create a image plot, if possible. Any help would be greatful!
close all;
clear all;
clc;
h = 200; % height of stack in meters
z = (0:10); % average wind in the vertical
mr = 2.5; % mean mixing ratio
sigmaz = z*mr; %vertical mixing
dt = (24:72)*60*60; %change in time
for i = 1:length(z)
for j = 1:length(dt)
c = exp(-(z+h).^2.)/((2*sigmaz.^2))./dt;
end
end
plot((1:numel(dt)),(1:numel(c)))
采纳的回答
Matt J
2023-11-14
编辑:Matt J
2023-11-14
Perhaps this is what you meant. The expression for c looks like it's supposed to be Gaussian, and the double for-loop suggests this is supposed to be a surface plot.
h = 200; % height of stack in meters
z = (0:10); % average wind in the vertical
mr = 2.5; % mean mixing ratio
sigmaz = z*mr; %vertical mixing
dt = (24:72)'*60*60; %change in time
c = exp( -0.5 * ( (z+h)./sigmaz).^2 )./dt;
surf(z,dt,c)
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!