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

Matlab and large abreviated matrices

  1. Sep 26, 2008 #1
    Can any one tell me how to make matlab keep matrices in abreviated form? For example I want a rand(100*100) matrix that doesnt have all the coefficients listed out. Thanks Sean.
  2. jcsd
  3. Sep 27, 2008 #2
    It's not really clear to me what you want to do. Are you asking how you can stop matlab from outputting the coefficients of the matrix each time you access it on the command line?

    If so, that's easy. You can suppress output from any command in matlab by placing a semi-colon after the command. For instance, suppose that you want to quickly construct a 3x3 matrix whose entries are values drawn from a uniform normal distribution. In that case

    Code (Text):
    >> A = rand(3)

    A   =

        0.8147    0.9134    0.2785
        0.9058    0.6324    0.5469
        0.1270    0.0975    0.9575
    You can get precisely the same matrix but suppress the output by passing the same command with a semi-colon at the end:

    Code (Text):
    >> A = rand(3);
    Is this what you're asking about?
  4. Sep 27, 2008 #3
    that was exactly what I was asking about thank you very much!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Matlab and large abreviated matrices
  1. Matrices in Matlab (Replies: 5)

  2. Matrices in matlab (Replies: 2)