フィルターのクリア

Not enough input arguments - something simple i'm sure

2 ビュー (過去 30 日間)
Tom
Tom 2012 年 1 月 27 日
I'm getting the above error when trying to execute this code,
close all
clear all
m = 0.05; %mass of cone and coil together (Kg)
k = 1000; %stiffness (N/m)
R = 1; %damping (Ns/m
F = 1; %Force amplitude (N)
t = 0.01; %Time of the snapshot
f = linspace(0,99,10000); %frequency (Hz)
Zm = abs(R + 1i.*(m*2*pi.*f-k./(2*pi.*f))); %mechanical impedance
Xm = m*2*pi.*f - k./2*pi.*f; %mechanical reactance
th = atan*(Xm/R); %phase angle
us = F.*cos(2*pi*f*t-th); %velocity response
What are arguments anyway? (apart from the obvious)
  1 件のコメント
Matt Fig
Matt Fig 2012 年 11 月 2 日
I'm getting the above error when trying to execute this code,
close all clear all m = 0.05; %mass of cone and coil together (Kg) k = 1000; %stiffness (N/m) R = 1; %damping (Ns/m F = 1; %Force amplitude (N) t = 0.01; %Time of the snapshot f = linspace(0,99,10000); %frequency (Hz) Zm = abs(R + 1i.*(m*2*pi.*f-k./(2*pi.*f))); %mechanical impedance Xm = m*2*pi.*f - k./2*pi.*f; %mechanical reactance th = atan*(Xm/R); %phase angle us = F.*cos(2*pi*f*t-th); %velocity response
What are arguments anyway? (apart from the obvious)

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2012 年 1 月 27 日
atan*(Xm/R) should be atan(Xm/R)
The expression as written is the same as
atan() * (Xm/R)
which is calling atan with no arguments (parameters)
  1 件のコメント
Tom
Tom 2012 年 1 月 27 日
Brilliant thanks Walter
Tom

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by