help-octave
[Top][All Lists]
Advanced

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

Re: parse error when accessing meshgrid elements


From: rcharan51
Subject: Re: parse error when accessing meshgrid elements
Date: Tue, 24 Jun 2014 21:50:36 -0700 (PDT)

ok i itried to use arrayfun by using following commands

dd=arrayfun(getz, xx);
z=-(vloss/(sqrt(2*pi)*k* getz(dd))).* exp(-yy.^2/(2* (k*getz(dd)).^2));

when i execute this i got following error regarding input to function getz.m

error: 'input1' undefined near line 30 column 8
error: called from:
error:   C:\Octave\Octave-3.8.1\TUNNELING\getz.m at line 30, column 5
error: evaluating argument list element number 1
error:   C:\Octave\Octave-3.8.1\TUNNELING\tunnelallignment.m at line 38,
column 3


this is my getz


function [retval] = getz (input1)
retval=0;
global chain;
for n=1:55;
    j=56-n;
    if input1>=chain(j, 1);
      retval=chain(j, 7);
      break;
    endif
  endfor
endfunction



--
View this message in context: 
http://octave.1599824.n4.nabble.com/parse-error-when-accessing-meshgrid-elements-tp4664997p4665033.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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