File Exchange Pick of the Week

Results for: MATLAB Basics

Puzzler: Working with polynomials 11

Posted by Doug Hull,

This puzzler is very straightforward, so I hope to hear from some of the newer MATLAB users. I think the solution is very linear, most people would come up with the same solution. As a hint, be sure to look at our help for POLYDER and ROOTS. The challenge... read more >>

MATLAB Basics: Setting edge color for large surface plots 2

Posted by Doug Hull,

Often if you make a surface plot with SURF for a large dataset, it will appear all black because MATLAB is trying to draw all the edge lines. You can stop these lines from obscuring your data by turning the edge color off: a= peaks(1000); h = surf(a) set(h, 'edgecolor','none') Video Content... read more >>

MATLAB Basics: Adding a toolbar to a GUI 21

Posted by Doug Hull,

People often make their own GUIs in GUIDE and they have a data visualization. When you embed an axis in your own GUI rather than using a figure window, you lose the built in toolbar that has zoom, pan, and other goodies. You can add the widgets you... read more >>

MATLAB Basics: Interpolating data with interp1 1

Posted by Doug Hull,

This short video shows how you can take a sparsely sampled sine wave and use interp1 to interpolate the missing data points. Different interpolations such as linear, spline and nearest are all shown. Some people would consider this to be curve fitting to some degree. Video Content ... read more >>

MATLAB Basics: Cell arrays for holding different data types 7

Posted by Doug Hull,

Sometimes in MATLAB you are going to want to store different data types together in one construct rather than try and keep track of different variables. Structures work for this, but sometimes it is nice to be able to refer to the data in row and column notation rather... read more >>

Post your MATLAB Videos 3

Posted by Doug Hull,

It is no secret that I like teaching MATLAB through videos. I use Camtasia to make and edit my videos, I am very happy using it. If you want to make MATLAB videos too, you can use Jing, by the makers of Camtasia, that gives you enough functionality... read more >>

MATLAB Puzzler: Finding the two closest points 29

Posted by Doug Hull,

Here is a new MATLAB Puzzler. Given two vectors representing the X and Y coordinates of some points, find the two closest points in Cartesian space. n = 10; x = rand(1,n); y = rand(1,n); Video Content Video Content Brett and I took very different paths to solving this... read more >>

Accessing data from one widget to another in GUIDE 4

Posted by Doug Hull,

Last time, I showed how to add the newly documented UITABLE to a GUI. [click here] There were a few questions [click here] about how to access the data in the UITABLE from the callback of another widget. The answer to this question is applicable to all widgets,... read more >>

MATLAB Basics: Adding a table to a GUI 43

Posted by Doug Hull,

MATLAB GUI developers often want to have a mini-spreadsheet in their GUI. This can be done with a new widget added to the set of controls available in GUIDE. Now with UITABLE you can add that capability. This video shows how to add a table for display,... read more >>

MATLAB Basics: Using dbstop if error 13

Posted by Doug Hull,

When MATLAB throws an error, if you are in a function, you will end up at the base workspace and lose access to the variables as they were in the function when the error was thrown. This makes it difficult to understand why the error occurred. ... read more >>

These postings are the author's and don't necessarily represent the opinions of MathWorks.