File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,4 +125,119 @@ round(5, sqrt(2))
125125
126126floor(- 3.45 )
127127ceiling(- 3.45 )
128- trunc(- 3.45 )
128+ trunc(- 3.45 )
129+
130+
131+ x = (pi ^ 2 )/ 2
132+ x
133+
134+ y <- cos(pi / 4 )
135+ y
136+
137+ sin(pi / 4 ) + cos(pi / 4 ) - > z
138+ z
139+
140+ edad <- 30
141+
142+ nombre = " Juan Gabriel"
143+
144+ HOLA = 1
145+ hola = 5
146+
147+ pi .4 = 4 * pi
148+ pi .4
149+
150+ x = 2
151+ x = x ^ 2
152+
153+ x = sqrt(x )
154+
155+ # # Función f(x) = x^3 - (3^x)* sen(x)
156+ f = function (x ) {
157+ x ^ 3 - (3 ^ x ) * sin(x )
158+ }
159+
160+ f(4 ) # 4^3 - 3^4 * sin(4)
161+ f(5 )
162+ f(pi / 2 )
163+
164+ suma1 <- function (t ){
165+ t + 1
166+ }
167+ suma1(6 )
168+ suma1(- 5 )
169+
170+ product <- function (x , y ){
171+ x * y
172+ }
173+ product(5 ,7 )
174+
175+ g <- function (x ,y ,z ) {
176+ exp(x ^ 2 + y ^ 2 ) * sin(z )
177+ }
178+ g(1 , 2 , 3 )
179+ g(1 , - 1 , pi )
180+
181+ suma5 <- function (numero ){
182+ numero = suma1(numero );
183+ numero = suma1(numero );
184+ numero = suma1(numero );
185+ numero = suma1(numero );
186+ suma1(numero )
187+ }
188+
189+ suma5(3 )
190+
191+ ls()
192+
193+ rm(product )
194+
195+ ls()
196+
197+ rm(list = ls())
198+
199+ class(3 + 2i )
200+
201+ (3 + 2i )* 5
202+
203+ (3 + 2i )* (- 1 + 3i )
204+
205+ (3 + 2i )/ (- 1 + 3i )
206+
207+ # Esto es un error:
208+ # 2+7*i
209+
210+ # pi + sqrt(2)i
211+ complex (real = pi , imaginary = sqrt(2 )) - > z1
212+ z1
213+
214+ sqrt(- 5 )
215+ sqrt(as.complex(- 5 ))
216+
217+ # La raíz cuadrada devuelve, de las dos soluciones la de
218+ # Re(z)>0, para obtener la otra, hay que multiplicar por -1
219+ sqrt(3 + 2i ) # z^2 = 3+2i
220+ exp(3 + 2i )
221+ sin(3 + 2i )
222+ cos(3 + 2i )
223+
224+ # Módulo = sqrt(Re(z)^2 + Im(z)^2)
225+ Mod(z1 )
226+ # Argumento = arctan(Im(z)/Re(z))
227+ # = arccos(Re(z)/Mod(z))
228+ # = arcsin(Im(z)/Mod(z))
229+ # va de (-pi, pi]
230+ Arg(- 1 + 0i )
231+ Arg(- 1 - 2i )
232+ # Conjugado = Re(z)- Im(z)i
233+ Conj(z1 )
234+ # Parte Real y Parte Imaginaria
235+ Re(z1 )
236+ Im(z1 )
237+
238+ # ## z = Mod(z) * (cos(Arg(z))+sin(Arg(z))i)
239+ complex (modulus = 2 , argument = pi / 2 ) - > z2
240+ z2
241+ Mod(z2 )
242+ Arg(z2 )
243+ pi / 2
You can’t perform that action at this time.
0 commit comments