A quick word on blocking ads

It looks like you are using an ad blocker. That's okay. Who doesn't? But without advertising revenue, we can't keep making this site awesome. Click the link below for instructions on disabling adblock.

How to disable ad-blocker for Newschoolers

  • Home
  • News
    • Latest
    • Top Rated
    • Features
    • Podcasts
    • Tags
    • Interviews
    • Event Coverage
    • Opinions
    • Industry News
    • Gear
  • Forums
    • Categories
    • Ski Gabber
    • Non-Ski Gabber
    • Site Discussion
    • Media & Arts
    • Gear
    • Lady Gabber
    • Content Creators
    • AT & Backcountry
    • Regionals
  • Gear
    • Gear Guide 2024-25
    • Gear Guide 2023-24
    • The Roofbox Reviews
    • Editors' Picks
    • Gear Talk
  • Buy/Sell
    • Map View
  • Photos
    • Latest
    • Top Rated
  • Videos
    • Latest
    • Top Rated
    • Ladies
  • Store
  • More
    • Terrain Parks Guide
    • Contests
    • NS Giveaway
    • Top Rated Members
  • Search
  • Login
  • Login

Login to Newschoolers

Register Lost password?

Search Newschoolers

Preview

LOADING...
  • Forums
  • Non-Ski Gabber
  • Engineering students please help. MatLab
  • Reply

Replying to Engineering students please help. MatLab

smooticus:
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

Click to expand post

Follow Us

Newsletter

Subscribe to our newsletter and stay up-to-date with the latest news from Newschoolers and our partners

Subscribe
Register Contact Advertise Privacy Policy Terms of Use
Newschoolers has affiliate partnerships so we may receive compensation for some links to products and services.
© 2025 NEWSCHOOLERS, INC.
NEWSCHOOLERS is a registered trademark of NEWSCHOOLERS, INC.
  • Bike
  • Fantasy Surfer
  • Newschoolers
  • Powder
  • Ridemonkey
  • Snowboarder
  • Surfer
  • TransWorld Skateboarding