MATLAB Exercises Help: Solve Series RC Circuit & Plot Circle

  • Thread starter Thread starter apollon
  • Start date Start date
  • Tags Tags
    Exercises Matlab
Click For Summary
SUMMARY

The discussion revolves around solving two MATLAB exercises related to a series RC circuit and plotting a circle. The first exercise requires plotting the capacitor voltage over time using the equation Vc(t) = E(1 - e^(-t/x)), with E set to 10V, R at 1000 ohms, and C at 1mF, over a time span of 0 to 6 time constants. The second exercise involves creating a program that prompts the user for the circle's center coordinates, radius, and number of points, then plots the circle using trigonometric functions and provides options to calculate the area and circumference.

PREREQUISITES
  • Basic understanding of MATLAB programming
  • Knowledge of RC circuit theory and capacitor voltage equations
  • Familiarity with trigonometric functions and their application in plotting
  • Experience with MATLAB's linspace function for generating vectors
NEXT STEPS
  • Learn how to use MATLAB's plotting functions, specifically plot and hold on
  • Study the MATLAB syntax for defining functions and user input handling
  • Explore MATLAB tutorials focused on electrical engineering applications
  • Research the mathematical formulas for calculating the area and circumference of a circle
USEFUL FOR

This discussion is beneficial for students new to MATLAB, particularly those studying electrical engineering or mathematics, as well as educators looking for practical examples to teach MATLAB programming concepts.

apollon
Messages
1
Reaction score
0
Hello guys I'm totally new to MATLAB and i would like help solving the problems i have with my homework,I have these two excercises and don't even know where to begin

1st:
When a dc voltage E volts is switched on a cross a series RC circuit at t=0(s),the variation of the capacitor voltage with time is given by
Vc(t)=E(1-e^(-t/x)
x=R*C
E=10V
R=1000 oms
C=1mF
I need to use MATLAB to plot the voltage across the capacitor for t=0 to 6 time constants

2nd:
I need to develop a program to perform the following tasks :
1.Draw a circle on a 2-d plan,make your program promt te user for the following values:(a,b) is the centre of circle,radius r and number of points N.

Hint:you need to start by creating a vector of angels(use linspace function)
Equation of circle using the trigonometric functions sine and cosine as
x=a+rcost
y=b+rsint

2.After plotting the circle create a menu wuth two options.
If the user enters option 1 the program calculates the area of the plotted circle
If the user enters option 2 the program calculates the circumference of the circle


I need to do this homework as soon as possible,I missed the classes tha were teaching these stuff due to being sick and I'm now in risk of being hold back a year,any help would greatly appreciated
 
Physics news on Phys.org
You have not made any attempt at answering your homework questions yourself. We are not here to do your homework for you, we will help, however, if you make an attempt at doing it for yourself. If you are completely new to MATLAB then the first thing you need to do is follow a MATLAB tutorial, either online or following the help in the MATLAB program itself. Then you need to make an attempt and solving the problems and report back to us when you get stuck. Cheers
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
15K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K