Rank: 3662 based on 33 downloads (last 30 days) and 1 file submitted
photo

Steeve AMBROISE

E-mail
Company/University
Faculte des Sciences - Universite d'Etat d'Haiti
Lat/Long
19.0121, 72.3012

Personal Profile:

 

Watch this Author's files

 

Files Posted by Steeve AMBROISE
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 May 2014 Linearly spaced multidimensional matrix without loop Generates a N-dimensional matrix of linearly equally spaced points between the matrices d1 and d2. Author: Steeve AMBROISE multidimensional oper..., multidimensional matr..., linearly spaced, linear algebra, kronecker tensor prod... 33 8
  • 4.71429
4.7 | 8 ratings
Comments and Ratings by Steeve AMBROISE View all
Updated File Comments Rating
13 Apr 2012 Matlab mesh to PDF with 3D interactive object Export triangulated mesh into a pdf with a 3D interactive object. Author: Alexandre Gramfort

Hi all,

I have the same question than Jeroen: i want to incorporate multiple meshes in 1 figure but I only have the last mesh. Can you help me please.

Thank you

03 Feb 2009 NDLINSPACE (v1.1, feb 2008) Generalized LINSPACE: linearly spaced values between mutliple points Author: Jos (10584)

I tried to compare this function to linspaceNDim with this code:

clear
a=rand(20,30,5,10,19,4);
b = rand(size(a));
N = 5;

tic, c1 = linspaceNDim(a, b, N);toc
clear c1

tic, c2 = ndlinspace(a, b, N);toc

I find that linspaceNDim is 20 times faster then ndlinspace.

Steeve.

31 Jan 2009 maxmax find the max value and position from a multi-dimensional matrix Author: Simon

Another way, if you want to use the eval function and manipulate strings:

NDim = ndims(X); maxim = 'X'; Indices = ' ';
for i= 1:NDim,
maxim = strcat('max(',maxim,')');
Indices = strcat(Indices, 'I', num2str(i),', ');
end
Max = eval(maxim);
Indices = strcat('[', Indices(1:end-1), ']');
eval([Indices, '= ind2sub(size(X), find(X==Max));']);
Ind = eval(Indices);

It works even if several elements have the largest value.

You can use the preceding example.

S.A.

Comments and Ratings on Steeve AMBROISE's Files View all
Updated File Comment by Comments Rating
11 Nov 2014 Linearly spaced multidimensional matrix without loop Generates a N-dimensional matrix of linearly equally spaced points between the matrices d1 and d2. Author: Steeve AMBROISE Alessandro Masullo

In 2D you can use these simple commands, that are much faster:

A = randi(10,1000,1);
B = randi(10,1000,1)+20;
N = 1500;

dx = (B-A)/(N-1);
AB = repmat(dx,1,N);
AB(:,1) = A;
AB = cumsum(AB,2);

25 Jul 2014 Linearly spaced multidimensional matrix without loop Generates a N-dimensional matrix of linearly equally spaced points between the matrices d1 and d2. Author: Steeve AMBROISE Pawel

I've found this code very helpful. However, there is a minor issue. The output in the case of scalar arguments d1 and d2 is a column vector, while in the case of arguments of higher dimensionality, the output is transposed (it is a matrix consisting of raw vectors, corresponding to each element of the argument). If I'm not clear, just take a look how the output looks like when d1 and d2 are scalars, and when they are vectors 1 by 2.

I corrected the code by adding in the end of the function the following line:

if NDim == 0, y = y'; end

It changes the output of the scalar arguments case a raw vector, consistent with argument of higher dimensionality and with the original linspace function.

26 Jun 2014 Linearly spaced multidimensional matrix without loop Generates a N-dimensional matrix of linearly equally spaced points between the matrices d1 and d2. Author: Steeve AMBROISE Paul

29 May 2014 Linearly spaced multidimensional matrix without loop Generates a N-dimensional matrix of linearly equally spaced points between the matrices d1 and d2. Author: Steeve AMBROISE paula

15 Feb 2013 Linearly spaced multidimensional matrix without loop Generates a N-dimensional matrix of linearly equally spaced points between the matrices d1 and d2. Author: Steeve AMBROISE Steeve A.

You're welcome Pio.

Contact us