help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: slow code, optimisation advice needed


From: PhilipNienhuis
Subject: Re: slow code, optimisation advice needed
Date: Thu, 31 May 2018 14:02:59 -0700 (MST)

tomkut wrote
> thx PhilipNienhuis, I tried the timing function. The e = cellfun (
> @strsplit,
> (d(1:3)) ,'UniformOutput', false );  works but the structure of the
> resulting cell array is different e.g.: 
> e =
> {
>   [1,1] =
>   {
>     [1,1] = 36.5333
>     [1,2] = 41.8667
>    }
>   [2,1] =
>   {
>     [1,1] = 36.5333
>     [1,2] = 41.8667
>   }
> }
> as oppose to: 
> f =
> {
>   [1,1] = 36.5333
>   [2,1] = 36.5333
>   [1,2] = 41.8667
>   [2,2] = 41.8667
>   }
> How can I correct this?

Try one of the cat, horzcat or vertcat method. You'd have to experiment a
bit to get it right.

Philip



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]