• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Circuits Gallery

Circuits Gallery

All about Electronics and Circuits

  • Home
  • Basics
    • Components
    • Oscillators
    • Waveform Generators
  • Project
    • Using 555 Timer
    • Using Op-Amp
  • MicroController
    • PIC
  • Arduino
  • Simulation
    • Matlab
    • Proteus
  • Digital
    • Counters
  • Communication
  • How To
  • About Us

How to Plot Concentric Circles in Matlab: Getting Started With Matlab

May 15, 2022 by Charles Clark Leave a Comment

How to draw concentric circles in MATLAB? Here we come with the solution! Here is the MATLAB code for concentric circles. It plots 3 circles on a same window. The logic behind this program is quite simple, that is we know that the transfer characteristics between Sine wave and Cosine wave will produce a circle. The same idea us used here also. We has already discussed how to plot a circle using MATLAB earlier. In this post we are going to plot three concentric circles with different radius in MATLAB. Amplitude determine the radius of the circle. Green font color comments are given next to each code for better understanding.

Matlab Code for Concentric Circles

[cc lang=”Matlab”]clc;%Clear screen
clearall;%Clear all varibles
closeall;%Close all unwanted windows
t=0:0.001:1;%Initializing time samples
%Transfer chara of sine and cosi.e sin Vs Cos will give circle
%Here we are plotting group of sine Vscos with differnt amplitudes
s1=3*sin(2*pi*t);%Sine wave with amplitude=3unit
c1=3*cos(2*pi*t);%Cosine wave with amplitude=3unit
s2=2*sin(2*pi*t);
c2=2*cos(2*pi*t);
s3=1*sin(2*pi*t);
c3=1*cos(2*pi*t);
plot(s1,c1,s2,c2,s3,c3);%Plotting sin Vs Cos
gridon;%Enable grid lines
axisequal;%Equal width of X and Y axis[/cc]

Conclusion

Hope this code works fine for you to build a concentric circle within seconds.

Filed Under: Matlab

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

More To See

Capacitor vs Inductor

Capacitor vs Inductor | Passive Components Comparison

How to Determine Line and Load Wires

How to Determine Line and Load Wires?

How to Ground a Subpanel in a Detached Building

How to Ground a Subpanel in a Detached Building

electron_moving

What Happens When Electrons Move from One Object to Another by Direct Contact?

  • Arduino
  • Basics
  • Communication
  • Components
  • Counters
  • Digital
  • How To
  • Matlab
  • MicroController
  • Oscillators
  • PIC
  • Project
  • Proteus
  • Simulation
  • Using 555 Timer
  • Using Op-Amp
  • Waveform Generators

Footer

QUICK LINKS

  • About Us
  • Privacy Policy
  • Terms and Conditions
  • Contact
  • Arduino
  • Basics
  • Communication
  • Components
  • Counters
  • Digital
  • How To
  • Matlab
  • MicroController
  • Oscillators
  • PIC
  • Project
  • Proteus
  • Simulation
  • Using 555 Timer
  • Using Op-Amp
  • Waveform Generators

AFFILIATE DISCLOSER

Circuits Gallery is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for website owners to earn advertising fees by advertising and linking to amazon (.com, .co.uk, .ca etc) and any other website that may be affiliated with Amazon Service LLC Associates Program

© 2022 · Circuits Gallery | All Rights Reserved