Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to get an input matrix from user?

  1. Mar 8, 2010 #1
    how to get an input matrix from user???

    WITHOUT using the MATLAB ‘MULTIPLICATION COMMAND’ write down your own program to implement the matrix multiplication M = A*B, where A and B are two constant matrices of dimensions l x m and m x n, respectively. The program should:
     Prompt the user to enter the dimensions l, m and n;
     Check if all the dimensions are positive integers and if this is not the case, ask the user to enter the values again; also to check whether multiplication is possible or not according the entered dimensions
     Prompt the user to enter the values of the two matrices;
     Apply matrix multiplication M = A * B and calculate the product M;
     Display the resultant matrix M [don’t use ‘;’ at end of statement in order to display].

    PLZ help i m get stuck....
     
  2. jcsd
  3. Mar 13, 2010 #2

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Re: how to get an input matrix from user???

    What have you done so far?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook