How to Plot Two Matrices in Excel?

Click For Summary

Discussion Overview

The discussion revolves around the process of plotting two matrices in Excel, specifically how to represent corresponding rows of two matrices as coordinates in a plot. The focus is on practical methods for achieving this, including manual and automated approaches.

Discussion Character

  • Technical explanation, Homework-related

Main Points Raised

  • One participant seeks a quick method to plot two matrices where corresponding rows form coordinate pairs.
  • Another participant suggests marking the rows of both matrices and using an x-y diagram to create the plot, noting that the steps may vary by Excel version.
  • A third participant acknowledges the provided steps but inquires about automating the plotting process instead of doing it manually.
  • A later reply proposes writing a macro and mentions using the recording function to capture the necessary commands for automation.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the best method to automate the plotting process, as suggestions vary between manual plotting and macro recording.

Contextual Notes

There may be limitations related to the specific versions of Excel being used, which could affect the applicability of the suggested methods.

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
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.
 
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?
 
You can write a macro. The recording function helps to get the right commands.
 
  • Like
Likes   Reactions: member 428835

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K