[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optimizing error: undefined argument
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: optimizing error: undefined argument |
Date: |
Tue, 16 Aug 2011 13:55:24 -0500 |
On 16 August 2011 13:46, DGati <address@hidden> wrote:
> Thus I typed
>
> octave-3.2.4.exe:37> minimize(@func,x)
> error: for A^b, A must be square
> error: called from:
> error: D:\octwork\func.m at line 2, column 7
My guess is that that minimize function expects a vectorised function.
It's passing it a vector argument and then the function is trying to
square a vector, which doesn't make linear algebraic sense. Rewrite
your function to use the elementwise .^ power operator instead of
matrix ^ power operator.
- Jordi G. H.