Rank: 4283 based on 5 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:
Professional Interests:
spectral element method, unbounded domain, acoustics, elastodynamics, Dirichlet-to-neuman, Perfectly Matched Layer, Infinite Element Method, Structural Analysis, Structural Vibration

 

Watch this Author's files

 

Files Posted by Steeve
Updated   File Tags Downloads
(last 30 days)
Comments Rating
02 Feb 2009 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 kronecker tensor prod..., linearly spaced, multidimensional matr..., linear algebra, multidimensional oper... 5 4
  • 4.66667
4.7 | 4 ratings
Comments and Ratings by Steeve View all
Updated File Comments Rating
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's Files View all
Updated File Comment by Comments Rating
04 Feb 2009 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 Jos (10584)
03 Feb 2009 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 Youri

Great program!

Jos, you have to change your rating.

Youri.

03 Feb 2009 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 Jos (10584)

The error indeed seems to be fixed.

02 Feb 2009 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 Gigi

I tried it after modifications. It works perfectly.

Fine.

02 Feb 2009 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 Jos (10584)

>> linspacendim(0,1)
??? Error using ==> cat
CAT arguments dimensions are not consistent.
Error in ==> LINSPACENDIM at 39
y = cat(NDim+1, Sum1 + Sum2, d2);

This error occurs for every 1-by-N-by-M-... matrix. There are some other issues as well. For instance, in the help:
- LINSPACENDIM or LINSPACEMAT?
- n = 1 in the example?

Top Tags Applied by Steeve
kronecker tensor product, linear algebra, linearly spaced, multidimensional matrices, multidimensional operations
Files Tagged by Steeve
Updated   File Tags Downloads
(last 30 days)
Comments Rating
02 Feb 2009 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 kronecker tensor prod..., linearly spaced, multidimensional matr..., linear algebra, multidimensional oper... 5 4
  • 4.66667
4.7 | 4 ratings

Contact us at files@mathworks.com