SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Program PROCESS
real tiempo ,amplitud !valores del archivo de datos
real apc,bpc,cpc,anc,bnc,cnc !valores a interpolar
real tapc,tbpc,tcpc,tanc,tbnc,tcnc !valores a interpolar
real a1p,a2p,a3p,xmaxp,ymaxp !Parametros
de la ecuacion cuadratica
real a1n,a2n,a3n,xmaxn,ymaxn !Parametros
de la ecuacion cuadratica
real Periodopos,Periodoneg,dampingpos,dampingneg
real Amplitudmediapos,Amplitudmedianeg
real Amplitudmediapos1,Amplitudmedianeg1,Interceptopos,Interceptoneg !valor
de la amplitud exponencial
real pendientepos,interceptoposl,xcero,xceron,tcero,tceron !Interpolacion
lineal
real ymaxnp
dimension tiempo (100000),amplitud(10000)
!valores del archivo de datos
dimension apc(100000),bpc(100000),cpc(100000),anc(100000),bnc(100000),cnc
(100000) !valores a interpolar
dimension tapc(100000),tbpc(100000),tcpc(100000),tanc(100000),tbnc(100000),tcnc
(100000) !valores a interpolar
dimension a1p(100000),a2p(100000),a3p(100000),xmaxp(100000),ymaxp(100000)
!Parametros de la ecuacion cuadratica
dimension a1n(100000),a2n(100000),a3n(100000),xmaxn(100000),ymaxn(100000)
!Parametros de la ecuacion cuadratica
dimension
Periodopos(100000),Periodoneg(100000),dampingpos(100000),dampingneg(100000)
dimension Amplitudmediapos(100000),Amplitudmedianeg(100000)
dimension
Amplitudmediapos1(100000),Amplitudmedianeg1(100000),Interceptopos(100000),Interc
eptoneg(100000) !valor de la amplitud exponencial
dimension
apl(100000),bpl(100000),tapl(100000),tbpl(100000),pendientepos(100000),intercept
oposl(100000),xcero(100000),xceron(100000),tcero(100000),tceron(100000)
!Interpolacion lineal
dimension ymaxnp(100000)
CHARACTER(30) ARCHDAT
ARCHDAT="ANGULO.TXT"
OPEN(6,FILE=ARCHDAT,STATUS="OLD")
READ(6,*) N ! N es entero
!write(*,*) N
do i=1,n
READ(6,*) tiempo (i),amplitud(i)
!write(*,*) tiempo (i),amplitud(i)
!write(*,10)tiempo(i),amplitud(i)
!10 format(/'El tiempo es:',5x,f15.3,'[Seg]',/,'la amplitud es:',5x,f13.3,'[ª]')
! , o ,/, para saltar, f15.3 numero de caracteres y decimales
end do
k=0
t=0
do m=1,n-1
if (amplitud(m).gt.0.0.and.amplitud(m+1).lt.0.0)then
k=k+1
apl(k)=amplitud(m)
bpl(k)=amplitud(m+1)
tapl(k)=tiempo(m)
tbpl(k)=tiempo(m+1)
!INTERPOLACION LINEAL
pendientepos(k)=(bpl(k)-apl(k))/(tbpl(k)-tapl(k))
interceptoposl(k)= apl(k)- pendientepos(k)*tapl(k)
xcero(k)=-interceptoposl(k) / pendientepos(k)
!Write(*,*)xcero(k)
else if(amplitud(m).lt.0.0.and.amplitud(m+1).gt.0.0)then
t=t+1
apl(t)=amplitud(m)
bpl(t)=amplitud(m+1)
tapl(t)=tiempo(m)
tbpl(t)=tiempo(m+1)
!INTERPOLACION LINEAL
pendientepos(t)=(bpl(t)-apl(t))/(tbpl(t)-tapl(t))
interceptoposl(t)= apl(t)- pendientepos(t)*tapl(t)
xceron(t)=-interceptoposl(t) / pendientepos(t)
!Write(*,*)xceron(t)
end if
end do
!Write(*,*)k,t
write(*,*)'la interceccion con la abcisa para los positivos es: '
ll=1
do i=1,k-1
tcero(ll)=xcero(i+1)-xcero(i)
ll=ll+1
Write(*,*)tcero(ll-1)
end do
write(*,*)'la interceccion con la abcisa para para los negativos: '
kk=1
do i=1,t-1
tceron(kk)=xceron(i+1)-xceron(i)
kk=kk+1
Write(*,*)tceron(kk-1)
end do
k=0 !contador de el numero de valores maximos
l=0 !contador de el numero de valores minimos
do i=1,n-2
if (amplitud(i).gt.0.0)then
if
(amplitud(i+1).ge.amplitud(i).and.amplitud(i+1).gt.amplitud(i+2))then
k=k+1
apc(k)=amplitud(i)
bpc(k)=amplitud(i+1)
cpc(k)=amplitud(i+2)
tapc(k)=tiempo(i)
tbpc(k)=tiempo(i+1)
tcpc(k)=tiempo(i+2)
!BUSCAR LOS PARAMETROS DE LA ECUACION CUADRATICA
a3p(k)=(2/(tcpc(k)-tapc(k)))*(((cpc(k)-apc(k))/(tcpc(k)-
tapc(k)))-((bpc(k)-apc(k))/(tbpc(k)-tapc(k))))
a2p(k)= ((bpc(k)-apc(k))/(tbpc(k)-tapc(k)))-a3p(k)*(tbpc(k)
+tapc(k))
a1p(k)= apc(k)- ((bpc(k)-apc(k))/(tbpc(k)-tapc(k)))*tapc(k)+
a3p(k)*tapc(k)*tbpc(k)
!ENCONTRAR EL MAXIMO DE LA FUNCION
xmaxp(k)=-a2p(k)/(2*a3p(k))
ymaxp(k)=a1p(k)+a2p(k)*xmaxp(k)+a3p(k)*xmaxp(k)*xmaxp(k)
!write(*,*)xmaxp(k),ymaxp(k),k
end if
else
if(amplitud(i+1).le.amplitud(i).and.amplitud(i+1).lt.amplitud(i+2))then
l=l+1
anc(l)=amplitud(i)
bnc(l)=amplitud(i+1)
cnc(l)=amplitud(i+2)
tanc(l)=tiempo(i)
tbnc(l)=tiempo(i+1)
tcnc(l)=tiempo(i+2)
!BUSCAR LOS PARAMETROS DE LA ECUACION CUADRATICA
a3n(l)=(2/(tcnc(l)-tanc(l)))*(((cnc(l)-anc(l))/(tcnc(l)-
tanc(l)))-((bnc(l)-anc(l))/(tbnc(l)-tanc(l))))
a2n(l)= ((bnc(l)-anc(l))/(tbnc(l)-tanc(l)))-a3n(l)*(tbnc(l)
+tanc(l))
a1n(l)= anc(l)- ((bnc(l)-anc(l))/(tbnc(l)-tanc(l)))*tanc(l)+
a3n(l)*tanc(l)*tbnc(l)
!ENCONTRAR EL MAXIMO DE LA FUNCION
xmaxn(l)=-a2n(l)/(2*a3n(l))
ymaxn(l)=a1n(l)+a2n(l)*xmaxn(l)+a3n(l)*xmaxn(l)*xmaxn(l)
!write(*,*)xmaxn(l),l
end if
end if
end do
write(*,*)'Las maximas amplitudes para los positivos son: '
j=1
do i=1,k-1
Periodopos(j)=xmaxp(i+1)-xmaxp(i)
dampingpos(j)=log(ymaxp(i+1)/ymaxp(i))/Periodopos(j)
!AMPLITUD PROMEDIO
Amplitudmediapos(j)=(ymaxp(i+1)+ymaxp(i))/2
Interceptopos(j)=exp(log(ymaxp(i))-dampingpos(j)*xmaxp(i))
!AMPLITUD CON LA FUNCION EXPONENCIAL
Amplitudmediapos1(j)=exp(log(Interceptopos(j)) +dampingpos(j)*(xmaxp(i)+
(xmaxp(i+1)-xmaxp(i))/2))
!write(*,*)'El T ent.Ampl es: La ampl exp es: La ampl med es: el decremento
es: '
!write(*,*)Periodopos(j),Amplitudmediapos1(j),Amplitudmediapos(j),dampingpos(j)
j=j+1
end do
write(*,*)'Las maximas amplitudes para los negativos: '
j=1
do i=1,l-1
Periodoneg(j)=xmaxn(i+1)-xmaxn(i)
dampingneg(j)=log(ymaxn(i+1)/ymaxn(i))/ Periodoneg(j)
!AMPLITUD PROMEDIO
Amplitudmedianeg(j)=(ymaxn(i+1)+ymaxn(i))/2
Interceptoneg(j)=exp(log(-ymaxn(i))-dampingneg(j)*xmaxn(i))
!AMPLITUD CON LA FUNCION EXPONENCIAL
Amplitudmedianeg1(j)=-exp(log(Interceptoneg(j)) +dampingneg(j)*(xmaxn(i)+
(xmaxn(i+1)-xmaxn(i))/2))
!write(*,*)'El T ent.Ampl es: La ampl exp es: La ampl med es: el decremento
es: '
!write(*,*)Periodopos(j),Amplitudmedianeg1(j),Amplitudmedianeg(j),dampingneg(j)
j=j+1
end do
!POSITIVO
promediox=0
promedioy=0
do i=1,k
promediox=promediox+(xmaxp(i)/k)
ymaxp(i)=log(ymaxp(i))
promedioy=promedioy+(ymaxp(i)/k)
end do
do i=1,k
diferenciax=xmaxp(i)-promediox
diferenciaxcuadrado=diferenciax**2
diferenciay=ymaxp(i)-promedioy
!write(*,*)ymaxp(i),diferenciax,diferenciay,diferenciaxcuad
difxdify=diferenciax*diferenciay
end do
pendientependiente=difxdify/diferenciaxcuadrado
pinterceptointercepto=promedioy-pendientependiente*promediox
pinterceptointercepto=exp(pinterceptointercepto)
write(*,*)promedioy,pendientependiente,pinterceptointercepto
!NEGATIVO
promedioxn=0
promedioyn=0
do j=1,l
promedioxn=promedioxn+(xmaxn(j)/k)
!CAMBIANDO A POSITIVO LOS NEGATIVOS
ymaxnp(j)=log(-ymaxn(j))
promedioyn=promedioyn+(ymaxnp(j)/k)
end do
do j=1,l
diferenciaxn=xmaxn(j)-promedioxn
diferenciaxcuadradon=diferenciaxn**2
diferenciayn=ymaxnp(j)-promedioyn
!write(*,*)ymaxp(i),diferenciax,diferenciay,diferenciaxcuad
difxdifyn=diferenciaxn*diferenciayn
end do
pendientependienten=difxdifyn/diferenciaxcuadradon
pinterceptointercepton=promedioyn-pendientependienten*promedioxn
pinterceptointercepton=exp(pinterceptointercepton)
write(*,*)promedioyn,pendientependienten,pinterceptointercepton
do
while(pinterceptointercepto.lt.pinterceptointercepton)!.or.pendientependienten.g
t.pendientependiente)
!POSITIVO
promediox=0
promedioy=0
do i=1,k
promediox=promediox+(xmaxp(i)/k)
ymaxp(i)=exp(ymaxp(i))
ymaxp(i)=log(ymaxp(i))
promedioy=promedioy+(ymaxp(i)/k)
ymaxp(i)=ymaxp(i)-0.018
end do
do i=1,k
diferenciax=xmaxp(i)-promediox
diferenciaxcuadrado=diferenciax**2
diferenciay=ymaxp(i)-promedioy
difxdify=diferenciax*diferenciay
end do
pendientependiente=difxdify/diferenciaxcuadrado
pinterceptointercepto=promedioy-pendientependiente*promediox
pinterceptointercepto=exp(pinterceptointercepto)
!NEGATIVO
promedioxn=0
promedioyn=0
do j=1,l
ymaxn(j)=-(ymaxn(j))
ymaxn(j)=log(ymaxn(j))
end do
do j=1,l
promedioxn=promedioxn+(xmaxn(j)/l)
promedioyn=promedioyn+(ymaxn(j)/k)
!CAMBIANDO A POSITIVO LOS NEGATIVOS
ymaxn(j)=ymaxn(j)-0.018
end do
do j=1,l
diferenciaxn=xmaxn(j)-promedioxn
diferenciaxcuadradon=diferenciaxn**2
diferenciayn=ymaxnp(j)-promedioyn
difxdifyn=diferenciaxn*diferenciayn
end do
pendientependienten=difxdifyn/diferenciaxcuadradon
pinterceptointercepton=promedioyn-pendientependienten*promedioxn
pinterceptointercepton=exp(pinterceptointercepton)
write(*,*)1,promedioy,pendientependiente,pinterceptointercepto
write(*,*)2,promedioyn,pendientependienten,pinterceptointercepton
!pause
end do
!coeficiente3=0
!coeficiente4=0
!coeficiente5=0
!coeficiente6=0
!coeficiente7=0
!REGRESION DE LOS VALORES DADOS POR EL INCLINOMETRO
!do i=1,k
!coeficiente1=coeficiente1+xmaxp(i)*Amplitudmediapos(i)
!coeficiente2=coeficiente2+tiempo(i)
!coeficiente3=coeficiente3(1)+Amplitudmediapos(i)
!coeficiente4=coeficiente4+tiempo(i)**2
!coeficiente5=(coeficiente5+tiempo(i))**2
!coeficiente6=coeficiente6+Amplitudmediapos(i)**2
!coeficiente7=(coeficiente7+Amplitudmediapos(i))**2
!coeficientecorr=(N*coeficiente1-coeficiente2*coeficiente3)/(((N*coeficiente4-
coeficiente5)**0.5)*((N*coeficiente6-coeficiente7)**0.5)
!coeficientecorr=coeficientecorr**2
!end do
end
!coeficiente3=0
!coeficiente4=0
!coeficiente5=0
!coeficiente6=0
!coeficiente7=0
!REGRESION DE LOS VALORES DADOS POR EL INCLINOMETRO
!do i=1,k
!coeficiente1=coeficiente1+xmaxp(i)*Amplitudmediapos(i)
!coeficiente2=coeficiente2+tiempo(i)
!coeficiente3=coeficiente3(1)+Amplitudmediapos(i)
!coeficiente4=coeficiente4+tiempo(i)**2
!coeficiente5=(coeficiente5+tiempo(i))**2
!coeficiente6=coeficiente6+Amplitudmediapos(i)**2
!coeficiente7=(coeficiente7+Amplitudmediapos(i))**2
!coeficientecorr=(N*coeficiente1-coeficiente2*coeficiente3)/(((N*coeficiente4-
coeficiente5)**0.5)*((N*coeficiente6-coeficiente7)**0.5)
!coeficientecorr=coeficientecorr**2
!end do
end

Weitere ähnliche Inhalte

Kürzlich hochgeladen

tipos de suspension automotriz -rea marlon.pdf
tipos de suspension automotriz -rea marlon.pdftipos de suspension automotriz -rea marlon.pdf
tipos de suspension automotriz -rea marlon.pdfmarlonrea6
 
AC-CDI Electricidad de motocicleta, diagrama de conexion
AC-CDI Electricidad de motocicleta, diagrama de conexionAC-CDI Electricidad de motocicleta, diagrama de conexion
AC-CDI Electricidad de motocicleta, diagrama de conexionignix1
 
Manual de usuario de camioneta Mitsubishi L200.pdf
Manual de usuario de camioneta Mitsubishi L200.pdfManual de usuario de camioneta Mitsubishi L200.pdf
Manual de usuario de camioneta Mitsubishi L200.pdfotonimaster11
 
BALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptx
BALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptxBALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptx
BALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptxJERSONSEBASTIANLOAIZ
 
propoketapropoketapropoketapropoketa.pptx
propoketapropoketapropoketapropoketa.pptxpropoketapropoketapropoketapropoketa.pptx
propoketapropoketapropoketapropoketa.pptxJenniferNatalyRomero
 
valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...
valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...
valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...Valentinaascanio1
 
SENSORES POSICION MOTOR y su ubicacion en el motor
SENSORES POSICION MOTOR y su ubicacion en el motorSENSORES POSICION MOTOR y su ubicacion en el motor
SENSORES POSICION MOTOR y su ubicacion en el motorjaiberarias1
 
Calculadora de salud.pdfjsisiskejdjdjkjk
Calculadora de salud.pdfjsisiskejdjdjkjkCalculadora de salud.pdfjsisiskejdjdjkjk
Calculadora de salud.pdfjsisiskejdjdjkjkemilianodominguez13
 

Kürzlich hochgeladen (8)

tipos de suspension automotriz -rea marlon.pdf
tipos de suspension automotriz -rea marlon.pdftipos de suspension automotriz -rea marlon.pdf
tipos de suspension automotriz -rea marlon.pdf
 
AC-CDI Electricidad de motocicleta, diagrama de conexion
AC-CDI Electricidad de motocicleta, diagrama de conexionAC-CDI Electricidad de motocicleta, diagrama de conexion
AC-CDI Electricidad de motocicleta, diagrama de conexion
 
Manual de usuario de camioneta Mitsubishi L200.pdf
Manual de usuario de camioneta Mitsubishi L200.pdfManual de usuario de camioneta Mitsubishi L200.pdf
Manual de usuario de camioneta Mitsubishi L200.pdf
 
BALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptx
BALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptxBALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptx
BALANCE TÉRMICO-MOTORES DE COMBUSTIÓN INTERNA.pptx
 
propoketapropoketapropoketapropoketa.pptx
propoketapropoketapropoketapropoketa.pptxpropoketapropoketapropoketapropoketa.pptx
propoketapropoketapropoketapropoketa.pptx
 
valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...
valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...
valentina ascanio jimenez bbbbbbbbbbbbbbnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...
 
SENSORES POSICION MOTOR y su ubicacion en el motor
SENSORES POSICION MOTOR y su ubicacion en el motorSENSORES POSICION MOTOR y su ubicacion en el motor
SENSORES POSICION MOTOR y su ubicacion en el motor
 
Calculadora de salud.pdfjsisiskejdjdjkjk
Calculadora de salud.pdfjsisiskejdjdjkjkCalculadora de salud.pdfjsisiskejdjdjkjk
Calculadora de salud.pdfjsisiskejdjdjkjk
 

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Procesamiento

  • 1. Program PROCESS real tiempo ,amplitud !valores del archivo de datos real apc,bpc,cpc,anc,bnc,cnc !valores a interpolar real tapc,tbpc,tcpc,tanc,tbnc,tcnc !valores a interpolar real a1p,a2p,a3p,xmaxp,ymaxp !Parametros de la ecuacion cuadratica real a1n,a2n,a3n,xmaxn,ymaxn !Parametros de la ecuacion cuadratica real Periodopos,Periodoneg,dampingpos,dampingneg real Amplitudmediapos,Amplitudmedianeg real Amplitudmediapos1,Amplitudmedianeg1,Interceptopos,Interceptoneg !valor de la amplitud exponencial real pendientepos,interceptoposl,xcero,xceron,tcero,tceron !Interpolacion lineal real ymaxnp dimension tiempo (100000),amplitud(10000) !valores del archivo de datos dimension apc(100000),bpc(100000),cpc(100000),anc(100000),bnc(100000),cnc (100000) !valores a interpolar dimension tapc(100000),tbpc(100000),tcpc(100000),tanc(100000),tbnc(100000),tcnc (100000) !valores a interpolar dimension a1p(100000),a2p(100000),a3p(100000),xmaxp(100000),ymaxp(100000) !Parametros de la ecuacion cuadratica dimension a1n(100000),a2n(100000),a3n(100000),xmaxn(100000),ymaxn(100000) !Parametros de la ecuacion cuadratica dimension Periodopos(100000),Periodoneg(100000),dampingpos(100000),dampingneg(100000) dimension Amplitudmediapos(100000),Amplitudmedianeg(100000) dimension Amplitudmediapos1(100000),Amplitudmedianeg1(100000),Interceptopos(100000),Interc eptoneg(100000) !valor de la amplitud exponencial dimension apl(100000),bpl(100000),tapl(100000),tbpl(100000),pendientepos(100000),intercept oposl(100000),xcero(100000),xceron(100000),tcero(100000),tceron(100000) !Interpolacion lineal dimension ymaxnp(100000) CHARACTER(30) ARCHDAT ARCHDAT="ANGULO.TXT" OPEN(6,FILE=ARCHDAT,STATUS="OLD") READ(6,*) N ! N es entero !write(*,*) N do i=1,n READ(6,*) tiempo (i),amplitud(i) !write(*,*) tiempo (i),amplitud(i) !write(*,10)tiempo(i),amplitud(i) !10 format(/'El tiempo es:',5x,f15.3,'[Seg]',/,'la amplitud es:',5x,f13.3,'[ª]') ! , o ,/, para saltar, f15.3 numero de caracteres y decimales end do k=0 t=0 do m=1,n-1 if (amplitud(m).gt.0.0.and.amplitud(m+1).lt.0.0)then k=k+1 apl(k)=amplitud(m)
  • 2. bpl(k)=amplitud(m+1) tapl(k)=tiempo(m) tbpl(k)=tiempo(m+1) !INTERPOLACION LINEAL pendientepos(k)=(bpl(k)-apl(k))/(tbpl(k)-tapl(k)) interceptoposl(k)= apl(k)- pendientepos(k)*tapl(k) xcero(k)=-interceptoposl(k) / pendientepos(k) !Write(*,*)xcero(k) else if(amplitud(m).lt.0.0.and.amplitud(m+1).gt.0.0)then t=t+1 apl(t)=amplitud(m) bpl(t)=amplitud(m+1) tapl(t)=tiempo(m) tbpl(t)=tiempo(m+1) !INTERPOLACION LINEAL pendientepos(t)=(bpl(t)-apl(t))/(tbpl(t)-tapl(t)) interceptoposl(t)= apl(t)- pendientepos(t)*tapl(t) xceron(t)=-interceptoposl(t) / pendientepos(t) !Write(*,*)xceron(t) end if end do !Write(*,*)k,t write(*,*)'la interceccion con la abcisa para los positivos es: ' ll=1 do i=1,k-1 tcero(ll)=xcero(i+1)-xcero(i) ll=ll+1 Write(*,*)tcero(ll-1) end do write(*,*)'la interceccion con la abcisa para para los negativos: ' kk=1 do i=1,t-1 tceron(kk)=xceron(i+1)-xceron(i) kk=kk+1 Write(*,*)tceron(kk-1) end do k=0 !contador de el numero de valores maximos l=0 !contador de el numero de valores minimos do i=1,n-2 if (amplitud(i).gt.0.0)then if (amplitud(i+1).ge.amplitud(i).and.amplitud(i+1).gt.amplitud(i+2))then k=k+1 apc(k)=amplitud(i) bpc(k)=amplitud(i+1) cpc(k)=amplitud(i+2) tapc(k)=tiempo(i) tbpc(k)=tiempo(i+1) tcpc(k)=tiempo(i+2) !BUSCAR LOS PARAMETROS DE LA ECUACION CUADRATICA a3p(k)=(2/(tcpc(k)-tapc(k)))*(((cpc(k)-apc(k))/(tcpc(k)- tapc(k)))-((bpc(k)-apc(k))/(tbpc(k)-tapc(k)))) a2p(k)= ((bpc(k)-apc(k))/(tbpc(k)-tapc(k)))-a3p(k)*(tbpc(k)
  • 3. +tapc(k)) a1p(k)= apc(k)- ((bpc(k)-apc(k))/(tbpc(k)-tapc(k)))*tapc(k)+ a3p(k)*tapc(k)*tbpc(k) !ENCONTRAR EL MAXIMO DE LA FUNCION xmaxp(k)=-a2p(k)/(2*a3p(k)) ymaxp(k)=a1p(k)+a2p(k)*xmaxp(k)+a3p(k)*xmaxp(k)*xmaxp(k) !write(*,*)xmaxp(k),ymaxp(k),k end if else if(amplitud(i+1).le.amplitud(i).and.amplitud(i+1).lt.amplitud(i+2))then l=l+1 anc(l)=amplitud(i) bnc(l)=amplitud(i+1) cnc(l)=amplitud(i+2) tanc(l)=tiempo(i) tbnc(l)=tiempo(i+1) tcnc(l)=tiempo(i+2) !BUSCAR LOS PARAMETROS DE LA ECUACION CUADRATICA a3n(l)=(2/(tcnc(l)-tanc(l)))*(((cnc(l)-anc(l))/(tcnc(l)- tanc(l)))-((bnc(l)-anc(l))/(tbnc(l)-tanc(l)))) a2n(l)= ((bnc(l)-anc(l))/(tbnc(l)-tanc(l)))-a3n(l)*(tbnc(l) +tanc(l)) a1n(l)= anc(l)- ((bnc(l)-anc(l))/(tbnc(l)-tanc(l)))*tanc(l)+ a3n(l)*tanc(l)*tbnc(l) !ENCONTRAR EL MAXIMO DE LA FUNCION xmaxn(l)=-a2n(l)/(2*a3n(l)) ymaxn(l)=a1n(l)+a2n(l)*xmaxn(l)+a3n(l)*xmaxn(l)*xmaxn(l) !write(*,*)xmaxn(l),l end if end if end do write(*,*)'Las maximas amplitudes para los positivos son: ' j=1 do i=1,k-1 Periodopos(j)=xmaxp(i+1)-xmaxp(i) dampingpos(j)=log(ymaxp(i+1)/ymaxp(i))/Periodopos(j) !AMPLITUD PROMEDIO Amplitudmediapos(j)=(ymaxp(i+1)+ymaxp(i))/2 Interceptopos(j)=exp(log(ymaxp(i))-dampingpos(j)*xmaxp(i)) !AMPLITUD CON LA FUNCION EXPONENCIAL Amplitudmediapos1(j)=exp(log(Interceptopos(j)) +dampingpos(j)*(xmaxp(i)+ (xmaxp(i+1)-xmaxp(i))/2)) !write(*,*)'El T ent.Ampl es: La ampl exp es: La ampl med es: el decremento es: ' !write(*,*)Periodopos(j),Amplitudmediapos1(j),Amplitudmediapos(j),dampingpos(j) j=j+1 end do write(*,*)'Las maximas amplitudes para los negativos: ' j=1 do i=1,l-1 Periodoneg(j)=xmaxn(i+1)-xmaxn(i) dampingneg(j)=log(ymaxn(i+1)/ymaxn(i))/ Periodoneg(j) !AMPLITUD PROMEDIO Amplitudmedianeg(j)=(ymaxn(i+1)+ymaxn(i))/2
  • 4. Interceptoneg(j)=exp(log(-ymaxn(i))-dampingneg(j)*xmaxn(i)) !AMPLITUD CON LA FUNCION EXPONENCIAL Amplitudmedianeg1(j)=-exp(log(Interceptoneg(j)) +dampingneg(j)*(xmaxn(i)+ (xmaxn(i+1)-xmaxn(i))/2)) !write(*,*)'El T ent.Ampl es: La ampl exp es: La ampl med es: el decremento es: ' !write(*,*)Periodopos(j),Amplitudmedianeg1(j),Amplitudmedianeg(j),dampingneg(j) j=j+1 end do !POSITIVO promediox=0 promedioy=0 do i=1,k promediox=promediox+(xmaxp(i)/k) ymaxp(i)=log(ymaxp(i)) promedioy=promedioy+(ymaxp(i)/k) end do do i=1,k diferenciax=xmaxp(i)-promediox diferenciaxcuadrado=diferenciax**2 diferenciay=ymaxp(i)-promedioy !write(*,*)ymaxp(i),diferenciax,diferenciay,diferenciaxcuad difxdify=diferenciax*diferenciay end do pendientependiente=difxdify/diferenciaxcuadrado pinterceptointercepto=promedioy-pendientependiente*promediox pinterceptointercepto=exp(pinterceptointercepto) write(*,*)promedioy,pendientependiente,pinterceptointercepto !NEGATIVO promedioxn=0 promedioyn=0 do j=1,l promedioxn=promedioxn+(xmaxn(j)/k) !CAMBIANDO A POSITIVO LOS NEGATIVOS ymaxnp(j)=log(-ymaxn(j)) promedioyn=promedioyn+(ymaxnp(j)/k) end do do j=1,l diferenciaxn=xmaxn(j)-promedioxn diferenciaxcuadradon=diferenciaxn**2 diferenciayn=ymaxnp(j)-promedioyn !write(*,*)ymaxp(i),diferenciax,diferenciay,diferenciaxcuad difxdifyn=diferenciaxn*diferenciayn end do pendientependienten=difxdifyn/diferenciaxcuadradon pinterceptointercepton=promedioyn-pendientependienten*promedioxn pinterceptointercepton=exp(pinterceptointercepton) write(*,*)promedioyn,pendientependienten,pinterceptointercepton do while(pinterceptointercepto.lt.pinterceptointercepton)!.or.pendientependienten.g t.pendientependiente) !POSITIVO
  • 5. promediox=0 promedioy=0 do i=1,k promediox=promediox+(xmaxp(i)/k) ymaxp(i)=exp(ymaxp(i)) ymaxp(i)=log(ymaxp(i)) promedioy=promedioy+(ymaxp(i)/k) ymaxp(i)=ymaxp(i)-0.018 end do do i=1,k diferenciax=xmaxp(i)-promediox diferenciaxcuadrado=diferenciax**2 diferenciay=ymaxp(i)-promedioy difxdify=diferenciax*diferenciay end do pendientependiente=difxdify/diferenciaxcuadrado pinterceptointercepto=promedioy-pendientependiente*promediox pinterceptointercepto=exp(pinterceptointercepto) !NEGATIVO promedioxn=0 promedioyn=0 do j=1,l ymaxn(j)=-(ymaxn(j)) ymaxn(j)=log(ymaxn(j)) end do do j=1,l promedioxn=promedioxn+(xmaxn(j)/l) promedioyn=promedioyn+(ymaxn(j)/k) !CAMBIANDO A POSITIVO LOS NEGATIVOS ymaxn(j)=ymaxn(j)-0.018 end do do j=1,l diferenciaxn=xmaxn(j)-promedioxn diferenciaxcuadradon=diferenciaxn**2 diferenciayn=ymaxnp(j)-promedioyn difxdifyn=diferenciaxn*diferenciayn end do pendientependienten=difxdifyn/diferenciaxcuadradon pinterceptointercepton=promedioyn-pendientependienten*promedioxn pinterceptointercepton=exp(pinterceptointercepton) write(*,*)1,promedioy,pendientependiente,pinterceptointercepto write(*,*)2,promedioyn,pendientependienten,pinterceptointercepton !pause end do
  • 6. !coeficiente3=0 !coeficiente4=0 !coeficiente5=0 !coeficiente6=0 !coeficiente7=0 !REGRESION DE LOS VALORES DADOS POR EL INCLINOMETRO !do i=1,k !coeficiente1=coeficiente1+xmaxp(i)*Amplitudmediapos(i) !coeficiente2=coeficiente2+tiempo(i) !coeficiente3=coeficiente3(1)+Amplitudmediapos(i) !coeficiente4=coeficiente4+tiempo(i)**2 !coeficiente5=(coeficiente5+tiempo(i))**2 !coeficiente6=coeficiente6+Amplitudmediapos(i)**2 !coeficiente7=(coeficiente7+Amplitudmediapos(i))**2 !coeficientecorr=(N*coeficiente1-coeficiente2*coeficiente3)/(((N*coeficiente4- coeficiente5)**0.5)*((N*coeficiente6-coeficiente7)**0.5) !coeficientecorr=coeficientecorr**2 !end do end
  • 7. !coeficiente3=0 !coeficiente4=0 !coeficiente5=0 !coeficiente6=0 !coeficiente7=0 !REGRESION DE LOS VALORES DADOS POR EL INCLINOMETRO !do i=1,k !coeficiente1=coeficiente1+xmaxp(i)*Amplitudmediapos(i) !coeficiente2=coeficiente2+tiempo(i) !coeficiente3=coeficiente3(1)+Amplitudmediapos(i) !coeficiente4=coeficiente4+tiempo(i)**2 !coeficiente5=(coeficiente5+tiempo(i))**2 !coeficiente6=coeficiente6+Amplitudmediapos(i)**2 !coeficiente7=(coeficiente7+Amplitudmediapos(i))**2 !coeficientecorr=(N*coeficiente1-coeficiente2*coeficiente3)/(((N*coeficiente4- coeficiente5)**0.5)*((N*coeficiente6-coeficiente7)**0.5) !coeficientecorr=coeficientecorr**2 !end do end