Rank: 964 based on 98 downloads (last 30 days) and 5 files submitted
photo

Sung Soo Kim

E-mail

Personal Profile:

Professional Interests:
Neuroscience

 

Watch this Author's files

 

Files Posted by Sung Soo View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 Jun 2009 Screenshot Simple bar plot with errorbars in 3D Simple bar plot with errorbars in 3D. Author: Sung Soo Kim errorbar, 3d, bar, 2d 20 0
19 Jun 2009 Screenshot Project Manager A simple and loose project manager. Author: Sung Soo Kim manager, project, files 9 0
19 Jun 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim eval, call, str2func, function handle, varargin, subfunction 7 5
  • 3.5
3.5 | 2 ratings
04 Mar 2009 LARS algorithm Pure vanilla implementation of LARS algorithm. Author: Sung Soo Kim lasso, statistics, l1 norm, lars 53 0
03 Mar 2009 Patch for XTargets MUnit Patch for later versions of MATLAB Author: Sung Soo Kim munit, xunit, patch, xtargets, unit test, unit testing 9 1
Comments and Ratings by Sung Soo View all
Updated File Comments Rating
28 Feb 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim

@us
Thank you very much for you comments. I learned a lot about mlint and regexp from your simple codes. I really wanted this kind of productive communication. Let me upload my 'hopefully' final version soon, which is also inspired by you too. :)

26 Feb 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim

@us
I tried your solution and found one negligible drawback, which is that you have to add each function's name in the top function and you have to make a handle in the command line whenever you want to use the function in a different namespace. This is still true when I use a class. But still I think your solution is more elegant because it does not use 'eval' which I don't like either.

26 Feb 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim

@us
Thank you for your fast reply. Your solution looks much better. I really appreciate it. I'll use it right away. Thanks for your time for reviewing my file.

Comments and Ratings on Sung Soo's Files View all
Updated File Comment by Comments Rating
12 Mar 2010 Patch for XTargets MUnit Patch for later versions of MATLAB Author: Sung Soo Kim Davis, Tim

The zip file is corrupted. I can unzip it using the system "unzip" command on my Mac and on my Linux PC, but the MATLAB "unzip" function in MATLAB on both those platforms fails, reporting an invalid zip file. Please re-zip the file and repost.

08 Jan 2010 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim ?, Stzpz

28 Feb 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim Kim, Sung Soo

@us
Thank you very much for you comments. I learned a lot about mlint and regexp from your simple codes. I really wanted this kind of productive communication. Let me upload my 'hopefully' final version soon, which is also inspired by you too. :)

27 Feb 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim us

you could use this engine to dynamically assign function handles to all 1.st level subfunctions in a file, which may return a variable number of output args

function fh=foo
     x=mlint(mfilename,'-calls');
     r=regexp({x.message}.','(?<=(S\d\s+\d+\s+\d+\s+))\w+','match');
     r=[r{:}].';
for i=1:numel(r)
     fh.(r{i})=str2func(r{i});
end
end
% subroutines
function varargout=msub(a,b)
     r={
          a-b
          a
          b
          nan
     };
     varargout(1:nargout)={[]};
     narg=min([nargout,size(r,1)]);
     [varargout{1:narg}]=deal(r{1:narg});
end
function r=madd(a,b)
     r=a+b;
end
function r=mmul(a,b)
     r=a.*b;
end

% in the command window
     fh=foo;
     [a,b]=fh.msub(1,2)
% a=-1,b=1
     [a,b,c,d,e]=fh.msub(1,2)
% a=-1,b=1,c=2,d=nan,e=[]

us

26 Feb 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim Kim, Sung Soo

@us
I tried your solution and found one negligible drawback, which is that you have to add each function's name in the top function and you have to make a handle in the command line whenever you want to use the function in a different namespace. This is still true when I use a class. But still I think your solution is more elegant because it does not use 'eval' which I don't like either.

Top Tags Applied by Sung Soo
2d, 3d, bar, call, errorbar
Files Tagged by Sung Soo View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 Jun 2009 Screenshot Simple bar plot with errorbars in 3D Simple bar plot with errorbars in 3D. Author: Sung Soo Kim errorbar, 3d, bar, 2d 20 0
19 Jun 2009 Screenshot Project Manager A simple and loose project manager. Author: Sung Soo Kim manager, project, files 9 0
19 Jun 2009 Tip: calling subfunctions from outside m-file (Final) Use the provided code snippet to call subfunctions outside the m-file. Author: Sung Soo Kim eval, call, str2func, function handle, varargin, subfunction 7 5
  • 3.5
3.5 | 2 ratings
04 Mar 2009 LARS algorithm Pure vanilla implementation of LARS algorithm. Author: Sung Soo Kim lasso, statistics, l1 norm, lars 53 0
03 Mar 2009 Patch for XTargets MUnit Patch for later versions of MATLAB Author: Sung Soo Kim munit, xunit, patch, xtargets, unit test, unit testing 9 1
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com