Problem 3: Ask MATLAB to generate a random integer C between 0 to 100. If C is greater then 50, draw a heart shape in the pop-up figure window. If C is less then 50, draw a trapezoid. If C equals to 50, draw a circle.

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

Matlab Code

**Problem 3:**

Ask MATLAB to generate a random integer \( C \) between 0 and 100. If \( C \) is greater than 50, draw a heart shape in the pop-up figure window. If \( C \) is less than 50, draw a trapezoid. If \( C \) equals 50, draw a circle.

*(Note: The word "then" appears incorrectly instead of "than" in the text.)*
Transcribed Image Text:**Problem 3:** Ask MATLAB to generate a random integer \( C \) between 0 and 100. If \( C \) is greater than 50, draw a heart shape in the pop-up figure window. If \( C \) is less than 50, draw a trapezoid. If \( C \) equals 50, draw a circle. *(Note: The word "then" appears incorrectly instead of "than" in the text.)*
Expert Solution
Step 1: Write the given data and what is to find:

Given:

Mechanical Engineering homework question answer, step 1, image 1


To find:

MATLAB code.

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Automation of Manufacturing Processes
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