Doug's MATLAB Video Tutorials

January 7th, 2011

Making test data in MATLAB

Many times when trying to test an algorithm or understand code written by someone else, it is beneficial to run the code with data you understand already. For that purpose, I have several standard types of data that I can quickly load or synthesize. I know that these datasets do not have NaN, Inf, or any other entries that often wreck algorithms that do not need to handle them.

3 Responses to “Making test data in MATLAB”

  1. Bård Skaflestad replied on :

    Doug,

    These were helpful tips, especially the RANDPERM one. I’ll definitely be using that.

    Thanks a lot,

    Bård

  2. Joe Pohedra replied on :

    Aha! Thanks for highlighting these shortcuts and functions. They are sometimes not so easy to discover in all the documentation. Very neatly done.

  3. Irshad replied on :

    Thanks for providing such valuable information its making lot easier to work with handling multiple data

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks

Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.

Doug's picture

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