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

In summary, the conversation discusses creating a Matlab function called mycirc(c,r) to plot a circle with a given center and radius. It also suggests two methods for plotting 100 random circles with randomly chosen center and radius values between 0 and 1, using either parametric equations or the rectangle command's curvature argument. The use of rand and for or while loops is also mentioned as potential tools for creating multiple circles.
  • #1
gr33ndem0n
1
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
  • #2
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.
 

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

1. What is Matlab and how is it used in scientific research?

Matlab is a high-level programming language and interactive environment commonly used in scientific research. It allows for the manipulation and analysis of large sets of data, as well as the creation of visual representations of data. It is often used by scientists to perform complex calculations, simulations, and data visualization.

2. How do I get started with using Matlab for my research?

To get started with Matlab, you will first need to download and install the software on your computer. You can then familiarize yourself with the basics of the language and its syntax by going through tutorials or taking online courses. Additionally, you can consult with other researchers or attend workshops to learn more about using Matlab for your specific research needs.

3. What are the main advantages of using Matlab in scientific research?

There are several advantages to using Matlab in scientific research. One of the main advantages is its ability to handle large and complex datasets, making it useful for a wide range of research fields. It also has a user-friendly interface and powerful built-in functions, making it easier for researchers to analyze and visualize their data. Additionally, Matlab has a large community of users and resources available, making it easier to find support and solutions to any problems that may arise.

4. Can Matlab be used for statistical analysis?

Yes, Matlab has a variety of built-in functions and toolboxes for statistical analysis. These include functions for data fitting, hypothesis testing, and regression analysis. Additionally, there are also third-party toolboxes available for more specialized statistical analyses.

5. Are there any alternatives to Matlab for scientific research?

Yes, there are other programming languages and software options for scientific research, such as Python, R, and SAS. Each has its own strengths and weaknesses, so it is important to evaluate which option best suits your research needs. Additionally, some researchers may choose to use a combination of different software tools to achieve their research goals.

Similar threads

Replies
5
Views
2K
Replies
2
Views
3K
Replies
4
Views
1K
Replies
3
Views
2K
Replies
18
Views
3K
Back
Top