How to load data from Octave?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
5 Comments
Share a link to this comment
Share a link to this comment
Share a link to this comment
Accepted Answer
2 votes
Share a link to this answer
75 Comments
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Unable to find file or directory "Slovenia_centered2.mat".
Error in solution>booti (line 25)
load Slovenia_centered2.mat;
Share a link to this comment
- No surprise overwrites: bare LOAD silently replaces any existing variables with the same names,
- Avoids the risk of stale variables being used from the workspace without warning,
- No magic variables: the editor/mlint won't flag x as undefined, because it can see where it came from,
- Allows easy runtime introspection via FIELDNAMES or ISFIELD,
- Self-documenting,
- Goes hand-in-hand with other good practices, e.g. providing the full path via FULLFILE, etc.
Share a link to this comment
- Is inconssistent with and won't work with existing code expecting the explicit variables without modifications to use the struct instead
- Uncommenting function line and
- Adding "end" at end of file
- Removed a bunch of extra blank lines as personal preference to shorten code in editor significantly -- immaterial other than visual.
Error in objfunEvaluator (line 5)
fval = feval(Objfun, x, self.FunArgs.AdditionalParameters{:});
Error in OptimFunctions/objectiveFirstEval (line 655)
[fval, grad, hess] = self.ObjectiveFunAndGrad(self,self.FunFcn{3},...
Error in fminunc (line 135)
[f,GRAD,HESS,funObj] = funObj.objectiveFirstEval(x);
Error in solution>booti (line 91)
[thetstar,fstar,exitflag] = fminunc(@llfn,bigtheto,options);
Error in objfunEvaluator (line 5)
fval = feval(Objfun, x, self.FunArgs.AdditionalParameters{:});
Error in OptimFunctions/objectiveFirstEval (line 655)
[fval, grad, hess] = self.ObjectiveFunAndGrad(self,self.FunFcn{3},...
Error in fminunc (line 135)
[f,GRAD,HESS,funObj] = funObj.objectiveFirstEval(x);
Share a link to this comment
Share a link to this comment
- Rename "run.m" to something that doesn't conflict with MATLAB builtin functions.
- Nobody else can run anything without the missing optimization function
- Debugging without any symptoms is impossible, you'll have to delve into the problem to see what goes wrong and why -- that's research although the error about a singular matrix is perhaps instructive as noted before.
- The code comments indicate it used a different technique in Octave than the MATLAB fminunc routine; have you used that instead? I would guess "run" is also a builtin function in Octave, too, that should not be aliased.
Share a link to this comment
- Renaming "run" into "runa" doesn't change outcome.
- I contacted dr. Röhe via email and he was kind enough to provide me the code. Trying to run his file "run" with data for France in Octave, I obtain three erorrs:
Share a link to this comment
Share a link to this comment
- I am attaching the crash report. After 60-70 minutes of running, MATLAB window closes and the small window that is attached opens. Prior to crash, thousands of errors "Matrix is singular" appear. IMPORTANT: six files, that should be the output of running "run" or "runa" in MATLAB are present in the folder! Perhaps running "runa" is successful despite the crash report? The time of creation of six files is exactly when the crash occurs.
- OK, I will ask dr. Röhe for the LLFN function and His advice what to do.
- Yes, in 2025 He told me He can run the file "run" from 2010 successfully.
- I will use debugger, okay. The instructions say I have to remove a semicolon from one line or use the Run to Here button, but I am not sure at which line. I will experiment a little.
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
More Answers (1)
1 vote
Share a link to this answer
4 Comments
Share a link to this comment
Share a link to this comment
Share a link to this comment
Categories
Find more on Octave in Help Center and File Exchange
Tags
See Also
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)