Rank: 263048 based on 0 downloads (last 30 days) and 0 file submitted
photo

Rui

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Rui View all
Updated File Comments Rating
27 Apr 2013 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong

Bruno,

Sorry. I introduced a typo to your codes. When I replaced // by /*, I forgot to add */.

Now it is working!

27 Apr 2013 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong

Bruno,

Thanks a lot! Now there's a new error on the last line...

At first I thought, maybe there's a missing brace, however the I found that was not the case. The new code was working with matlab 32 bit build-in compiler, but not the LCC on linux.

Rui
-----------------------

minkmex.c: In function ?MinMaxResult?:
minkmex.c:293: warning: incompatible implicit declaration of built-in function ?memset?
minkmex.c: In function ?LocResult?:
minkmex.c:322: warning: incompatible implicit declaration of built-in function ?memset?
minkmex.c: In function ?mexFunction?:
minkmex.c:580: error: expected declaration or statement at end of input

mex: compile of ' "minkmex.c"' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> minmax_install at 46
mex(mexopts{:},'minkmex.c');

26 Apr 2013 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong

Hi Bruno,

I like this function. I got a lot of fun with it on Windows, but when I switched to Linux server with GCC compiler, it did not work. The error was the same as jianbo posted two years ago. I tried to modify minkmex.c file as you suggested, (replace "memset((data+p0), 0, sizeof(double)*nz)" with "memset((void*)(data+p0), 0, sizeof(double)*nz)") but it did not work. I tired both matlab 2012a and 2010b on our server, but neither worked. Could you help me on it? Thanks in advance!

--------------------

minkmex.c: In function ?MinMaxResult?:
minkmex.c:293: warning: incompatible implicit declaration of built-in function ?memset?
minkmex.c: In function ?LocResult?:
minkmex.c:322: warning: incompatible implicit declaration of built-in function ?memset?
minkmex.c: In function ?mexFunction?:
minkmex.c:544: error: expected expression before ?/? token

mex: compile of ' "minkmex.c"' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> minmax_install at 46
mex(mexopts{:},'minkmex.c');

Contact us