필터 지우기
필터 지우기

About fixing a script

조회 수: 1 (최근 30일)
Ruken
Ruken 2015년 5월 12일
댓글: semih eski 2020년 6월 17일
Hello,
I have been using one of the software which works in Matlab environment.
Software is working, except one function. Whenever I try to use that function, in the command window there is some errors. So I cannot create appropriate model. This model is very important for my research
Please see below.
coulomb
====================================================
Welcome to Coulomb 3.3.01
====================================================
Start from Input menu to read or build an input file.
Error using mat2cell (line 45)
Not enough input arguments.
Error in utm_window>pushbutton_f_add_Callback (line 1009)
HEAD(1,1) = mat2cell(x1);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in utm_window (line 20)
gui_mainfcn(gui_State, varargin{:});
Error using waitfor
Error while evaluating UIControl Callback
The thing is I am not sure how to correct it. Should I fix the error lines with fix option in .m file? or is there another way to correct it.
Would be happy if you could help.
Regards, Ruken

채택된 답변

Nobel Mondal
Nobel Mondal 2015년 5월 12일
편집: Nobel Mondal 2015년 5월 12일
You have an error in 'mat2cell' function call in line 45 of your script. Please see the documentation to get more information on how to properly use the function.
>> help mat2cell
Could you show us the code snippet so that we may help you more?

추가 답변 (4개)

Walter Roberson
Walter Roberson 2015년 5월 12일
Try editing the code to be
HEAD(1,1) = {x1};
  댓글 수: 4
Yueyang Xia
Yueyang Xia 2020년 4월 11일
You are great, man! Thanks!
semih eski
semih eski 2020년 6월 17일
Thanks man.

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


Ruken
Ruken 2015년 5월 12일
The thing is I did not write the code, it is a software package.So I do not know why they use in that way.
Sorry I I ma not quite sure what do you mean 'code snippet'?
Regards, Ruken
  댓글 수: 2
Nobel Mondal
Nobel Mondal 2015년 5월 12일
HEAD(1,1) = mat2cell(x1);
mat2cell needs at least two input arguments to work with (along with additional conditions). The above line from your code is in conflict to that.
Walter Roberson
Walter Roberson 2015년 5월 12일
I cannot seem to find that software package. Where did you obtain it from?

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


Ruken
Ruken 2015년 5월 12일
This package for measuring earthquake deformation. You could download from this website: http://earthquake.usgs.gov/research/software/coulomb/
Where should add this code? Should I add in mat2cell.m?
  댓글 수: 1
Stephen23
Stephen23 2015년 5월 12일
편집: Stephen23 2015년 5월 12일
mat2cell is part of MATLAB already, so you do not need to "add" that file to anything. The best solution would be to contact the author of that package and ask them to fix the bug, or to try altering the package code using Walter Roberson's suggestion.

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


Nicolas Castro
Nicolas Castro 2016년 3월 7일
I'm receiving the same error. I have tried many options, changing the original-problematic lines and couldn't solve it.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by