Assignment3

jpg

School

Concordia University *

*We aren’t endorsed by this school

Course

412

Subject

Computer Science

Date

Nov 24, 2024

Type

jpg

Pages

1

Uploaded by Montreal514

Report
Step 1/4 Step 1: Generate the random vertices In Excel, you can use the RANDBETWEEN function to generate random integers between -10 and 10. You would need to do this twice for each vertex to get the X and Y coordinates. In Matlab, you can use the randi function to achieve the same result. Here is a simple script that generates the vertices: matlab vertices = randi([-10, 10], 5, 2); ‘This will create a 5x2 matrix where each row represents a vertex and the two columns represent the Xand Y coordinates. Step 2/4 Step 2: Plot the vertices In Excel, you can simply select the cells containing the coordinates and insert a scatter plot. In Matlab, you can use the plot function to create the chart. Here is how you can do it: fatlab plot(vertices(:,1), vertices(:,2), 'ko'); ‘This will create a scatter plot with the vertices represented as black dots ('ko' stands for black circles). Step 3/4 Step 3: Proportional representation In Excel, you can adjust the axes of the chart to have the same scale. This can be done by right-clicking on each axis and selecting 'Format Axis'. In the ‘Axis Options' panel, you can set the 'Minimum' and 'Maximum' values to -10 and 10, respectively, and the 'Major unit' to 1. In Matlab, you can use the axis function to set the limits and the pbaspect function to ensure that the data units are the same in every direction: matlab axis([-10 10 -10 10]); pbaspect([111]);* Answer Step 4: Null boundary conditions In Excel, you can hide the axes by right-clicking on them and selecting 'Format Axis". In the 'Axis Options' panel, uncheck the ‘Axis line' option. In Matlab, you can use the set function to hide the axes: matlab set(gca, 'Visible', 'off'); This will create a plot with the specified vertices, proportional representation, and null boundary conditions.
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help