Plot from 26 by 20 matrix vs a 2D matrix
Show older comments
Hi, I am having trouble with plotting five figures from one 26 by 20 matrix, where the first four columns denote the y coordinates of the four lines of the first figure, the second four columns denote the y coordinates of the four lines of the secong figure, etc. However the x coordinates are stored in a 2D 26 by 5 matrix where the first column denotes the x coordinate for the first figure, the second column for the second figure, etc. I have tried something as follows:
for i5 = 0:N1:(N1*N1)
%h1 = h(:,i5+1);
%h2 = h(:,i5+2);
%h3 = h(:,i5+3);
%h4 = h(:,i5+4);
lnNu_r1 = lnNu_r(:,i5+1);
lnNu_r2 = lnNu_r(:,i5+2);
lnNu_r3 = lnNu_r(:,i5+3);
lnNu_r4 = lnNu_r(:,i5+4);
% lnNu vs lnRe for effect of Ctflow
figure(i5+2)
plot(lnRe_phi(:,i5+1),lnNu_r1,'+')
hold on
plot(lnRe_phi(:,i5+1),lnNu_r2,'+')
plot(lnRe_phi(:,i5+1),lnNu_r3,'+')
plot(lnRe_phi(:,i5+1),lnNu_r4,'+')
hold off
title('Variation of ln(Local Nusselt Number) vs ln(Local Reynolds Number)')
xlabel('ln(Re_\phi)')
ylabel('ln(Nu_r)')
legend('{C}_{{w}_{1}}','{C}_{{w}_{2}}','{C}_{{w}_{3}}','{C}_{{w}_{4}}')
grid
end
I think the issue lies about how the lnRe_phi is called but I have run out of ideas on how to do so.
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



