Hello I'm having trouble with this assignment, I don't understand how the plot function works for ordered pairs. I undertand that the points of the line would be the origin(0,0) and (x = cos(theta) . y = sin(theta)).

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question

Hello I'm having trouble with this assignment, I don't understand how the plot function works for ordered pairs. I undertand that the points of the line would be the origin(0,0) and (x = cos(theta) . y = sin(theta)).

Editor - C:\Users\brent\OneDrive\Desktop\Assignment_1.m
Assignment_1.mx ScratchPaper.mx untitled3.mx | + |
1
2
3
4
5
6
7
8
9
10
11
12
BHALDRA222222
14
15
20
21
% Animate the motion of a point in a cirlce
theta 0:pi/150:2*pi;
y = sin(theta);
x = cos (theta);
=
for i=1:length(theta)
circle = plot(x(i),y(i), 'o', 'LineWidth', 2);
hold on
end
plot(x(1:1),y(1:i), 'linewidth', 2)
axis ([-2 2, -2 2]);
grid on
pause (0.001);
if i = length(x);
N=
clf
end
% Animate the motion of a line in a circle
% Animate the motion of a slider-crank mechamism
Command Window
New to MATLAB? See resources for Getting Started.
fx >>
Zoom: 110%
UTF-8
CRLF script
Ⓒ X
A circle
Hi
T
Ⓒ
Workspace
Name
X
origin_coordinate...
origin_coordinate...
theta
X
y
Ln 24
Value
1x1 Line
301
1x41 double
1x41 double
1x301 double
1x301 double
1x301 double
Col 1
Ⓒ
Transcribed Image Text:Editor - C:\Users\brent\OneDrive\Desktop\Assignment_1.m Assignment_1.mx ScratchPaper.mx untitled3.mx | + | 1 2 3 4 5 6 7 8 9 10 11 12 BHALDRA222222 14 15 20 21 % Animate the motion of a point in a cirlce theta 0:pi/150:2*pi; y = sin(theta); x = cos (theta); = for i=1:length(theta) circle = plot(x(i),y(i), 'o', 'LineWidth', 2); hold on end plot(x(1:1),y(1:i), 'linewidth', 2) axis ([-2 2, -2 2]); grid on pause (0.001); if i = length(x); N= clf end % Animate the motion of a line in a circle % Animate the motion of a slider-crank mechamism Command Window New to MATLAB? See resources for Getting Started. fx >> Zoom: 110% UTF-8 CRLF script Ⓒ X A circle Hi T Ⓒ Workspace Name X origin_coordinate... origin_coordinate... theta X y Ln 24 Value 1x1 Line 301 1x41 double 1x41 double 1x301 double 1x301 double 1x301 double Col 1 Ⓒ
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Engineering Drawing
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY