View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Visualize sparsity pattern

5.0 | 1 rating Rate this file 2 Downloads (last 30 days) File Size: 31.9 KB File ID: #16888 Version: 1.0
image thumbnail

Visualize sparsity pattern



15 Oct 2007 (Updated )

(SPY in style)

| Watch this File

File Information

Please see SPYDEMO, by following link 'Published m-files' below.

MATLAB release MATLAB 7.2 (R2006a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
17 Oct 2007 Urs (us) Schwarz

altogether a very nice, professional demo script showing various ways to visualize a sparse matrix including some nice tricks for the newcomer on how to create spiffy figures and a prototypical macro for a quick axis setup.
unfortunately, the author HAS to use a construct that includes a call to EVAL, which is solely due to the fact that TMW (after MANY years of asking for) has not yet had the time to implement the SET(handle,...) command with a return argument in all cases... otherwise, the community could finally use a function handle of this kind:

fh=@(varargin) {
set(gca,'xtick',varargin{1}) % NOT POSSIBLE!
xlabel(varargin{2}) % OK
title(varargin{3}) % OK


17 Oct 2007 Dimitri Shvorob

Thank you for suggestion, Urs! I settled for 'eval' because I couldn't see how to also inlne the label assignments and 'set(gcf..'.

Comment only
16 Oct 2007 Urs (us) Schwarz

just a thought:

the eval(touchup) is a bit cumbersome (especially in view of your well documented ML skills...); why not use a construct like this

% only two prop/val are shown
% for brevity...
tf=@() set(gca,'xtick',1:k,'xlim',xlim);
% and use it


Comment only
04 Apr 2016 1.0


Contact us