mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-07 23:37:32 +02:00
Merge pull request #4581 from verhovsky/matlab
[matlab/*] make "MATLAB" an acronym
This commit is contained in:
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -46,13 +46,13 @@ json*.html.markdown linguist-language=JSON
|
|||||||
julia*.html.markdown linguist-language=Julia
|
julia*.html.markdown linguist-language=Julia
|
||||||
kotlin*.html.markdown linguist-language=Kotlin
|
kotlin*.html.markdown linguist-language=Kotlin
|
||||||
latex*.html.markdown linguist-language=latex
|
latex*.html.markdown linguist-language=latex
|
||||||
less*.html.markdown linguist-language=less
|
less*.html.markdown linguist-language=Less
|
||||||
livescript*.html.markdown linguist-language=LiveScript
|
livescript*.html.markdown linguist-language=LiveScript
|
||||||
logtalk*.html.markdown linguist-language=Logtalk
|
logtalk*.html.markdown linguist-language=Logtalk
|
||||||
lua*.html.markdown linguist-language=Lua
|
lua*.html.markdown linguist-language=Lua
|
||||||
make*.html.markdown linguist-language=Makefile
|
make*.html.markdown linguist-language=Makefile
|
||||||
markdown*.html.markdown linguist-language=Markdown
|
markdown*.html.markdown linguist-language=Markdown
|
||||||
matlab*.html.markdown linguist-language=Matlab
|
matlab*.html.markdown linguist-language=MATLAB
|
||||||
nim*.html.markdown linguist-language=Nimrod
|
nim*.html.markdown linguist-language=Nimrod
|
||||||
nix*.html.markdown linguist-language=Nix
|
nix*.html.markdown linguist-language=Nix
|
||||||
objective-c*.html.markdown linguist-language=Objective-C
|
objective-c*.html.markdown linguist-language=Objective-C
|
||||||
|
@@ -28,7 +28,7 @@ En Julia los programas están organizados entorno al [despacho múltiple](http:/
|
|||||||
* [Buen desempeño](http://julialang.org/benchmarks), comparado al de lenguajes **estáticamente compilados** como C.
|
* [Buen desempeño](http://julialang.org/benchmarks), comparado al de lenguajes **estáticamente compilados** como C.
|
||||||
* [Gestor de paquetes](http://docs.julialang.org/en/release-0.3/stdlib/pkg) integrado.
|
* [Gestor de paquetes](http://docs.julialang.org/en/release-0.3/stdlib/pkg) integrado.
|
||||||
* [Macros tipo Lisp](http://docs.julialang.org/en/release-0.3/manual/metaprogramming/#macros) y otras comodidades para la [meta programación](http://docs.julialang.org/en/release-0.3/manual/metaprogramming).
|
* [Macros tipo Lisp](http://docs.julialang.org/en/release-0.3/manual/metaprogramming/#macros) y otras comodidades para la [meta programación](http://docs.julialang.org/en/release-0.3/manual/metaprogramming).
|
||||||
* Llamar funciones de otros lenguajes, mediante paquetes como: **Python** ([PyCall](https://github.com/stevengj/PyCall.jl)), [Mathematica](http://github.com/one-more-minute/Mathematica.jl), **Java** ([JavaCall](http://github.com/aviks/JavaCall.jl)), **R** ([Rif](http://github.com/lgautier/Rif.jl) y [RCall](http://github.com/JuliaStats/RCall.jl)) y **Matlab** ([MATLAB](http://github.com/JuliaLang/MATLAB.jl)).
|
* Llamar funciones de otros lenguajes, mediante paquetes como: **Python** ([PyCall](https://github.com/stevengj/PyCall.jl)), [Mathematica](http://github.com/one-more-minute/Mathematica.jl), **Java** ([JavaCall](http://github.com/aviks/JavaCall.jl)), **R** ([Rif](http://github.com/lgautier/Rif.jl) y [RCall](http://github.com/JuliaStats/RCall.jl)) y **MATLAB** ([MATLAB](http://github.com/JuliaLang/MATLAB.jl)).
|
||||||
* [Llamar funciones de C y Fortran](http://docs.julialang.org/en/release-0.3/manual/calling-c-and-fortran-code) **directamente**: sin necesidad de usar envoltorios u APIs especiales.
|
* [Llamar funciones de C y Fortran](http://docs.julialang.org/en/release-0.3/manual/calling-c-and-fortran-code) **directamente**: sin necesidad de usar envoltorios u APIs especiales.
|
||||||
* Poderosas características de **línea de comandos** para [gestionar otros procesos](http://docs.julialang.org/en/release-0.3/manual/running-external-programs).
|
* Poderosas características de **línea de comandos** para [gestionar otros procesos](http://docs.julialang.org/en/release-0.3/manual/running-external-programs).
|
||||||
* Diseñado para la [computación paralela y distribuida](http://docs.julialang.org/en/release-0.3/manual/parallel-computing) **desde el principio**.
|
* Diseñado para la [computación paralela y distribuida](http://docs.julialang.org/en/release-0.3/manual/parallel-computing) **desde el principio**.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
language: Matlab
|
language: MATLAB
|
||||||
filename: learnmatlab-es.mat
|
filename: learnmatlab-es.mat
|
||||||
contributors:
|
contributors:
|
||||||
- ["mendozao", "http://github.com/mendozao"]
|
- ["mendozao", "http://github.com/mendozao"]
|
||||||
@@ -139,7 +139,7 @@ A.d.e = false;
|
|||||||
|
|
||||||
% Vectores
|
% Vectores
|
||||||
x = [4 32 53 7 1]
|
x = [4 32 53 7 1]
|
||||||
x(2) % ans = 32, los índices en Matlab comienzan 1, no 0
|
x(2) % ans = 32, los índices en MATLAB comienzan 1, no 0
|
||||||
x(2:3) % ans = 32 53
|
x(2:3) % ans = 32 53
|
||||||
x(2:end) % ans = 32 53 7 1
|
x(2:end) % ans = 32 53 7 1
|
||||||
|
|
||||||
@@ -506,7 +506,7 @@ find(x) % Encuentra todos los elementos distintos de cero de x y devuelve sus í
|
|||||||
|
|
||||||
|
|
||||||
% Clases
|
% Clases
|
||||||
% Matlab puede soportar programación orientada a objetos.
|
% MATLAB puede soportar programación orientada a objetos.
|
||||||
% Las clases deben colocarse en un archivo del nombre de la clase con la extensión .m.
|
% Las clases deben colocarse en un archivo del nombre de la clase con la extensión .m.
|
||||||
% Para comenzar, creamos una clase simple para almacenar puntos de referencia de GPS.
|
% Para comenzar, creamos una clase simple para almacenar puntos de referencia de GPS.
|
||||||
% Comience WaypointClass.m
|
% Comience WaypointClass.m
|
||||||
@@ -528,7 +528,7 @@ classdef WaypointClass % El nombre de la clase.
|
|||||||
end
|
end
|
||||||
|
|
||||||
% Si queremos agregar dos objetos Waypoint juntos sin llamar
|
% Si queremos agregar dos objetos Waypoint juntos sin llamar
|
||||||
% a una función especial, podemos sobrecargar la aritmética de Matlab así:
|
% a una función especial, podemos sobrecargar la aritmética de MATLAB así:
|
||||||
function r = plus(o1,o2)
|
function r = plus(o1,o2)
|
||||||
r = WaypointClass([o1.latitude] +[o2.latitude], ...
|
r = WaypointClass([o1.latitude] +[o2.latitude], ...
|
||||||
[o1.longitude]+[o2.longitude]);
|
[o1.longitude]+[o2.longitude]);
|
||||||
@@ -540,7 +540,7 @@ end
|
|||||||
% Podemos crear un objeto de la clase usando el constructor
|
% Podemos crear un objeto de la clase usando el constructor
|
||||||
a = WaypointClass(45.0, 45.0)
|
a = WaypointClass(45.0, 45.0)
|
||||||
|
|
||||||
% Las propiedades de clase se comportan exactamente como estructuras de Matlab.
|
% Las propiedades de clase se comportan exactamente como estructuras de MATLAB.
|
||||||
a.latitude = 70.0
|
a.latitude = 70.0
|
||||||
a.longitude = 25.0
|
a.longitude = 25.0
|
||||||
|
|
||||||
@@ -551,15 +551,15 @@ ans = multiplyLatBy(a,3)
|
|||||||
% no necesita ser pasado al método.
|
% no necesita ser pasado al método.
|
||||||
ans = a.multiplyLatBy(a,1/3)
|
ans = a.multiplyLatBy(a,1/3)
|
||||||
|
|
||||||
% Las funciones de Matlab pueden sobrecargarse para manejar objetos.
|
% Las funciones de MATLAB pueden sobrecargarse para manejar objetos.
|
||||||
% En el método anterior, hemos sobrecargado cómo maneja Matlab
|
% En el método anterior, hemos sobrecargado cómo maneja MATLAB
|
||||||
% la adición de dos objetos Waypoint.
|
% la adición de dos objetos Waypoint.
|
||||||
b = WaypointClass(15.0, 32.0)
|
b = WaypointClass(15.0, 32.0)
|
||||||
c = a + b
|
c = a + b
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Más sobre Matlab
|
## Más sobre MATLAB
|
||||||
|
|
||||||
* [The official website (EN)](http://www.mathworks.com/products/matlab/)
|
* [The official website (EN)](http://www.mathworks.com/products/matlab/)
|
||||||
* [The official MATLAB Answers forum (EN)](http://www.mathworks.com/matlabcentral/answers/)
|
* [The official MATLAB Answers forum (EN)](http://www.mathworks.com/matlabcentral/answers/)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
language: Matlab
|
language: MATLAB
|
||||||
contributors:
|
contributors:
|
||||||
- ["mendozao", "http://github.com/mendozao"]
|
- ["mendozao", "http://github.com/mendozao"]
|
||||||
- ["jamesscottbrown", "http://jamesscottbrown.com"]
|
- ["jamesscottbrown", "http://jamesscottbrown.com"]
|
||||||
@@ -114,7 +114,7 @@ A.d.e = false;
|
|||||||
|
|
||||||
% Vettori
|
% Vettori
|
||||||
x = [4 32 53 7 1]
|
x = [4 32 53 7 1]
|
||||||
x(2) % ans = 32, gli indici in Matlab iniziano da 1, non da 0
|
x(2) % ans = 32, gli indici in MATLAB iniziano da 1, non da 0
|
||||||
x(2:3) % ans = 32 53
|
x(2:3) % ans = 32 53
|
||||||
x(2:end) % ans = 32 53 7 1
|
x(2:end) % ans = 32 53 7 1
|
||||||
|
|
||||||
@@ -466,7 +466,7 @@ perms(x) % lista tutte le permutazioni di elementi di x
|
|||||||
|
|
||||||
|
|
||||||
% Classi
|
% Classi
|
||||||
% Matlab supporta la programmazione orientata agli oggetti.
|
% MATLAB supporta la programmazione orientata agli oggetti.
|
||||||
% La classe deve essere messa in un file con lo stesso nome della classe e estensione .m
|
% La classe deve essere messa in un file con lo stesso nome della classe e estensione .m
|
||||||
% Per iniziare, creiamo una semplice classe per memorizzare waypoint GPS
|
% Per iniziare, creiamo una semplice classe per memorizzare waypoint GPS
|
||||||
% Inizio WaypointClass.m
|
% Inizio WaypointClass.m
|
||||||
@@ -488,7 +488,7 @@ classdef WaypointClass % Il nome della classe.
|
|||||||
end
|
end
|
||||||
|
|
||||||
% Se si vuole aggiungere due oggetti Waypoint insieme senza chiamare
|
% Se si vuole aggiungere due oggetti Waypoint insieme senza chiamare
|
||||||
% una funzione speciale si può sovradefinire una funzione aritmetica di Matlab come questa:
|
% una funzione speciale si può sovradefinire una funzione aritmetica di MATLAB come questa:
|
||||||
function r = plus(o1,o2)
|
function r = plus(o1,o2)
|
||||||
r = WaypointClass([o1.latitude] +[o2.latitude], ...
|
r = WaypointClass([o1.latitude] +[o2.latitude], ...
|
||||||
[o1.longitude]+[o2.longitude]);
|
[o1.longitude]+[o2.longitude]);
|
||||||
@@ -500,7 +500,7 @@ end
|
|||||||
% Si può creare un oggetto della classe usando un costruttore
|
% Si può creare un oggetto della classe usando un costruttore
|
||||||
a = WaypointClass(45.0, 45.0)
|
a = WaypointClass(45.0, 45.0)
|
||||||
|
|
||||||
% Le proprietà della classe si comportano esattamente come una Struttura Matlab.
|
% Le proprietà della classe si comportano esattamente come una Struttura MATLAB.
|
||||||
a.latitude = 70.0
|
a.latitude = 70.0
|
||||||
a.longitude = 25.0
|
a.longitude = 25.0
|
||||||
|
|
||||||
@@ -511,15 +511,15 @@ ans = multiplyLatBy(a,3)
|
|||||||
% non necessita di essere passato al metodo.
|
% non necessita di essere passato al metodo.
|
||||||
ans = a.multiplyLatBy(a,1/3)
|
ans = a.multiplyLatBy(a,1/3)
|
||||||
|
|
||||||
% Le funzioni Matlab possono essere sovradefinite per gestire oggetti.
|
% Le funzioni MATLAB possono essere sovradefinite per gestire oggetti.
|
||||||
% Nel metodo sopra, è stato sovradefinito come Matlab gestisce
|
% Nel metodo sopra, è stato sovradefinito come MATLAB gestisce
|
||||||
% l'addizione di due oggetti Waypoint.
|
% l'addizione di due oggetti Waypoint.
|
||||||
b = WaypointClass(15.0, 32.0)
|
b = WaypointClass(15.0, 32.0)
|
||||||
c = a + b
|
c = a + b
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Di più su Matlab
|
## Di più su MATLAB
|
||||||
|
|
||||||
* Sito ufficiale [http://http://www.mathworks.com/products/matlab/](http://www.mathworks.com/products/matlab/)
|
* Sito ufficiale [http://http://www.mathworks.com/products/matlab/](http://www.mathworks.com/products/matlab/)
|
||||||
* Forum ufficiale di MATLAB: [http://www.mathworks.com/matlabcentral/answers/](http://www.mathworks.com/matlabcentral/answers/)
|
* Forum ufficiale di MATLAB: [http://www.mathworks.com/matlabcentral/answers/](http://www.mathworks.com/matlabcentral/answers/)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
language: Matlab
|
language: MATLAB
|
||||||
filename: learnmatlab.mat
|
filename: learnmatlab.mat
|
||||||
contributors:
|
contributors:
|
||||||
- ["mendozao", "http://github.com/mendozao"]
|
- ["mendozao", "http://github.com/mendozao"]
|
||||||
@@ -134,7 +134,7 @@ A.d.e = false;
|
|||||||
|
|
||||||
% Vectors
|
% Vectors
|
||||||
x = [4 32 53 7 1]
|
x = [4 32 53 7 1]
|
||||||
x(2) % ans = 32, indices in Matlab start 1, not 0
|
x(2) % ans = 32, indices in MATLAB start 1, not 0
|
||||||
x(2:3) % ans = 32 53
|
x(2:3) % ans = 32 53
|
||||||
x(2:end) % ans = 32 53 7 1
|
x(2:end) % ans = 32 53 7 1
|
||||||
|
|
||||||
@@ -502,7 +502,7 @@ find(x) % Finds all non-zero elements of x and returns their indexes, can use co
|
|||||||
|
|
||||||
|
|
||||||
% Classes
|
% Classes
|
||||||
% Matlab can support object-oriented programming.
|
% MATLAB can support object-oriented programming.
|
||||||
% Classes must be put in a file of the class name with a .m extension.
|
% Classes must be put in a file of the class name with a .m extension.
|
||||||
% To begin, we create a simple class to store GPS waypoints.
|
% To begin, we create a simple class to store GPS waypoints.
|
||||||
% Begin WaypointClass.m
|
% Begin WaypointClass.m
|
||||||
@@ -524,7 +524,7 @@ classdef WaypointClass % The class name.
|
|||||||
end
|
end
|
||||||
|
|
||||||
% If we want to add two Waypoint objects together without calling
|
% If we want to add two Waypoint objects together without calling
|
||||||
% a special function we can overload Matlab's arithmetic like so:
|
% a special function we can overload MATLAB's arithmetic like so:
|
||||||
function r = plus(o1,o2)
|
function r = plus(o1,o2)
|
||||||
r = WaypointClass([o1.latitude] +[o2.latitude], ...
|
r = WaypointClass([o1.latitude] +[o2.latitude], ...
|
||||||
[o1.longitude]+[o2.longitude]);
|
[o1.longitude]+[o2.longitude]);
|
||||||
@@ -536,7 +536,7 @@ end
|
|||||||
% We can create an object of the class using the constructor
|
% We can create an object of the class using the constructor
|
||||||
a = WaypointClass(45.0, 45.0)
|
a = WaypointClass(45.0, 45.0)
|
||||||
|
|
||||||
% Class properties behave exactly like Matlab Structures.
|
% Class properties behave exactly like MATLAB Structures.
|
||||||
a.latitude = 70.0
|
a.latitude = 70.0
|
||||||
a.longitude = 25.0
|
a.longitude = 25.0
|
||||||
|
|
||||||
@@ -547,15 +547,15 @@ ans = multiplyLatBy(a,3)
|
|||||||
% does not need to be passed to the method.
|
% does not need to be passed to the method.
|
||||||
ans = a.multiplyLatBy(1/3)
|
ans = a.multiplyLatBy(1/3)
|
||||||
|
|
||||||
% Matlab functions can be overloaded to handle objects.
|
% MATLAB functions can be overloaded to handle objects.
|
||||||
% In the method above, we have overloaded how Matlab handles
|
% In the method above, we have overloaded how MATLAB handles
|
||||||
% the addition of two Waypoint objects.
|
% the addition of two Waypoint objects.
|
||||||
b = WaypointClass(15.0, 32.0)
|
b = WaypointClass(15.0, 32.0)
|
||||||
c = a + b
|
c = a + b
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## More on Matlab
|
## More on MATLAB
|
||||||
|
|
||||||
* [The official website](http://www.mathworks.com/products/matlab/)
|
* [The official website](http://www.mathworks.com/products/matlab/)
|
||||||
* [The official MATLAB Answers forum](http://www.mathworks.com/matlabcentral/answers/)
|
* [The official MATLAB Answers forum](http://www.mathworks.com/matlabcentral/answers/)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
language: Matlab
|
language: MATLAB
|
||||||
contributors:
|
contributors:
|
||||||
- ["mendozao", "http://github.com/mendozao"]
|
- ["mendozao", "http://github.com/mendozao"]
|
||||||
- ["jamesscottbrown", "http://jamesscottbrown.com"]
|
- ["jamesscottbrown", "http://jamesscottbrown.com"]
|
||||||
@@ -120,7 +120,7 @@ A.d.e = false;
|
|||||||
|
|
||||||
% Vetores
|
% Vetores
|
||||||
x = [4 32 53 7 1]
|
x = [4 32 53 7 1]
|
||||||
x(2) % Resposta = 32, índices no Matlab começam por 1, não 0
|
x(2) % Resposta = 32, índices no MATLAB começam por 1, não 0
|
||||||
x(2:3) % Resposta = 32 53
|
x(2:3) % Resposta = 32 53
|
||||||
x(2:end) % Resposta = 32 53 7 1
|
x(2:end) % Resposta = 32 53 7 1
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ perms(x) % Lista todas as permutações de elementos de x
|
|||||||
|
|
||||||
|
|
||||||
% Classes
|
% Classes
|
||||||
% Matlab pode suportar programação orientada a objetos.
|
% MATLAB pode suportar programação orientada a objetos.
|
||||||
% Classes devem ser colocadas em um arquivo de mesmo nome com a extensão *.m
|
% Classes devem ser colocadas em um arquivo de mesmo nome com a extensão *.m
|
||||||
% Para começar, criamos uma simples classe que armazena posições de GPS
|
% Para começar, criamos uma simples classe que armazena posições de GPS
|
||||||
% Início ClassePosicoesGPS.m
|
% Início ClassePosicoesGPS.m
|
||||||
@@ -501,7 +501,7 @@ classdef ClassePosicoesGPS % O nome da classe.
|
|||||||
end
|
end
|
||||||
|
|
||||||
% Se quisermos somar dois objetos de PosicoesGPS juntos sem chamar
|
% Se quisermos somar dois objetos de PosicoesGPS juntos sem chamar
|
||||||
% uma função especial nós podemos sobrepor a aritmética do Matlab, desta maneira:
|
% uma função especial nós podemos sobrepor a aritmética do MATLAB, desta maneira:
|
||||||
function r = plus(o1,o2)
|
function r = plus(o1,o2)
|
||||||
r = ClassePosicoesGPS([o1.latitude] +[o2.latitude], ...
|
r = ClassePosicoesGPS([o1.latitude] +[o2.latitude], ...
|
||||||
[o1.longitude]+[o2.longitude]);
|
[o1.longitude]+[o2.longitude]);
|
||||||
@@ -513,7 +513,7 @@ end
|
|||||||
% Podemos criar um objeto da classe usando o construtor
|
% Podemos criar um objeto da classe usando o construtor
|
||||||
a = ClassePosicoesGPS(45.0, 45.0)
|
a = ClassePosicoesGPS(45.0, 45.0)
|
||||||
|
|
||||||
% Propriedades da classe se comportam exatamente como estruturas Matlab
|
% Propriedades da classe se comportam exatamente como estruturas MATLAB
|
||||||
a.latitude = 70.0
|
a.latitude = 70.0
|
||||||
a.longitude = 25.0
|
a.longitude = 25.0
|
||||||
|
|
||||||
@@ -524,15 +524,15 @@ ans = multiplicarLatPor(a,3)
|
|||||||
% o objeto não precisa ser passado para o método.
|
% o objeto não precisa ser passado para o método.
|
||||||
ans = a.multiplicarLatPor(a,1/3)
|
ans = a.multiplicarLatPor(a,1/3)
|
||||||
|
|
||||||
% Funções do Matlab podem ser sobrepostas para lidar com objetos.
|
% Funções do MATLAB podem ser sobrepostas para lidar com objetos.
|
||||||
% No método abaixo, nós sobrepomos a forma como o Matlab lida com a soma de
|
% No método abaixo, nós sobrepomos a forma como o MATLAB lida com a soma de
|
||||||
% dois objetos PosicoesGPS.
|
% dois objetos PosicoesGPS.
|
||||||
b = ClassePosicoesGPS(15.0, 32.0)
|
b = ClassePosicoesGPS(15.0, 32.0)
|
||||||
c = a + b
|
c = a + b
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Mais sobre Matlab
|
## Mais sobre MATLAB
|
||||||
|
|
||||||
* O site oficial [http://http://www.mathworks.com/products/matlab/](http://www.mathworks.com/products/matlab/)
|
* O site oficial [http://http://www.mathworks.com/products/matlab/](http://www.mathworks.com/products/matlab/)
|
||||||
* O fórum oficial de respostas: [http://www.mathworks.com/matlabcentral/answers/](http://www.mathworks.com/matlabcentral/answers/)
|
* O fórum oficial de respostas: [http://www.mathworks.com/matlabcentral/answers/](http://www.mathworks.com/matlabcentral/answers/)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
language: Matlab
|
language: MATLAB
|
||||||
filename: matlab-cn.m
|
filename: matlab-cn.m
|
||||||
contributors:
|
contributors:
|
||||||
- ["mendozao", "http://github.com/mendozao"]
|
- ["mendozao", "http://github.com/mendozao"]
|
||||||
|
Reference in New Issue
Block a user