Matlab function plotting. A continuous step function

In summary, the conversation discusses the need for tutelage in using Matlab to plot a simple equation involving a rational series of primes divided by their corresponding W value. However, the equation and its components are unclear and confusing, making it difficult to understand and provide a response. The conversation is closed due to the lack of information and understanding.
  • #1
Atlas3
Gold Member
69
3
i could use a bit of tutelage with Matlab. I have a rather simple equation I would like to plot. I want to create a rational series of primes divided by their corresponding W value from the equation I have. P are primes 2,3,5,7,11,13... I am still working on this. Thanks
 

Attachments

  • Eqn9.gif
    Eqn9.gif
    3 KB · Views: 416
Physics news on Phys.org
  • #2
None of what you posted makes much sense, from what I can see.
What is a "rational series of primes divided by their corresponding W value"?

The first few lines of what you posted are:
##P = \frac a {(2, 3, \dots, a - 1)} \ne 0## What does this mean?
##p(x) = (2, 3, 5, 7, 11) \in P, (1, 5)## I have no idea what this means, either.
##a_0 = 0, ~a_1 = 1, ~a_2 = 2, \dots, a_{n + 1}## Not enough information to figure out what ##a_{n + 1}## is supposed to be.
##w_0 = 0##
##w_1 = w_0 + a_1 = 1##
You lost me on ##w_2##, and things really go downhill from there.

Thread closed
 

1. What is a Matlab function?

A Matlab function is a set of instructions that perform a specific task or calculation. It can take in input variables and produce output variables, making it a powerful tool for data analysis and visualization.

2. How do I plot a function in Matlab?

To plot a function in Matlab, you can use the "plot" command followed by the function you want to plot. For example, if you want to plot the function y = x^2, you would type "plot(x^2)" in the command window. You can also add additional arguments to customize the appearance of the plot, such as adding a title or labeling the axes.

3. What is a continuous step function?

A continuous step function is a type of function that is defined by a series of steps or jumps. It is continuous because there are no gaps or breaks between the steps. In Matlab, this type of function can be created using the "heaviside" function.

4. How do I plot a continuous step function in Matlab?

To plot a continuous step function in Matlab, you can use the "plot" command followed by the "heaviside" function. For example, if you want to plot the function y = heaviside(x-2), you would type "plot(heaviside(x-2))" in the command window. You can also add additional arguments to customize the appearance of the plot, such as adding a title or labeling the axes.

5. Can I plot multiple functions on the same plot in Matlab?

Yes, you can plot multiple functions on the same plot in Matlab by using the "hold on" command before each "plot" command. This will prevent the previous plot from being erased and allow you to add additional functions to the same plot. You can also use the "legend" command to label each function on the plot.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
752
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Back
Top