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: Laurent Hoeltgen
Subject: Re: How do I open scripts in octave?
Date: Mon, 24 Dec 2012 08:38:20 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 23/12/12 19:12, nathvi 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


Hi,

can you tell us what you entered in octave?
Btw, if you want the function to return the identity matrix, change the line after the last comment to:

A = eye(5);

and not just eye(5).

Regards,
Laurent


reply via email to

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