2016-01-31 31 views
0

是否有人知道如何繪製圖像中左上角的Dirac函數和給出的正弦函數。我設法輕鬆地繪製第二和第三。你會用分段函數做這個還是有一個簡單的方法來繪製#1和#4?非常感謝你!楓葉圖函數

Arbitrary Excitations

回答

0

如果是這樣的功課,然後我想,對於竇比如你被要求調查的規模和漂移的影響。

考慮這些情節,一個接一個。觀察它們的不同之處。首先,我將幅度(y方向)縮放10倍。然後我沿x方向縮放。最後我轉向x方向。

plots:-setoptions(size=[300,0.6],tickmarks=[decimalticks,default]): 
plot(10*sin(x), x=0 .. Pi, view=[0..Pi, 0..18]); 

enter image description here

plot(10*sin(x*Pi), x=0 .. 1, view=[0..1, 0..18]); 

enter image description here

plot(10*sin(x*Pi/0.3), x=0 .. 0.3, view=[0..1, 0..18]); 

enter image description here

plot(10*sin((x-0.1)*Pi/0.3), x=0.1 .. 0.4, view=[0..1, 0..18]); 

enter image description here

plots:-setoptions(); 

它可以看起來類似於你很容易鏈接的圖像中的第4個圖。您可以嘗試使用或不使用各種選項。

P:= plot(10*sin((x-0.1)*Pi/0.3), x=0.1 .. 0.4 
      , axes=none 
      , color=black 
      , size=[300,0.7] 
      , thickness=2 
     ): 

plots:-display(P 
       , view=[0.0 .. 0.6, 0..18] 
       , tickmarks=[[0.1,0.4],[10=10*N]] 
       , axes=normal, labels=[`t[s]`,`F(t)`] 
       , size=[300,0.6] 
      ); 

enter image description here

而且隨着更多的努力可以取得更匹配,在視覺上。

plots:-display(P 
      , plottools:-arrow([0,0],[0.6,0], 0.05, 0.9, 0.05) 
      , plottools:-arrow([0,0],[0,16], 0.001, 0.02, 0.08) 
      , plots:-textplot([0.6, -3.5, `t[s]`, font=["courier",16]]) 
      , plots:-textplot([0.0, 18, `F(t)`, font=["courier",16]]) 
      , seq(plots:-textplot([X, -1.5, X]), X=[0,0.1,0.4]) 
      , plots:-textplot([-0.05, 10, "10 N"]) 
      ); 

enter image description here

您的其他情節,你可以簡單地繪製線的序列。

T:=table([1=60,2=100,3=0,4=20]): 
P2:=seq(plottools:-line([i,0],[i,T[i]],thickness=2,color=black), 
     i=1..4): 

而且你可以像上面那樣調整最終情節的外觀和感覺。我會把它留給你。

plots:-display(P2 
       , size=[300,0.7] 
       , view=[0..6, 0..120] 
       , labels=["",""] 
      ); 

enter image description here

+0

非常感謝隊友!幫了我很多:) – MatlabNewb