[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parse error when accessing meshgrid elements
From: |
c. |
Subject: |
Re: parse error when accessing meshgrid elements |
Date: |
Wed, 25 Jun 2014 12:59:06 +0200 |
On 25 Jun 2014, at 11:52, rcharan51 <address@hidden> wrote:
> i succesfully applied function getz to matrix xx by using arrayfun by issuing
> this command
>
> dd=arrayfun(@getz, xx);
>
> i am getting an error when using the dd array in an expression to calculate
> the z axes coordinates
>
>>> z=-(vloss/(sqrt(2*pi)*k*dd)).* exp(-yy.^2/(2* (k*(dd)).^2));
> error: operator /: nonconformant arguments (op1 is 1x1, op2 is 101x55)
>
> but this expression worked fine when 'dd' is replaced with 'getz(xx)' i
> think its becoz getz(xx) acted as a scalar
> btu dd is an array with same size as yy and xx
>
> thank you in advance
From this question as well as from the previous ones,
it appears you could greatly benefit from reading this
section of the manual:
http://www.gnu.org/software/octave/doc/interpreter/Arithmetic-Ops.html#Arithmetic-Ops
in particular these two paragraphs:
http://www.gnu.org/software/octave/doc/interpreter/Arithmetic-Ops.html#index-_002f
http://www.gnu.org/software/octave/doc/interpreter/Arithmetic-Ops.html#index-_002e_002f
HTH,
c.
- parse error when accessing meshgrid elements, rcharan51, 2014/06/24
- Re: parse error when accessing meshgrid elements, Doug Stewart, 2014/06/24
- Re: parse error when accessing meshgrid elements, rcharan51, 2014/06/24
- Re: parse error when accessing meshgrid elements, c., 2014/06/24
- Re: parse error when accessing meshgrid elements, c., 2014/06/24
- Re: parse error when accessing meshgrid elements, rcharan51, 2014/06/24
- Re: parse error when accessing meshgrid elements, c., 2014/06/24
- Re: parse error when accessing meshgrid elements, rcharan51, 2014/06/25
- Re: parse error when accessing meshgrid elements, c., 2014/06/25
- Re: parse error when accessing meshgrid elements, rcharan51, 2014/06/25
- Re: parse error when accessing meshgrid elements,
c. <=
- Re: parse error when accessing meshgrid elements, Tatsuro MATSUOKA, 2014/06/25
- Re: parse error when accessing meshgrid elements, rcharan51, 2014/06/25
Re: parse error when accessing meshgrid elements, Tatsuro MATSUOKA, 2014/06/24
Re: parse error when accessing meshgrid elements, Tatsuro MATSUOKA, 2014/06/24