Loren on the Art of MATLAB

April 23rd, 2008

MATLAB Publishing for Teaching

Since MATLAB has had the capability to publish M-files, we have seen publishing being adopted at many educational institutions. And there is a variety of ways for you to find out just what's been published out there, perhaps so you can leverage it.

Contents

How to Find Published M-files

First, how can you find published M-files on the web? Here are some techniques.

Some Good Educational Sites

You’ll find pointers to a lot of educational sites at the web demos index. I know that some good files are to be found at

But you can just poke around and find a lot of good stuff up and down this list. Here's a really good site I noticed recently for teaching Calculus.

Who Publishes?

I’ve been very happy, as I look at the web demos coming in, to see that published M-files are being used by professors more and more. Some of them are lovely and well made. Here are a few favorites of mine:

What are People Using Published M-files for?

People seem to be using published M-files for educational purposes in three ways, sometimes melding together the first two.

  • demos, concepts, explanations, class notes
  • homework assignments
  • adminstering exams

Homework Examples

Sometimes they’re used for homework assignments. Here are some examples from NJIT.

Example of an Exam

And sometimes they’re even used for exams such as this site.

Do You Publish from MATLAB for School?

If you use publishing for some aspect of school work, post here and please post 1 (one) URL to your own best site. Please also post a URL to a site (new to you perhaps) that uses |publish and you think has material potentially useful to you and others.


Get the MATLAB code

Published with MATLAB® 7.6

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).


Loren Shure works on design of the MATLAB language at The MathWorks. She writes here about once a week on MATLAB programming and related topics.

  • Loren: Jos- You’re right about the title! Ben- Thanks for another solution. –Loren
  • Jos: Again an interesting blog! However, the title of this blog is somewhat misleading. Shouldn’t the word...
  • Ben: I think Mike’s answer is probably the most intuitive, but I would have answered it like Jos only using...
  • Pär Lansåker: It is often better to use an obvious path for understanding. I would use a combinationd of diff(A)...
  • Joe P.: Paul R. Martin refers to “a chronic problem with cutting-and-pasting MatLab figures using Mac OS X...
  • Mike Koets: If we do want to allow answers of zero (I assumed we did not want that), then we can use this code...
  • Loren: Matt- Your solution is certainly viable as well! –Loren
  • matt fig: Here’s my crack at it. I don’t think it is too abstruce. zr = findstr(A,0); mx =...
  • Loren: Mike- I think it doesn’t give the right answer for this case. >> C = [1 2 -4 0 0]; >>...
  • Mike Koets: How about this: max(c(intersect(find (c),[find(c==0)+1 find(c==0)-1]))) The “intersect(fin d(c),...

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