So a piece of this program i am making is driving me fucking crazy i cant get it to work.
This piece is in my main .m file, I am using a self written function called bandpass.m to find the frequency of input signals in a bandpass
type bandpass.m
disp(' ') %Standard format
w1 = linspace(10^(-2), 10^7);
R1 = input(' Enter the value of R in ohms (1100)', 's')
C1 = input(' Enter the value of C in Farads (9e-6)', 's')
L1 = input(' Enter the value of L in Henrys (7e-3)', 's')
RC = bandpass(R1,C1,L1,w1)
disp('------------------------
And this is the function file
function RV = bandpass(R,C,L,w)
%bandpass calculates the output/input ration of voltage magnitudes
%for a band-pass filter using a resistor, capacitor, and inductor.
% Units: R in ohms, C in Farads and L in Henrys
RV = (w.*R.*C)./(sqrt.((1-w.^2.*L.*C).^2+(w.*R.*C).^2))
Im a freshmen and this is my first term using matlab so be gentle. Its giving me two errors, the first is within the function, saying there is a multiplication error within my arrays. The whole period thing kinda confuses me, hence i just threw them everywhere.
The second error just says: Error in RC = bandpass(R1,C1,L1,w1)
Should i not rename the variables here.
+k