function min

How to see the code(algorithm) of function "min" in MATLAB???
Thanks

답변 (2개)

Sean de Wolski
Sean de Wolski 2012년 2월 28일

4 개 추천

댓글 수: 5

Aldin
Aldin 2012년 2월 28일
Seand de Wolski, what is this link useful for :) ? Did you get a job offer :)?
Sean de Wolski
Sean de Wolski 2012년 2월 28일
If you want to see the code for min(), you need to work here!
The first step is to apply, we encourage you and everyone who thinks they might be a good fit for a career at MathWorks, to do so!
Aldin
Aldin 2012년 2월 28일
Sean, do you think i have a chance for career at MathWorks. Surely, i know the implementation for min function but i wondering me for implementation of solve, diff and so on.
For example
>> solve(x^100 + 5*x^8 + x + 0.9); awesome :)
Aldin
Aldin 2012년 2월 28일
What i have to know if i would like to work for you?
Walter Roberson
Walter Roberson 2012년 2월 28일
The symbolic toolbox solve() routine has many many parts to it, a major programming effort, as it has to deal with a large number of different functions -- it is _not_ restricted to polynomials.
Generally speaking, roots of polynomials are usually found in symbolic packages by looking for Groebner Basis. (Unfortunately I never did figure out what a Groebner Basis _is_ or how to find one...)

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

Wayne King
Wayne King 2012년 2월 28일

1 개 추천

Hi, you cannot. That is a built-in (compiled) function. The source code for the function and others like is not shipped with MATLAB.

댓글 수: 5

Aldin
Aldin 2012년 2월 28일
also for other function in MATLAB?
Walter Roberson
Walter Roberson 2012년 2월 28일
For any given function, say XYZ, you can command
type XYZ
at the command line.
The source will be shown if it exists. If all you see is comments and help text, then the _real_ source is not implemented in MATLAB.
Sean de Wolski
Sean de Wolski 2012년 2월 28일
cool!
Aldin
Aldin 2012년 2월 28일
??? Undefined function or variable 'XYZ'.
Walter Roberson
Walter Roberson 2012년 2월 28일
type min
type solve
type diff
For the version I am using, the response is:
>> type min
'min' is a built-in function.
>> type solve
??? Error using ==> type
File 'solve' not found.
>> type diff
'diff' is a built-in function.
which is expected: min and diff are not implemented in the MATLAB language, and solve is part of a toolbox that I do not have.

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

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2012년 2월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by