有谁知道在VC中有matlab中“%”都有哪些用法,越细越好,我现在对%很迷惑呀!

来源:百度知道 编辑:UC知道 时间:2024/06/06 05:29:55
我现在正在用VC和matlab,特别是matlab里面,有很多输出都用到了%,我不知道它的原理,所以不知道该怎么用,只能照例子来,没例子就不会了。有谁了解这个比较多的,帮一忙呀!只了解一个方面的也行!

如果在matlab输出里应用%,跟C中一样

%cSingle character
%dDecimal notation (signed)
%eExponential notation (using a lowercase e as
in 3.1415e+00)
%EExponential notation (using an uppercase E as
in 3.1415E+00)
%f Fixed-point notation
%g The more compact of %e or %f,
as defined in [2]. Insignificant zeros do not print.
%GSame as %g, but using an uppercase E
%oOctal notation (unsigned)
%sString of characters
%uDecimal notation (unsigned)
%xHexadecimal notation (using lowercase letters a–f)
%XHexadecimal notation (using uppercase letters A–F)

另外%还表示注释和求余

楼上的说法有误,%在vc和MATLAB用法不同的