J

@joseclaudineiferreira

RtesteRatio

R
4 years ago
# Test points xx=c(0,0.05,0.236,0.382,0.5,0.618,0.786,0.886,1) x=xx[c(1,3,4,6,9)] y=c(1,1.25,2.5,5,10) plot(x,y) # If p(x)=a+bx+x^2 # Let A=[x_i^(j-1)] and u=(a,b,...,f,g). We need to minimize |p(x_i)-y_i|.

TestRedit

R
4 years ago
x=c(0,0.05,0.236,0.382,0.5,0.618,0.786,0.886,1) x f<-function(s){5*s*(s+1)} y=f(x);y z=y z[1]=1 z[3]=1.25

Test

R
4 years ago
This link you include in your "EDIT" seems to provide a method to solve your problem, if you note that the constraints $x_{i}-x_{i-1}=d$ is in your data.x <- seq(-pi, pi, 0.1) plot(x, cos(x))

Bissection-test

R
4 years ago
f<-function(x){log(x)-cos(x)} curve(f,0.2,100) # Bisection's method a=0.01 # Initial guess b=200 # Initial guess n=10 for (i in 1:n){

OptminConst-b

R
4 years ago
# Test points x=c(1,2,3,4,5,6,7) y=c(2,3,-1,3,2,-1,1) plot(x,y) # If p(x)=a+bx+x^2+dx^3+ex^4+fx^5+gx^6 # Let A=[x_i^(j-1)] and u=(a,b,...,f,g). We need to minimize |p(x_)-y_i|. # Let us constraining by min r, with r>=Au-y and r>=y-Au. u0=c(3,0,1,

ConstOptim

R
4 years ago
# Test points x=c(1,2,3,4,5,6,7) y=c(2,3,-1,3,2,-1,1) plot(x,y) # If p(x)=a+bx+x^2+dx^3+ex^4+fx^5+gx^6 # Let A=[x_i^(j-1)] and u=(a,b,...,f,g). We need to minimize (Au-y)^*(Au-y). # Let us constraining by p(x)>=f(x) which means, in this case that

Tryingmandelbrot

R
4 years ago
f<-function(x,y,p){ if (p==0){q=c(x,y)} else{q=c((f(x,y,p-1)[1])^2-(f(x,y,p-1)[2])^2+x,2*(f(x,y,p-1)[1])*(f(x,y,p-1)[2])+y)} return(q) } f(1,2,0) f(1,2,1) mf<-function(x,y,p){(f(x,y,p)[1])^2+(f(x,y,p)[2])^2}

Teste-financiamento

R
4 years ago
a=0*1:6; a[6]=1; p<-function(s){ 1+s+s^2+s^3+s^4+s^5-4*s^6 } n=50; for (i in 1:n){ # para o inverso a menor raíz em módulo a[i+6]=(a[i+5]+a[i+4]+a[i+3]+a[i+2]+a[i+1]+a[i])/4

QR-.RKHS

R
4 years ago
# Processo de ortogonalização de Gram-Schmdit com espaço de reprodução K<-function(s,t){exp(-(s^2+t^2)/4)} # Espaço de reprodução x=seq(-1,1,by=0.25); y=x # Nós da malha MK=matrix(0,length(x),length(y)) for (i in 1:length(x)){ for (j in 1:len

Sugestão Laura

R
4 years ago
x <- seq(0, 24, 1) plot(x, 20+19*sin(pi*x/24+pi)) x <- seq(0, 48, 0.1) plot(x, 20+19*sin(pi*x/24+pi),'l')

London Eye

R
4 years ago
h<-function(t){ a=pi*t/24+pi return (20+ 19*sin(a)) } t=seq(0,50,by=1) h(t) plot(t,h(t))

Dog and rabib problem

R
4 years ago
# Exemplo de método de reta tangente ou de Euler F<-function(s,u){ # s é o parâmtro do tempo e u é um vetor. 2 # expressão da função } a=0 # início do intervalo de tempo b=4 #

Ex-Res-Prob

R
4 years ago
# Exemplo de método de reta tangente ou de Euler F<-function(s,u){ # s é o parâmtro do tempo e u é um vetor. 2 # expressão da função } a=0 # início do intervalo de tempo b=4 #

Ex-elim-pivo-Phyton

Python
4 years ago
import math from decimal import Decimal,getcontext getcontext().prec = 40 def gaussPivoteamento(B,c): # faz eliminação de Gauss com pivoteamento parcial A=B b=c sol=[] for i in range(len(A)):

Homotopia-continuacao-Phyton

Python
4 years ago
# Gráfico em 3 dimensões # Resolver a equação f(x,y)=(f1(x,y),f2(x,y))=(0,0). import math def f1(u): # Definição de f1 p=math.exp(u[1]+u[0])-2 return p

Learn-Phyton

Python
4 years ago
import math def tri_recursion(k): if(k > 0): result = k * tri_recursion(k - 1) print(result) else: result = 1 return result

Lucio-Elim-Pivo

Python
4 years ago
import math from decimal import Decimal,getcontext getcontext().prec = 40 def gaussPivoteamento(A,b): for i in range(len(A)): pivo = math.fabs(A[i][i]) linha_pivo = i

Continuacao-homotopia-b

R
4 years ago
# Gráfico em 3 dimensões # Resolver a equação f(x,y)=(f1(x,y),f2(x,y))=(0,0). f1<-function(u){ # Definição de f1 x=u[1] y=u[2] f1=exp(x+y)-2 f1 }

Continuacao-homotopia

R
4 years ago
# Gráfico em 3 dimensões # Resolver a equação f(x,y)=(f1(x,y),f2(x,y))=(0,0). f1<-function(u){ # Definição de f1 x=u[1] y=u[2] f1=exp(x+y)-2 f1 }

Seidel-d

R
4 years ago
# Método de Gauss-Seidel Sass<-function(A){ # Teste de convergêncial de Sassenfeld n=length(A[1,]) b=matrix(1,n,1) for ( i in 1:n){ b[i]=sum(abs(b[-c(i)])*abs(A[i,-c(i)]))/abs(A[i,i]) } return(b) }