print output in table format and print the max value
Ältere Kommentare anzeigen
clear all
clc
% Density, kg/m^3
rho=210;
T=2.5;
% Volume , m^3
V=0.018457;
% Diameters, m
for D= [0.05 0.10 0.15 0.20]
% Height, m
H=(V/D^2)*(4/pi);
% Specific rate, kg/m^2h
SR=(H*rho)/T;
fprintf('Dia :%d Height :%d SR :%d\n', [D H SR].')
end
Output Result:
Dia :0.05 Height :9.40007 SR :789.606
Dia :0.1 Height :2.35002 SR :197.402
Dia :0.15 Height :1.04445 SR :87.734
Dia :0.2 Height :0.587505 SR :49.3504
But i need to print the output results like below:

Also need to print, the optimum value is: (Maximum SR value)
Dia: 0.05 Height: 9.40007 SR: 789.606
Akzeptierte Antwort
Weitere Antworten (1)
Senthil
am 30 Dez. 2018
0 Stimmen
Kategorien
Mehr zu Other Formats finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!