Hello, for an assignment I must calculate the reynold's number given multiple different inputs and output a plot of the temperature versus reynolds number for four different fluid velocity inputs. My code is as given
function [] = reynoldsnumber(InitialT, FinalT, Tinc, InitialV, FinalV,Vinc, FluidDensity, PipeDiameter, ActivationE, EntropicFactor)
R= .008314; Ts=InitialT+273.15; Tf=FinalT+273.15; Ti=Tinc; Vs=InitialV; Vf=FinalV; Vi=Vinc; FD=FluidDensity; PD=PipeDiameter; AE=ActivationE; EF=EntropicFactor; T = [Ts:Ti:Tf]; V = [Vs:Vi:Vf]; i=0; while i<=4; for V = Vs:Vi:Vf for T = Ts:Ti:Tf
i = i+1; Mu = exp((EF+(AE./(R.*T)))); RN = (FD.*V.*PD)./Mu LineNum(i)= plot (T,RN,'.','MarkerSize',10); hold all end end
end
xlabel('Temperature (K)') ylabel('Reynold''s number') title('Reynold''s Number Versus Temperature for Varying Fluid Velocities') legend('Linenum1', 'Linenum2', 'Linenum3', 'Linenum4', 'Location', 'NorthWest')
end
My problem is that this plots my marker points with the color varying by "column" of data rather than by each curve of points having different colors. I tried using a while loop so that each iteration of my for loop would change but it had the same result. My final plot looks like this.
Any advice?
Thanks
Best Answer