Hi,
Running the function, which should go all the way through and generate a plot gives this error -
octave:43> coheref2
error: 'defval' undefined near line 17 column 1
error called from:
error: c:\matlab\functions\simons_matlab\coheref2.m at line 17, column 1
function varargout=coheref2(infl,onfl,land)
% COHEREF2(infl,onfl,land)
%
% Expected coherence from Forsyth (1985)
% One elastic thickness, several loading ratios.
%
% Forsyth (1985), Figure 8.
%
% OUTPUT:
%
% Lots of handle variables
%
% See also: ADMITR, ADMITB, ADMITF2, COHERETE
%
% Last modified by
fjsimons-at-alum.mit.edu, 03/07/2012
defval('infl',1) <------------------ line 17
defval('onfl',1)
% Elastic thickness [m]
Te=40*1000;
The Matlab function that I found on the Internet, whether it is the right one I do not know, is in the same directory.
I am not a Matlab user, so this is all somewhat new to me. Looking at the way it is written, just typing the function name should work as the values of "infl, onl and land" are all defined with a value in the code (1), assuming I read it right. I am not sure how this is meant to run, so sorry if this is a very naive query for the experts.
There is no reference to this function in the manual and it certainly does not run on my system: using Windows 7 and Octave 3.6.4 (latest version with latest updates).
coheref2.m makes a call to forsyth.m to pass the result of a function back (see the original files). The coheref2.f function stops at the first reference to defval, soi it does not get as far as the plotting aspect. Is defval a system specific function?
Lester