help-octave
[Top][All Lists]
Advanced

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

Re: Help with interpolation code


From: Andy Buckle
Subject: Re: Help with interpolation code
Date: Wed, 27 Jun 2012 14:43:16 +0100

On 27 June 2012 14:28, mantale1 <address@hidden> wrote:
> I could, but I wanted to write the code for myself. The real issue is why my
> else/elseif statement when I try to set method == 'nearest' doesn't work.
> This is really just for my own education.

Knowledge for its own sake is noble.

The comparison operator, ==, is not doing what you think it is for
strings. Use strcmp.

>'123'=='1234'
error: mx_el_eq: nonconformant arguments (op1 is 1x3, op2 is 1x4)
>strcmp('123','1234')
ans = 0
>strcmp('1234','1234')
ans =  1

-- 
/* andy buckle */


reply via email to

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