- #1
Welcome to Physics Forums.bear_25 said:Hello, i am new in using MATLAB, and i stuck with these two graphs (attached). Can anyone help me, please. Thank you.
I'm afraid that I still don't understand. What exactly are you trying to do?bear_25 said:Thanks.
no, i am confused how to write this in Command Window in MATLAB, because for now i just start to use MATLAB.
So you do want to plot these, like I said earlier.bear_25 said:well, i need to plot this two graph in MATLAB, but i don t know how.
I can't give you a full tutorial on MATLAB plotting. Instead, have a look at this: http://www.mathworks.co.uk/help/techdoc/ref/plot.html , try somethings and come back with specific questions.bear_25 said:Can you tell me how can i plot the boundaries? I really need help.
To plot a graph in MATLAB, you can use the "plot" function. First, create a vector or matrix of the data points you want to plot. Then, use the "plot" function with the appropriate arguments to specify the x and y values. You can also add labels, titles, and customize the appearance of the graph using additional functions.
To plot multiple graphs on the same figure in MATLAB, you can use the "hold" function. This will allow you to plot multiple graphs on the same axis without clearing the previous graph. You can also use the "subplot" function to create multiple axes within one figure and plot different graphs on each axis.
Yes, you can save your plotted graph in MATLAB by using the "saveas" function. This function allows you to save the current figure in various file formats such as .png, .jpg, or .fig. You can also use the "print" function to save the graph as an image file directly from the command window.
To change the appearance of your plotted graph in MATLAB, you can use various functions such as "xlabel", "ylabel", and "title" to add labels and titles to your graph. You can also use functions like "grid" to add gridlines, "legend" to add a legend, and "xlim" and "ylim" to customize the axes limits.
Yes, you can plot 3D graphs in MATLAB using the "plot3" function. This function works similarly to the "plot" function but allows you to specify a third dimension for your data points. You can also use the "mesh", "surf", and "scatter3" functions to create different types of 3D graphs in MATLAB.