下面是從我的終端打印輸出,當我創建兩個向量的向量。有誰知道第二次撥打ones()發出警告的原因,而第一次沒有?不明原因的警告創建矢量
>> p1
p1 =
0.7000
>> p2
p2 =
0.3000
>> whos p1
Name Size Bytes Class Attributes
p1 1x1 8 double
>> whos p2
Name Size Bytes Class Attributes
p2 1x1 8 double
>> N
N =
100
>> T1 = ones(N*p1,1);
>> T2 = ones(N*p2,1);
Warning: Size vector should be a row vector with integer elements.
相關問題:[關於浮點精度:爲什麼迭代次數不相等?](http://stackoverflow.com/questions/6477178/about-floating-point-precision-why-the-iteration-numbers- (也檢查鏈接的問題) – Amro