|
s <webmaster@srsteel.co.uk replace webmaster with simon to reply.> wrote in
message news:b4362c$oeo$1$8302bc10@news.demon.co.uk...
> fprintf(1, '\nDeltaPt = %11.4e N/m^2\n', DeltaPt)
>
> what does the %11.4e do?
>
>
It denotes the C-style format for fprintf or sprintf to print. The format is
as follows:
%11.4e
% is the start of a conversion specification
The number 11 denotes the minimum field width, in this case 11 characters
(but you could use 99 if you wanted to too);
.4 (with the point) denotes the precision, so (in this case) 4 decimal
places.
e is the conversion character, and the e means scientific notation (1e3 in
stead of 1,000)
Of course, the value of the argument (DeltaPt) will be put in the specified
format. Nifty feature :-)
There are many more conversion characters (like %d, %i, %o etc.). Look up in
a C book what each does and look in the matlab help what the differences are
between the conversions in C and those in Matlab.
hth
--
Robert Bronsing
Can't you see?
It all makes perfect sense,
expressed in dollars and cents, pounds, shillings and pence
(R. Waters)
|