20 years old code
이전 댓글 표시
I have a 20 years old code which starts the simulation using
OPTIONS=[1e-3,0.01,0.1,0,0,2];
euler('shuman',Ttotal,[],OPTIONS);
euler has since changed, how do I start it now? Also there is simver(1.3), anyone know what that means?
Thank you and kind regarsd,
Nilo
댓글 수: 11
Harald
2026년 2월 5일 15:11
Hi,
the only euler function I could find shipping with MATLAB returns Euler numbers or polynomials. The calling syntax suggests that the euler function in this case is a user-written one, possibly implementing Euler's method for solving ODEs.
It would be a matter of looking at the code of that euler function and possibly some trial-and-error to assist further. If you can find and provide it, also check if there is a shuman.m lurking around.
Best wishes,
Harald
Sam Chak
2026년 2월 5일 15:27
Hi @Niloufar
Without additional context, we can only speculate. However, 'Shuman' may also refer to a specific filtering technique used in computational fluid dynamics (CFD).
This is another version of the euler() function, but it takes only two inputs:
function Y = euler(n, x)
% EULER Euler numbers and Euler polynomials.
% Y = EULER(N, X) is the N-th Euler polynomial.
% It is defined as
% euler(n, x) = subs(diff(2*exp(x*t)/(exp(t) + 1), t, n), t, 0)
% Y = EULER(N) is the N-th Euler number.
% It is defined as
% EULER(n) = 2^n*euler(n,1/2).
% See also BERNOULLI.
% Copyright 2013 The MathWorks, Inc.
The euler() function in your case could be a user-defined function designed to represent the Euler equation in fluid dynamics.
Niloufar
2026년 2월 5일 15:32
Harald
2026년 2월 5일 15:52
Hi Nilo,
Is there an euler.m associated with the project?
If you are not sure, this would be displayed when running
which euler -all
Best wishes,
Harald
Niloufar
2026년 2월 5일 16:04
dpb
2026년 2월 5일 16:11
That shows only what is presently installed with the 2023b MATLAB release; not what code was part of the 20-yr ago Simulink model. You'll have to find all the old original code from that time to have any chance or reinvent whatever it was that was being modelled.
Niloufar
2026년 2월 5일 16:18
No, it doesn't appear you do have all the original code; somewhere there was another user-supplied euier function besides Mathworks-suppled one. What, specifically, it did is anybody's guess depending upon what the model is of but it's a decent bet it was an implementation of Euler's method for ODEs.
Other than "20 years ago code" is there any chance you can find out what release was installed when this was last run succcessfully? You could then verify that there was no prior functionality that matched that footprint that has subsequently been removed.
Search FEX, maybe the developer picked up a submittal from there.
Steven Lord
2026년 2월 5일 17:29
Do you have a Simulink model file for your system? If you do, what happens when you try opening it up in Simulink today? Does it know how to translate those very old pieces of infrastructure into the current Simulink architecture, does it throw errors, or does something else happen?
That is clearly the output code from Simulink for a given model down to drawing the block diagram with the screen coordinates of the dsiplay at the time.
I have never seen a Simulink installation so "I know nuthink!" a la Sgt Schultz, but you might look at <Rebuild a Model> doc page and see if it helps...
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!