No line on my graph
    5 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I tried plotting modz as a function of log10w but there is no line on my graph w=0.001:1000 modz=sqrt((w.^0.5 + 20*cos(pi/8)*w.^0.25 + 100)/(1+ 2*cos(pi/8)*w.^0.25 +w.^0.5)) W=log10(w) figure(3) plot(W,modz)
0 件のコメント
回答 (1 件)
  Star Strider
      
      
 2017 年 11 月 5 日
        You need to vectorise (do element-wise calculations) in your ‘modz’ calculation. This means substituting ‘./’ for /:
modz=sqrt((w.^0.5 + 20*cos(pi/8)*w.^0.25 + 100)./(1+ 2*cos(pi/8)*w.^0.25 +w.^0.5));
                                               ↑
That will work.
0 件のコメント
参考
カテゴリ
				Help Center および File Exchange で Graph and Network Algorithms についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

