Matlab - MATLAB - ¿cómo ver el algoritmo que utiliza MATLAB en las diferentes funciones predeterminadas?

 
Vista:
sin imagen de perfil

MATLAB - ¿cómo ver el algoritmo que utiliza MATLAB en las diferentes funciones predeterminadas?

Publicado por Rodrigo (1 intervención) el 18/03/2017 20:17:54
Cordial saludo colegas

Necesito saber cómo lograr ver en MATLAB el algoritmo que hace para cada función predeterminada que tiene.

Ej: función dot

Y saber cómo es que realmente matlab hace el proceso interno.


Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de JESUS DAVID ARIZA ROYETH
Val: 3.309
Plata
Ha mantenido su posición en Matlab (en relación al último mes)
Gráfica de Matlab

MATLAB - ¿cómo ver el algoritmo que utiliza MATLAB en las diferentes funciones predeterminadas?

Publicado por JESUS DAVID ARIZA ROYETH (1818 intervenciones) el 19/03/2017 19:12:00
Hay funciones que matlab no deja ver su algoritmo porque son patentes, pero en el caso de dot , puede ejecutas edit('dot.m') y te manda a la función que hace el cálculo :


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function c = dot(a,b,dim)
%DOT  Vector dot product.
%   C = DOT(A,B) returns the scalar product of the vectors A and B.
%   A and B must be vectors of the same length.  When A and B are both
%   column vectors, DOT(A,B) is the same as A'*B.
%
%   DOT(A,B), for N-D arrays A and B, returns the scalar product
%   along the first non-singleton dimension of A and B. A and B must
%   have the same size.
%
%   DOT(A,B,DIM) returns the scalar product of A and B in the
%   dimension DIM.
%
%   Class support for inputs A,B:
%      float: double, single
%
%   See also CROSS.

%   Copyright 1984-2011 The MathWorks, Inc. 

if isinteger(a) || isinteger(b) 
    error(message('MATLAB:dot:integerClass'));
end

% Special case: A and B are vectors and dim not supplied
if ismatrix(a) && ismatrix(b) && nargin<3
   if min(size(a))==1, a = a(:); end
   if min(size(b))==1, b = b(:); end
end;

% Check dimensions
if any(size(a)~=size(b)),
   error(message('MATLAB:dot:InputSizeMismatch'));
end

if nargin==2,
  c = sum(conj(a).*b);
else
  c = sum(conj(a).*b,dim);
end

SALUDOS
https://www.facebook.com/royethmatlab/
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar