Rank: 2879 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 14 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 11 2
26 Aug 2008 deltree Just like good old deltree.exe, but for MATLAB Author: Hoi Wong path, directories, files, utilities, file, deltree 12 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
10 Dec 2014 TextZoomable for text that scales as you zoom Text that zooms as you zoom your plot, rather than staying at a fixed font size. Author: Ken Purchase

TMW's support really go the extra mile helping its customers. With the help of Philip Caplan, the last bit of the puzzle to get this to work on R2014b's new graphic system is solved.

Replace:
hgp = findpackage('hg');
axesC = findclass(hgp,'axes');
LimListener = handle.listener(imAxes,[axesC.findprop('XLim') axesC.findprop('YLim')],...
'PropertyPostSet',@localLimitListener);

With:
LimListener = addlistener(imAxes,{'XLim','YLim'},'PostSet',@localLimitListener);

10 Dec 2014 clickableLegend A legend with clickable strings that let you hide and show objects in a plot. Author: Ameya Deoras

It seems like in R2014b, I cannot just override the already generated legend by just calling clickableLegend() or clickableLegend(gca). Anybody has the same issue?

In my case, the legends are generated by gscatter(), so I don't have control over it.

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.

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