Date: Jan 17, 2013 9:17 AM
Author: Steven Lord
Subject: Re: downloading .m files



"LS " <louise.m.stevenson@gmail.com> wrote in message
news:kd6t64$7c$1@newscl01ah.mathworks.com...
> Hi,
>
> I'm a teaching assistant for a class that uses Matlab. I need to have the
> students download .m files that I've written for them and open them in
> Matlab. I'll write a script on my computer, save it as a .m file, upload
> it to our class website, and then download it on a new, teaching computer
> for the students as a .m file (and the final computer on which I
> downloaded the .m file know it's a Matlab file and labels it as such) but
> when I open the script it has tons of weird (I think HTML) code on it and
> it's unusable. I've copied and pasted an example below. I'm writing these
> scripts on a Mac and the students use PCs, if that matters, but I've also
> tried resaving the script on a PC, uploading and then re-downloading it
> and having the same problem. This may be a problem on the University's end
> with the class website screwing things up, but any help would be much
> appreciated!


At a glance, it looks like whatever you're doing to download the file is
saving the whole webpage on which you've posted it, not just the file
itself.

If you've got lots of files to distribute you may want to use the ZIP
function to create a ZIP file, distribute that ZIP file instead of each
individual file, and have the students use the UNZIP function to extract it
to the appropriate folder.

*snip*

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com