MATLAB No idea where to start with this question (very new to matlab):

Click For Summary
SUMMARY

The discussion focuses on creating a MATLAB function named mycirc(c,r) that plots a circle with center c at coordinates [x0,y0] and radius r. Users are advised to utilize the parametric equation for circles or the rectangle command with the curvature argument to achieve this. Additionally, the rand function is recommended for generating random values for c and r, while for or while loops can be employed to plot 100 random circles within the interval of 0 to 1.

PREREQUISITES
  • Familiarity with MATLAB programming language
  • Understanding of parametric equations for circles
  • Knowledge of the rectangle command in MATLAB
  • Experience with random number generation using rand
NEXT STEPS
  • Research how to implement parametric equations in MATLAB
  • Explore the rectangle command and its curvature options
  • Learn about using for and while loops in MATLAB
  • Investigate advanced random number generation techniques in MATLAB
USEFUL FOR

This discussion is beneficial for MATLAB beginners, educators teaching programming concepts, and developers interested in graphical representations of mathematical functions.

gr33ndem0n
Messages
1
Reaction score
0
Write a Matlab function mycirc(c,r) that will plot the circle whose center is at c[x0,y0] and whose radius is r. Then plot 100 random circles with c,r chosen randomly from the interval 0 to 1.
 
Physics news on Phys.org
There are several ways to do this. One is to use the parametric equation for circle (think radius and iteration over angle), another is to use the rectangle command's curvature argument. Look up rand in help to see how you might choose c & r. Look up the for or while loops to see how you might create any given number of such circles.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K