Unrecognized function or variable

I'm not able to get the VolcFlow application working in Matlab. My instructions are below. I've set the path to the folder in which the files are held but on entering VolcFlow to the terminal I get the error "Unrecognised function or variable. Can someone help me please?
Use of VolcFlow
VolcFlow is writen with Matlab and is of very simple use.
Put VolcFlow.p and VolcFlowFig.fig in the same folder.
Type VolcFlow in the command windows and the following figure appears.

4 件のコメント

Walter Roberson
Walter Roberson 2022 年 4 月 7 日
I just downloaded from https://lmv.uca.fr/volcflow/ and cd'd to the directory they were in, and invoked
VolcFlow
and it ran without problem.
Could you cd to where you have the files, and show the output of
ls
and show the complete error message when you invoke VolcFlow ?
David Gardiner
David Gardiner 2022 年 4 月 8 日
Many thanks Walter, I got it running by invoking the .p file. I now get an error from line 14. Any ideas on the problem here please?
%Reads the topography - you can use a mat file or write the line to read a
%geotif-file, a surfer-file, an ascii-file...
load ('Caldera_Before.txt');
[nrow. ncol] = size(z); %Line14
>> input_example
Unrecognized function or variable 'z'.
Error in input_example (line 14)
[nrow. ncol] = size(z);
KSSV
KSSV 2022 年 4 月 8 日
The error is simple and straight. You have not defined the variable z. Where is the variable z? It is in the file you have loaded. You need to define that variable.
Walter Roberson
Walter Roberson 2022 年 4 月 8 日
When you load() a text file, and you do not assign the output to a variable, then MATLAB finds the basic filename (without directory information or file extension), and uses matlab.lang.makeValidName() on the file name to create a valid MATLAB variable name, and then assigns the content to the calculated name.
In your case with loading Caldera_Before.txt and not assigning the value to any variable, it would assign the content to the variable named Caldera_Before

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFile Operations についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 4 月 7 日

コメント済み:

2022 年 4 月 8 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by