Matlab and large abreviated matrices

  • Context: MATLAB 
  • Thread starter Thread starter scsig805
  • Start date Start date
  • Tags Tags
    Matlab Matrices
scsig805
Messages
11
Reaction score
0
Can anyone tell me how to make MATLAB keep matrices in abreviated form? For example I want a rand(100*100) matrix that doesn't have all the coefficients listed out. Thanks Sean.
 
Physics news on Phys.org
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:
>> 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:
>> A = rand(3);
>>

Is this what you're asking about?
 
that was exactly what I was asking about thank you very much!
 

Similar threads

  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
Replies
3
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
11K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 18 ·
Replies
18
Views
3K