Request for Suggestion on Stamps(2,2) step execution

조회 수: 10 (최근 30일)
Diwakar
Diwakar 2024년 1월 16일
댓글: rofiatul 2024년 4월 3일
Dear Sir,
I am using time series deformation analysis using StaMPS software and Matlab Code. But, if find some error on this code to process with Stamps(2,2). I am sending the error and the code here. So, I am humbly requesting for the support on solving the problem.
  댓글 수: 1
rofiatul
rofiatul 2024년 4월 3일
Hi, have you solved this problem? I counter the same problem like you

댓글을 달려면 로그인하십시오.

답변 (1개)

Garmit Pant
Garmit Pant 2024년 1월 30일
Hello Diwakar
From what I gather, you are using the StaMPS software along with MATLAB to perform deformation analysis and while trying to execute the command “stamps(2,2)” you are encountering the following error:
“Unrecognized field name “small_baseline_flag.
On inspecting the error message, the error is being triggered when the function “getparm” executes the MATLAB file “ps_parms_default.m”.
In the file “ps_parms_default.m”, the variable “parms” is a “struct” for which the default values of various fields are being set. “small_baseline_flag” is one such field.
The following code snippet is from the “ps_parms_default.m” file and it initialises the value of the variable “parms”:
parmfile='parms.mat';
parent_flag=0;
if exist('./parms.mat','file')
parms=load(parmfile);
elseif exist('../parms.mat','file')
parmfile='../parms.mat';
parms=load(parmfile);
parent_flag=1;
else
parms=struct('Created',date);
parms.small_baseline_flag='n';
end
In the above code snippet, the contents of the file "parms.mat" are loaded into the variable "parms" if the MAT-file exists. If the MAT-file does not exist, then "parms" is initialized as a "struct" with two fields, "Created" storing the date of creation and "small_baseline_flag" with the value "n". Since in the error, "small_baseline_flag" is flagged as an unrecognized field, it means that the code can load the "parms.mat" file into the variable "parms". If it were otherwise, then the "struct" would have had the field with its value initialized as "n", as can be seen above.
Please verify whether the MAT-file "parms.mat" exists and whether it contains the "small_baseline_flag" field. You can either try to look for the MAT-file with the right set of fields or choose not to load the file and initialize the default values by creating a new variable as demonstrated in the "else" case in the above code snippet.
I hope you find the above explanation and suggestions useful!

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by