Rank: 2830 based on 45 downloads (last 30 days) and 4 files submitted
photo

Hoi Wong

E-mail

Personal Profile:

http://www.stanford.edu/~wonghoi/


 

Watch this Author's files

 

Files Posted by Hoi Wong View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
19 Aug 2014 Screenshot Advanced hline and vline Draws horizontal/vertical lines in graphs. Accept axes handle and allows user to specify label posit Author: Hoi Wong annotation, customization, horizontal line verti..., graphics, plot, line 27 1
  • 4.5
4.5 | 2 ratings
30 Mar 2009 Map fields of a structure to output variables The program assigns each field of a structure into output arguments. Author: Hoi Wong variables, struct, varargout, argument, data structure, workspace 7 2
26 Aug 2008 deltree Just like good old deltree.exe, but for MATLAB Author: Hoi Wong path, directories, files, utilities, file, deltree 3 0
11 Feb 2008 Arbitrary files & MATLAB variables <-> data stream vector converter Encode any MATLAB data types into a numeric array, and vice versa Author: Hoi Wong external interface, file struct com data ..., serialization 8 0
Comments and Ratings by Hoi Wong View all
Updated File Comments Rating
25 Nov 2014 CStrAinBP Overlapping elements of 2 cell strings. 10-20 times faster than INTERSECT/ISMEMBER/SETDIFF. Author: Jan Simon

25 Nov 2014 CStrAinBP Overlapping elements of 2 cell strings. 10-20 times faster than INTERSECT/ISMEMBER/SETDIFF. Author: Jan Simon

Great tool. Can you suggest how to implement setops (intersect/setdiff/union/setxor) using CStrAinBP that has the same behavior as the native setops that does unique() without any major hit in performance?

Thanks.

12 Nov 2014 UNIQUEWITHEQUALNANS Set unique, treating NaNs as equal (v2.0, mar 2009) Author: Jos (10584)

Since this code is a wrapper around the builtin/unique(), the default behavior for 'first', 'last' depends on your version of MATLAB (before R2013a or R2013a and after).

You might want to update your comments so it applies to more versions. Right now the description says 'last' is the default but the code actually behaves as 'first' when I run it in R2013a or after.

Thanks.

18 Sep 2014 ScreenCapture - get a screen-capture of a figure frame or component ScreenCapture gets a screen-capture of any Matlab GUI handle, or specified screen area rectangle Author: Yair Altman

With TMW never getting figures to print/export right without font size/positions being distorted. This tool is a lifesaver.

13 Jun 2014 confplot Extending ERRORBAR, it plots a line within a shaded area, as 'continuous' confidence/error bounds. Author: Michele Giugliano

Great program. I think the last line should be if(nargout>=1) instead of if(nargout>1).

It seems like the program has at most one output argument. It doesn't make much sense to me to specify two output just to get one out.

In fact, MATLAB throws an exception when I tried to specify an output argument. I guess so far everybody does not need the handles :)

Comments and Ratings on Hoi Wong's Files View all
Updated File Comment by Comments Rating
22 Apr 2012 Advanced hline and vline Draws horizontal/vertical lines in graphs. Accept axes handle and allows user to specify label posit Author: Hoi Wong Felipe

I'd add at the end:
if (nargout == 0), clear lineHandles; end

25 Oct 2011 Advanced hline and vline Draws horizontal/vertical lines in graphs. Accept axes handle and allows user to specify label posit Author: Hoi Wong Rashbeard

15 Mar 2009 Map fields of a structure to output variables The program assigns each field of a structure into output arguments. Author: Hoi Wong Hoi Wong

Thanks jos for the alternative approach that use deal(). The reason that I made this wrapper is to avoid using deal() and make the code self-documenting.

I wish Mathworks can consider allowing syntaxes like [a,b,c]=(struct2cell(S)){:}, then my submission has no reason to be here. :)

12 Mar 2009 Map fields of a structure to output variables The program assigns each field of a structure into output arguments. Author: Hoi Wong Jos (10584)

A superfluous combination of two basic ML commands. Simply using
C = struct2cell(S) ; [a,b,c] = deal(C{:}) ; in your code is clear enough.

Contact us