why is my table not showing fprintf

2 views (last 30 days)
%this F works by it self as a 3 columns 21 rows but when i put it on fprintf to display it %just gives me >> 0 or gives me nothing underneath the table label. another problem and did the samething but in the other one works!
P = linspace(0,400,21); % first column '
V = 1;
R = 0.08314472;
n = 2;
t1 = @(P) (P.*V)/(n*R);
Ti = t1(P); %second column dont forget to '
Ti'
R = 0.08314472; n = 2; P1 = 220; a = 5.536; b = 0.03049;
V = linspace(0.1,10,21);
t2 = @(V) (P1+((n.^2*a)./(V.^2)).*(V-n.*b)/n.*R)
Tvw = t2(V) %third column and transpose
F = [P;Ti;Tvw]'; %this F works by it self as a 3 columns 21 rows
fprintf('\n P T_i T_vw \n') fprintf('\n--------------------------------------\n') fprintf('%2.0 %12.4f %12.4f,\n', F)

Accepted Answer

Image Analyst
Image Analyst on 4 Oct 2014
Try
fprintf('%.0f %12.4f %12.4f,\n', F)
  1 Comment
Jorge
Jorge on 4 Oct 2014
sweet!! thanks to both of you!!!! thanks god i thought i was completely wrong!!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!