Starting from:

$30

CS113-Homework 7 Solved

Create a single MATLAB script with each problem below as a separate section (hint: %%).  

1.  Create a new script  

2.  Create a comment section at the top with your name, date, HW#, class, etc.  

3.  The first script commands should erase all the workspace data, command window output, and close all figures.  

4.  Create separate sections (%% ) for each problem

 

Problem 1 
 

Problem 2


 

Problem 3 


 

Problem 4 

 

Bonus question 
1. Import the data from “dotData.txt” into MATLAB.

a. The file contains a large set of numbers with each set containing an x (column 1) and y

(column 2) coordinate and a size value (column 3).

2.  Use the rectangle( ) function to plot solid circles at each x,y coordinate that have a diameter equal to the size value imported from the file.

3.  If done correctly, you will recognize the plotted object.

4.  Hide the numbers around the perimeter of the plot

5.  Add your name somewhere on the figure using your previously created function.

6.  Make sure the x and y have the same scale (i.e. a circle will look round instead of 

like an ellipse if done correctly).

7.  Don’t do steps 4-6 inside a loop unless you want your code to take a LONG time to run. 8. Modify your code to make the letters in the image red and the rest black.

More products