Engineering students please help. MatLab

smooticus

Active member
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.mdisp(' ') %Standard formatw1 = 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 HenrysRV = (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
 
this i just finished up my CE degree and i hated anything and everything about MatLab. I took my intro to matlab class 3 times before i passed, and i was a really good student in all other classes
 
fuck all of that. i just learned to use Excel and my TI89 titanium in creative ways. I seriously think you can do almost everything in Excel
 
its beautiful cause i will never have to do that. All i need to know is CAD, VA, SAP, Excel, and various GIS programs.

Again....FUCK MATLAB! Cheat your way through the class, like seriously pay a smart looking dude $10 for his homework.

unless youre an EE, then you actually have to learn that shit
 
Back
Top