Plotting two matrices in Excel

In summary, the conversation is about plotting two matrices of equal dimensions in an x-y coordinate system. One method suggested is to mark the rows of both matrices and add an x-y diagram, while another suggests creating a macro to automate the process. The details of the steps may vary depending on the version of Excel being used.
  • #1
member 428835
Hi PF!

I have two matrices of equal dimensions. I would like to plot them such that row ##i## of matrix 1 corresponds the x-axis and row ##i## of matrix 2 corresponds to the y axis, so that row ##i## of matrix 1 and matrix 2 together give a coordinate. Does anyone know how to do this quickly?

Thanks!
 
Physics news on Phys.org
  • #2
Mark the row of matrix 1, then mark the row of matrix 2 (with ctrl to mark both at the same time), add an x-y-diagram. Done.

If that doesn't work for some reason: Mark the row of matrix 2, add a point (x/y) diagram, right-click on the data points to edit the data source, edit your line to add the x-coordinate reference. The details of the steps vary a bit between Excel versions.
 
  • #3
Thanks for your response mfb! I tried following your steps, and this works for plotting row by row, but isn't there a way to automate the process?
 
  • #4
You can write a macro. The recording function helps to get the right commands.
 
  • Like
Likes member 428835

1. How do I plot two matrices in Excel?

To plot two matrices in Excel, you can use the "Scatter" chart type. First, select both matrices and go to the "Insert" tab. Then, click on "Scatter" and choose the desired chart style. This will create a graph with both matrices plotted as separate data series.

2. Can I customize the appearance of the plotted matrices?

Yes, you can customize the appearance of the plotted matrices in Excel. You can change the color, style, and size of the data points and lines by right-clicking on the data series and selecting "Format Data Series." You can also add titles, labels, and other elements to the graph using the "Chart Tools" tab.

3. How do I add a trendline to the plotted matrices?

To add a trendline to the plotted matrices, right-click on a data series and select "Add Trendline." You can then choose the type of trendline (linear, exponential, etc.) and customize its appearance and options. This can help visualize the trend or relationship between the two matrices.

4. Can I plot two matrices with different dimensions in Excel?

Yes, you can plot two matrices with different dimensions in Excel. However, you may need to make sure that the data is organized in a way that can be easily plotted, such as having the same number of rows or columns. You can also use Excel's "Transpose" function to rearrange the data as needed for plotting.

5. How do I update the plotted matrices if the data changes?

If the data in the matrices changes, you can update the plotted graph in Excel by selecting the graph and going to the "Design" tab. Then, click on "Select Data" and choose the updated range of data for each series. This will automatically update the plotted matrices on the graph.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
728
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
143
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
6K
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
32
Views
841
Replies
1
Views
548
Back
Top