From: Caglar Ozdag on
I can't figure out what it is that I'm doing wrong. eval() always returns with the same error, even in the simplest of executions.

>> d = eval(ns,'+',xs)
??? Index exceeds matrix dimensions.
>> eval('1/2')
??? Index exceeds matrix dimensions.

Some guidance will be appreciated.
From: dpb on
Caglar Ozdag wrote:
> I can't figure out what it is that I'm doing wrong. eval() always
> returns with the same error, even in the simplest of executions.
>
>>> d = eval(ns,'+',xs)

doc eval

What is _the_ argument supposed to be?


....

> Some guidance will be appreciated.

--
From: Caglar Ozdag on
something like this:

>> ns=int2str(17)
>> xs=num2str(18)
From: Walter Roberson on
Caglar Ozdag wrote:
> I can't figure out what it is that I'm doing wrong. eval() always
> returns with the same error, even in the simplest of executions.
>
>>> d = eval(ns,'+',xs)
> ??? Index exceeds matrix dimensions.

eval() can only take a single argument

>>> eval('1/2')
> ??? Index exceeds matrix dimensions.

That suggests that you have a variable named 'eval'.
From: us on
"Caglar Ozdag" <caglarozdag(a)gmail.com> wrote in message <i1tdus$n12$1(a)fred.mathworks.com>...
> Hi,
> eval() returns the same error, even with the simplest of inputs.
>
> >> d = eval(ns,'+',xs)
> ??? Index exceeds matrix dimensions.
> >> eval('1/2')
> ??? Index exceeds matrix dimensions.
>
> Any help would be appreciated.

a hint:
- show the result of

which eval -all;

us
 |  Next  |  Last
Pages: 1 2
Prev: boundary detection
Next: eval() Help