Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matrix dissection

Subject: Matrix dissection

From: Vladimir V Bogachuk

Date: 25 Oct, 2010 07:17:04

Message: 1 of 4

Hello,
 I have matrix with 1 by 100 and i need to separate is into 10 by 10. In other words take first 10 then take next 10 and put them next to each other and so on. Thank you

Subject: Matrix dissection

From: Nasser M. Abbasi

Date: 25 Oct, 2010 08:07:49

Message: 2 of 4

On 10/25/2010 12:17 AM, Vladimir V Bogachuk wrote:
> Hello,
> I have matrix with 1 by 100 and i need to separate is into 10 by 10. In other words take first 10
 > then take next 10 and put them next to each other and so on. Thank you

try reshape

--Nasser

Subject: Matrix dissection

From: Vladimir V Bogachuk

Date: 25 Oct, 2010 08:35:05

Message: 3 of 4

"Nasser M. Abbasi" <nma@12000.org> wrote in message <ia3dsk$q75$2@speranza.aioe.org>...
> On 10/25/2010 12:17 AM, Vladimir V Bogachuk wrote:
> > Hello,
> > I have matrix with 1 by 100 and i need to separate is into 10 by 10. In other words take first 10
> > then take next 10 and put them next to each other and so on. Thank you
>
> try reshape
>
> --Nasser
well here is an example I have this kind of data

Stiffness matrix Harwell-Boeing format
           685 19 324 324 18
RSA 18 18 324 0
(I14) (I14) (d25.15) (d25.15)
F 1 18
             1
            19
            37
            55
            73
            91
           109
           127
           145
           163
           181
           199
           217
           235
           253
           271
           289
           307
           325
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
            11
            12
            13
            14
            15
            16
            17
            18
    0.103400000000000D+09
    0.000000000000000D+00
    0.000000000000000D+00
   -0.103400000000000D+09
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00
    0.000000000000000D+00

First I need to filter this data so I can only have data that's after the 18 the thing is that this data will vary differently and i only need everything with decimals and the D should be replaced with E. Because the data that needed is E+9 or sometime it can me E-9. Thank you for your time

Subject: Matrix dissection

From: Nasser M. Abbasi

Date: 25 Oct, 2010 09:04:39

Message: 4 of 4

On 10/25/2010 1:35 AM, Vladimir V Bogachuk wrote:
> "Nasser M. Abbasi"<nma@12000.org> wrote in message<ia3dsk$q75$2@speranza.aioe.org>...
>> On 10/25/2010 12:17 AM, Vladimir V Bogachuk wrote:
>>> Hello,
>>> I have matrix with 1 by 100 and i need to separate is into 10 by 10. In other words take first 10
>> > then take next 10 and put them next to each other and so on. Thank you
>>
>> try reshape
>>
>> --Nasser
> well here is an example I have this kind of data
>
> Stiffness matrix Harwell-Boeing format
> 685 19 324 324 18
> RSA 18 18 324 0
> (I14) (I14) (d25.15) (d25.15)
> F 1 18
> 1
> 19
> 37
> 55
> 73
> 91
> 109
> 127
> 145
> 163
> 181
> 199
> 217
> 235
> 253
> 271
> 289
> 307
> 325
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> 0.103400000000000D+09
> 0.000000000000000D+00
> 0.000000000000000D+00
> -0.103400000000000D+09
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
> 0.000000000000000D+00
>
> First I need to filter this data so I can only have data that's after the 18 the thing is
 > that this data will vary differently and i only need everything with
decimals and the D should be replaced with E. Because the data that
needed is E+9 or sometime it can me E-9. Thank you for your time


First, did you read the data into Matlab? There is a number of ways to
read the data into matlab.
Once it is in matlab workspace, then you can reshape or remove unwanted
items easily. If the data in a matrix, you can reshape the matrix, or
remove part of the data you do not need.


--Nasser

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us