How to load data from Octave?
Vous suivez désormais cette question
- Les mises à jour seront visibles dans votre flux de contenu suivi.
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails.
Une erreur s'est produite
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
0 votes
Partagez un lien vers cette question
5 commentaires
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Réponse acceptée
2 votes
Partagez un lien vers cette réponse
69 commentaires
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Unable to find file or directory "Slovenia_centered2.mat".
Error in solution>booti (line 25)
load Slovenia_centered2.mat;
Partagez un lien vers ce commentaire
- 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.
Partagez un lien vers ce commentaire
- Is inconssistent with and won't work with existing code expecting the explicit variables without modifications to use the struct instead
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- 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);
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
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);
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- 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.
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- 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:
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- 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.
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Plus de réponses (1)
1 vote
Partagez un lien vers cette réponse
4 commentaires
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Catégories
En savoir plus sur Octave dans Centre d'aide et File Exchange
Tags
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)
