How to draw a circle in MATLAB? This is a commonly asked question from many MATLAB beginners. Here is the MATLAB code to plot a circle. The transfer characteristics between the sine wave and cosine wave will give a circle. So here first we define sine and a cosine wave, then plotting a circle in MATLAB becomes so simple, just plot the sine Vs Cosine. Following are the codes for the MATLAB circle plot. The codes are well commented on for easy interpretation.
Matlab Circle Codes
clc; clear all; close all; t=0:0.001:1; s=sin(2*pi*2*t); c=cos(2*pi*2*t); plot(s,c);%Plotting sin Vs cos axis('equal');%Equal length fox X and Y axis
The Output of Matlab Circle Code
A circle can also be plotted using the concept of polar coordinates. But using sine and cosine trig functions in this regard is a brilliant idea, and exceptional indeed.