How to print variable into different rows?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
f = COF_S / C_ratio; % Coefficient of friction, f
e = Eccen_Rat_S ; % Eccentricity Ratio, e
Q = FV_S * r * c * N * L; % Lubricant Flow Rate, Q (m^3/s)
Qs = FR_S * Q ; % Lubricant Side Flow Rate, Qs (m^3/s)
Tmax = Temp_in + delta_T ; % Maximum Temperature, Tmax (°C)
ho = (MFT_S)*c; % Minimum Film Thickness,ho (m)
Phi = Pos_MFT_S ; % Position of minimum film thickness (deg)
Term_pos = TPF_S ; % Terminating position of film (deg)
Max_FP = P/(MFP_S); % Maximum Film Pressure, Pmax (Pascal,Pa)
pos_max_FP = PFMP_S ; % Position of maximum film pressure (deg)
T = f*W*r ; % Friction Torque, T (N.m)
Hp = (T*(N*60))/9550; % Frictional Horsepower, (hp)ƒ in(hp)
I was wondering on how to display/ print these variables into rows . I mean once I have run the script, I want to display all these variables with its respective values.
1 Commento
Risposta accettata
Adam Danz
il 7 Ago 2019
Modificato: Adam Danz
il 8 Ago 2019
If you just want to display the variables in the command window, merely list the variables without a terminal semicolon which would normally suppress the display.
f = COF_S / C_ratio; % Coefficient of friction, f
e = Eccen_Rat_S ; % Eccentricity Ratio, e
Q = FV_S * r * c * N * L; % Lubricant Flow Rate, Q (m^3/s)
Qs = FR_S * Q ; % Lubricant Side Flow Rate, Qs (m^3/s)
Tmax = Temp_in + delta_T ; % Maximum Temperature, Tmax (°C)
ho = (MFT_S)*c; % Minimum Film Thickness,ho (m)
Phi = Pos_MFT_S ; % Position of minimum film thickness (deg)
Term_pos = TPF_S ; % Terminating position of film (deg)
Max_FP = P/(MFP_S); % Maximum Film Pressure, Pmax (Pascal,Pa)
pos_max_FP = PFMP_S ; % Position of maximum film pressure (deg)
T = f*W*r ; % Friction Torque, T (N.m)
Hp = (T*(N*60))/9550; % Frictional Horsepower, (hp)ƒ in(hp)
% LATER IN YOUR CODE
% Without the semicolon at the end (;), these variable names and their values
% will all display in the command window.
f
e
Q
Qs
Tmax
ho
Phi
Term_pos
Max_FP
pos_max_FP
T
Hp
Another alternative is to collect the variables into cell array for a more compact display
c = {'f', f;
'e', e;
'Q', Q};
disp(c) % display c in command window
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su General Applications in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!