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

>

[hidden email]
>

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

_______________________________________________

Help-octave mailing list

[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave