help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I open scripts in octave?


From: Ed Meyer
Subject: Re: How do I open scripts in octave?
Date: Mon, 24 Dec 2012 07:53:31 -0800



On Sun, Dec 23, 2012 at 10:12 AM, nathvi <address@hidden> wrote:
Hello, I am in a machine learning class, and I know absolutely nothing about
octave. I have these files, and they are in the correct load dirrectory, but
when I try to open the file it gives me the error:

"  unable to extract matrix size from file `warmUpExercise.m'     "

The warm up exercise looks like this:

function A = warmUpExercise()
%WARMUPEXERCISE Example function in octave
%   A = WARMUPEXERCISE() is an example function that returns the 5x5
identity matrix

A = [];
% ============= YOUR CODE HERE ==============
% Instructions: Return the 5x5 identity matrix
%               In octave, we return values by defining which variables
%               represent the return values (at the top of the file)
%               and then set them accordingly.


eye (5)




% ===========================================


end











--
View this message in context: http://octave.1599824.n4.nabble.com/How-do-I-open-scripts-in-octave-tp4648322.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave

to run the script simply type the name of the script (without the .m) at the
octave prompt:

octave:1> warmUpExercise

and you should see

ans =

Diagonal Matrix

      1     0     0     0     0
      0     1     0     0     0
      0     0     1     0     0
      0     0     0     1     0
      0     0     0     0     1


--
Ed Meyer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]