看板 MATLAB 關於我們 聯絡資訊
x = 0:0.1:4*pi; subplot(2, 2, 1); plot(x, sin(x)); % 此為左上角圖形 subplot(2, 2, 2); plot(x, cos(x)); % 此為右上角圖形 subplot(2, 2, 3); plot(x, sin(x).*exp(-x/5)); % 此為左下角圖形 subplot(2, 2, 4); plot(x, x.^2); 請問一下 位什麼sin(x). 和 x. 右下角藥有一個點 沒點跑不出圖@@ 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.150.41
DKer:是 .* 跟 .^2 11/08 11:33
becherovka:element by element array operation 11/08 12:53
Gwaewluin:你的x是1x126的向量,只能和126x1的矩陣相乘 11/08 14:17
Gwaewluin:多加上一個.表示這非矩陣運算,而是對應位置元素的運算 11/08 14:18
gary27:pointwise Multiplication 11/08 16:52