graph - Plotting with a For loop in Matlab -
I have created a code that uses a loop to define values of TI and T when I change the variable I plot all my points as a scatter plot and I want to plot a line of the best fit in the linear data. However, the data is being portrayed as everything, as they set their data.
Code>% Heat Transfer% I is passing through current conductor I = 475; % H Vascular Heat Transferrer [W / M ^ 2 * Transfer] H = 10; Diameter of% D conductor is [m] d = 0.02364; % O Stephen-boltzmann constant is [w / m ^ 2 * k ^ 4] o = 5.67 * (10 ^ -8); % E is the emissivity coeffcient of conductor E = 0.2; % U is the absorption partner of the conductor = 0.5; % G solar block G = 1200; The resistance of% R conductor is R = 0.0000864 per meter; % Cue conductor% q = u * d * g has solar radiation; % Kg is the black loss produced internally Qg = i ^ 2 * r; % QC conductor% QC = H * Pi * D * (T-Ti) is vascular energy; % QR conductor% is the energy coming out of Q = o * E * D * (T ^ 4 - Ti 4 ^ 4); Ti = 213: 1: 313A = @ (T) (for the HPI * D * (T-TI)) temperature of conductor [T] is. * E * D * Pie * (T ^ 4 - Ti ^ 4) - ((U * D * G) + (I ^ 2 * R)); T = Faizo (A, 0); % Fprintf ('The conductor's temperature is:% .2f K when the external temperature% gK \ n', t, ti) grabs the end% i want to plot (ti, t)
TimeWeek = 213: 313; Yvect (1, length of time) = 0; For IE = 1: Length (timeWeight) TI = TimeWeight (ii); A = @ (t) (h * pi * d * (t-ti)) + (o * e * d * pi * (t ^ 4 - ti ^ 4)) - ((u * d * g) + ( I ^ 2 * r)); T = Faizo (A, 0); Yvect (ii) = t; End plot (timeWeight, uvect) Note that now in the plot, at the time of its axis the data is also in vector and ydata. You plot the scalar for the loop Were there.
Comments
Post a Comment