SlideShare a Scribd company logo
Sajid Ali
                                                                081220-097


INTERPOLATION Methods:

      NEWTON FORWARD DIFFERENCE METHOD:


n = input('nEnter number of data points = ');
h = input('nEnter step size (h) = ')
x(1) = input('nx0 = ');
y(1) = input('y0 = ');
for i=2:n
    x(i)=x(i-1)+h;
    fprintf('nX%d = %f',i,x(i));
    fprintf('ttY%d: ',i);
    y(i) = input('');
end
x_reqd = input('nEnter X for which value of Y is sought: ');
s=(x_reqd-x(1))/h;
for i=1:n
    diff(i,1)=y(i);
end
%% Calculate Forward Differance Table
for j=2:n
    for i=1:n-j+1
        diff(i,j)=diff(i+1,j-1)-diff(i,j-1);
    end
end
%% Print Forward Differance Table
fprintf('ntXt      Forward Differance Table');
for i=1:n
    fprintf('n %.4f',x(i));
    for j=1:n-i+1
        fprintf('t%.4f',diff(i,j));
    end
end
ans=y(1);
for i=1:n-1
    term=1;
    for j=1:i
        term=term*(s+j-1)/j;
    end
    ans=ans+term*diff(1,i+1);
end




      Backward Methed:
function Forward()

 x=[0;1;2;3;4;5;6];
y=[2;3;10;29;66;127;218];
 dy=[y(2,1)-y(1,1);y(3,1)-y(2,1);y(4,1)-y(3,1);y(5,1)-y(4,1);y(6,1)-
y(5,1);y(7,1)-y(6,1)];
 d2y=[dy(2,1)-dy(1,1);dy(3,1)-dy(2,1);dy(4,1)-dy(3,1);dy(5,1)-
dy(4,1);dy(6,1)-dy(5,1)];
 d3y=[d2y(2,1)-d2y(1,1);d2y(3,1)-d2y(2,1);d2y(4,1)-d2y(3,1);d2y(5,1)-
d2y(4,1)];
 d4y=[d3y(2,1)-d3y(1,1);d3y(3,1)-d3y(2,1);d3y(4,1)-d3y(3,1)];
 d5y=[d4y(2,1)-d4y(1,1);d4y(3,1)-d4y(2,1)];
 d6y=[d5y(2,1)-d5y(1,1)];
 p=(.5-0)/1;
 Y=y(1,1)+(((p*dy(1,1)))+((p*(p-1))/2)*d2y(1,1))+(((p*(p-1)*(p-
2))/6)*d3y(1,1))+(((p*(p-1)*(p-2)*(p-3))/24)*d4y(1,1))+(((p*(p-1)*(p-2)*(p-
3)*(p-4))/120)*d5y(1,1))+(((p*(p-1)*(p-2)*(p-3)*(p-4)*(p-5))/720)*d6y(1,1))

   end

         Striling
   function Forward()

    x=[0;1;2;3;4;5;6];
    y=[2;3;10;29;66;127;218];
    dy=[y(2,1)-y(1,1);y(3,1)-y(2,1);y(4,1)-y(3,1);y(5,1)-y(4,1);y(6,1)-
   y(5,1);y(7,1)-y(6,1)];
    d2y=[dy(2,1)-dy(1,1);dy(3,1)-dy(2,1);dy(4,1)-dy(3,1);dy(5,1)-
   dy(4,1);dy(6,1)-dy(5,1)];
    d3y=[d2y(2,1)-d2y(1,1);d2y(3,1)-d2y(2,1);d2y(4,1)-d2y(3,1);d2y(5,1)-
   d2y(4,1)];
    d4y=[d3y(2,1)-d3y(1,1);d3y(3,1)-d3y(2,1);d3y(4,1)-d3y(3,1)];
    d5y=[d4y(2,1)-d4y(1,1);d4y(3,1)-d4y(2,1)];
    d6y=[d5y(2,1)-d5y(1,1)];
    p=(.5-0)/1;
    Y=y(1,1)+(((p*dy(1,1)))+((p*(p-1))/2)*d2y(1,1))+(((p*(p-1)*(p-
   2))/6)*d3y(1,1))+(((p*(p-1)*(p-2)*(p-3))/24)*d4y(1,1))+(((p*(p-1)*(p-
   2)*(p-3)*(p-4))/120)*d5y(1,1))+(((p*(p-1)*(p-2)*(p-3)*(p-4)*(p-
   5))/720)*d6y(1,1))

    end

More Related Content

What's hot

Swadeshi Microprocessor Quiz 2020 (Start-up India)
Swadeshi Microprocessor Quiz 2020 (Start-up India)Swadeshi Microprocessor Quiz 2020 (Start-up India)
Swadeshi Microprocessor Quiz 2020 (Start-up India)
PARNIKA GUPTA
 
11103500 61599 sagar (1)
11103500 61599 sagar (1)11103500 61599 sagar (1)
11103500 61599 sagar (1)
Rounit Roy
 
2 d rotation
2 d rotation2 d rotation
2 d rotation
Chandu Kumare
 
1
11
Vcs22
Vcs22Vcs22
Dvst
DvstDvst
Dvst
hahaa225
 
Angelica curve sketching project
Angelica curve sketching projectAngelica curve sketching project
Angelica curve sketching project
asmith123183
 
C programming codes for the class assignment
C programming codes for the class assignmentC programming codes for the class assignment
C programming codes for the class assignment
Zenith SVG
 
Program to reflecta triangle
Program to reflecta triangleProgram to reflecta triangle
Program to reflecta triangle
Tanya Makkar
 
Sinusoidal graphs example
Sinusoidal graphs  exampleSinusoidal graphs  example
Sinusoidal graphs example
monster2010
 
PROYECTO PEDRO
PROYECTO PEDROPROYECTO PEDRO
PROYECTO PEDRO
PedroToapanta
 
Numerical methods course project report
Numerical methods course project reportNumerical methods course project report
Numerical methods course project report
Zeeshan Ali
 
C programs pbq final
C programs pbq finalC programs pbq final
C programs pbq final
Azad public school
 
Monte-carlo sim pricing EU call
Monte-carlo sim pricing EU callMonte-carlo sim pricing EU call
Monte-carlo sim pricing EU call
Tianqi Huang, CFA
 
PYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing TreesPYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing Trees
Tianqi Huang, CFA
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
PRATHAMESH DESHPANDE
 

What's hot (16)

Swadeshi Microprocessor Quiz 2020 (Start-up India)
Swadeshi Microprocessor Quiz 2020 (Start-up India)Swadeshi Microprocessor Quiz 2020 (Start-up India)
Swadeshi Microprocessor Quiz 2020 (Start-up India)
 
11103500 61599 sagar (1)
11103500 61599 sagar (1)11103500 61599 sagar (1)
11103500 61599 sagar (1)
 
2 d rotation
2 d rotation2 d rotation
2 d rotation
 
1
11
1
 
Vcs22
Vcs22Vcs22
Vcs22
 
Dvst
DvstDvst
Dvst
 
Angelica curve sketching project
Angelica curve sketching projectAngelica curve sketching project
Angelica curve sketching project
 
C programming codes for the class assignment
C programming codes for the class assignmentC programming codes for the class assignment
C programming codes for the class assignment
 
Program to reflecta triangle
Program to reflecta triangleProgram to reflecta triangle
Program to reflecta triangle
 
Sinusoidal graphs example
Sinusoidal graphs  exampleSinusoidal graphs  example
Sinusoidal graphs example
 
PROYECTO PEDRO
PROYECTO PEDROPROYECTO PEDRO
PROYECTO PEDRO
 
Numerical methods course project report
Numerical methods course project reportNumerical methods course project report
Numerical methods course project report
 
C programs pbq final
C programs pbq finalC programs pbq final
C programs pbq final
 
Monte-carlo sim pricing EU call
Monte-carlo sim pricing EU callMonte-carlo sim pricing EU call
Monte-carlo sim pricing EU call
 
PYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing TreesPYTHON. AM CALL Pricing Trees
PYTHON. AM CALL Pricing Trees
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
 

Viewers also liked

Hinode revista malu-12-12-13
Hinode revista malu-12-12-13Hinode revista malu-12-12-13
Hinode revista malu-12-12-13Luzia Faustino
 
Semillas del sol
Semillas del solSemillas del sol
Semillas del sol
Delty Nieto
 
Peer evaluation (I was a famous)
Peer evaluation (I was a famous)Peer evaluation (I was a famous)
Peer evaluation (I was a famous)
Julián Sanz Mamolar
 
Periodental ligament
Periodental  ligamentPeriodental  ligament
Periodental ligament
Khushboo Nathani
 
Pravila čitanja
Pravila čitanjaPravila čitanja
Pravila čitanja21vlada86
 
Deseo de un oso goloso [recuperado]
Deseo   de un oso  goloso [recuperado]Deseo   de un oso  goloso [recuperado]
Deseo de un oso goloso [recuperado]
felipugah
 
Peer feedback
Peer feedbackPeer feedback
Peer feedback
asmediab13
 
Shawky younis
Shawky younisShawky younis
Shawky younisSaed Ali
 
White paper como implementar o crm
White paper como implementar o crmWhite paper como implementar o crm
White paper como implementar o crm
Avitis Software Development
 
Curso virtual sesión 2
Curso virtual sesión 2Curso virtual sesión 2
Curso virtual sesión 2
Lore Pacheco Salazar
 
Ppt romantismo proinfo 26.06.2013
Ppt romantismo   proinfo 26.06.2013Ppt romantismo   proinfo 26.06.2013
Ppt romantismo proinfo 26.06.2013
Rosana_occhietti
 
Name
NameName
Mi ple alan gutierrez sanginez
Mi ple   alan gutierrez sanginezMi ple   alan gutierrez sanginez
Mi ple alan gutierrez sanginezAlan Gutiérrez
 
Gibi Educação Fiscal - EMEF 25 de Julho
Gibi Educação Fiscal - EMEF 25 de JulhoGibi Educação Fiscal - EMEF 25 de Julho
Gibi Educação Fiscal - EMEF 25 de Julho
educacaofiscal25
 
Great Presentation, the best
Great Presentation, the bestGreat Presentation, the best
Great Presentation, the best
NereaPastor
 
Projetos de mdl
Projetos de mdlProjetos de mdl
Projetos de mdl
Coisitchas DaAdry
 
Certificacion
CertificacionCertificacion
Certificacion
Vanesa Porras
 
Dpii com concurso de agentes
Dpii com concurso de agentesDpii com concurso de agentes
Dpii com concurso de agentesGeyzyely Lima
 

Viewers also liked (20)

Hinode revista malu-12-12-13
Hinode revista malu-12-12-13Hinode revista malu-12-12-13
Hinode revista malu-12-12-13
 
Semillas del sol
Semillas del solSemillas del sol
Semillas del sol
 
34
3434
34
 
Peer evaluation (I was a famous)
Peer evaluation (I was a famous)Peer evaluation (I was a famous)
Peer evaluation (I was a famous)
 
Periodental ligament
Periodental  ligamentPeriodental  ligament
Periodental ligament
 
Pravila čitanja
Pravila čitanjaPravila čitanja
Pravila čitanja
 
Deseo de un oso goloso [recuperado]
Deseo   de un oso  goloso [recuperado]Deseo   de un oso  goloso [recuperado]
Deseo de un oso goloso [recuperado]
 
Peer feedback
Peer feedbackPeer feedback
Peer feedback
 
Shawky younis
Shawky younisShawky younis
Shawky younis
 
White paper como implementar o crm
White paper como implementar o crmWhite paper como implementar o crm
White paper como implementar o crm
 
Curso virtual sesión 2
Curso virtual sesión 2Curso virtual sesión 2
Curso virtual sesión 2
 
Ppt romantismo proinfo 26.06.2013
Ppt romantismo   proinfo 26.06.2013Ppt romantismo   proinfo 26.06.2013
Ppt romantismo proinfo 26.06.2013
 
Name
NameName
Name
 
Mi ple alan gutierrez sanginez
Mi ple   alan gutierrez sanginezMi ple   alan gutierrez sanginez
Mi ple alan gutierrez sanginez
 
Gibi Educação Fiscal - EMEF 25 de Julho
Gibi Educação Fiscal - EMEF 25 de JulhoGibi Educação Fiscal - EMEF 25 de Julho
Gibi Educação Fiscal - EMEF 25 de Julho
 
Great Presentation, the best
Great Presentation, the bestGreat Presentation, the best
Great Presentation, the best
 
46
4646
46
 
Projetos de mdl
Projetos de mdlProjetos de mdl
Projetos de mdl
 
Certificacion
CertificacionCertificacion
Certificacion
 
Dpii com concurso de agentes
Dpii com concurso de agentesDpii com concurso de agentes
Dpii com concurso de agentes
 

Similar to Assignmnt 4

Martha
MarthaMartha
Martha
MarthaPaz
 
Trabajo Scilab
Trabajo ScilabTrabajo Scilab
Trabajo Scilab
alexistorres
 
The Moore-Spiegel Oscillator
The Moore-Spiegel OscillatorThe Moore-Spiegel Oscillator
The Moore-Spiegel Oscillator
Abhranil Das
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
Practicle 1.docx
Practicle 1.docxPracticle 1.docx
Practicle 1.docx
GaneshPawar819187
 
Matlab assignment
Matlab assignmentMatlab assignment
Matlab assignment
Rutvik
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C Code
Syed Ahmed Zaki
 
Cs580
Cs580Cs580
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptx
happycocoman
 
Forward & Backward Differenece Table
Forward & Backward Differenece TableForward & Backward Differenece Table
Forward & Backward Differenece Table
Saloni Singhal
 
Tarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian VasquezTarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian Vasquez
Sebastian Vasquez
 
PROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS - SARASWATHI RAMALINGAM
PROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS  - SARASWATHI RAMALINGAMPROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS  - SARASWATHI RAMALINGAM
PROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdfIncorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
aartechindia
 
Runge kutta C programme
Runge kutta C programmeRunge kutta C programme
Runge kutta C programme
Shah Keval
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignment
ashikul akash
 
Sary
SarySary
Interpolation graph c++
Interpolation graph c++Interpolation graph c++
Interpolation graph c++
rpiitcbme
 
Advanced Search Techniques
Advanced Search TechniquesAdvanced Search Techniques
Advanced Search Techniques
Shakil Ahmed
 
matlab codes.pdf
matlab codes.pdfmatlab codes.pdf
matlab codes.pdf
EdysaulCondorhuancar
 
DataStructures notes
DataStructures notesDataStructures notes
DataStructures notes
Lakshmi Sarvani Videla
 

Similar to Assignmnt 4 (20)

Martha
MarthaMartha
Martha
 
Trabajo Scilab
Trabajo ScilabTrabajo Scilab
Trabajo Scilab
 
The Moore-Spiegel Oscillator
The Moore-Spiegel OscillatorThe Moore-Spiegel Oscillator
The Moore-Spiegel Oscillator
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
Practicle 1.docx
Practicle 1.docxPracticle 1.docx
Practicle 1.docx
 
Matlab assignment
Matlab assignmentMatlab assignment
Matlab assignment
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C Code
 
Cs580
Cs580Cs580
Cs580
 
L25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptxL25-L26-Parameter passing techniques.pptx
L25-L26-Parameter passing techniques.pptx
 
Forward & Backward Differenece Table
Forward & Backward Differenece TableForward & Backward Differenece Table
Forward & Backward Differenece Table
 
Tarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian VasquezTarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian Vasquez
 
PROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS - SARASWATHI RAMALINGAM
PROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS  - SARASWATHI RAMALINGAMPROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS  - SARASWATHI RAMALINGAM
PROGRAMMING IN C EXAMPLE PROGRAMS FOR NEW LEARNERS - SARASWATHI RAMALINGAM
 
Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdfIncorporate the SOR method in the multigridTest-m and apply the multig.pdf
Incorporate the SOR method in the multigridTest-m and apply the multig.pdf
 
Runge kutta C programme
Runge kutta C programmeRunge kutta C programme
Runge kutta C programme
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignment
 
Sary
SarySary
Sary
 
Interpolation graph c++
Interpolation graph c++Interpolation graph c++
Interpolation graph c++
 
Advanced Search Techniques
Advanced Search TechniquesAdvanced Search Techniques
Advanced Search Techniques
 
matlab codes.pdf
matlab codes.pdfmatlab codes.pdf
matlab codes.pdf
 
DataStructures notes
DataStructures notesDataStructures notes
DataStructures notes
 

Recently uploaded

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 

Recently uploaded (20)

Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 

Assignmnt 4

  • 1. Sajid Ali 081220-097 INTERPOLATION Methods: NEWTON FORWARD DIFFERENCE METHOD: n = input('nEnter number of data points = '); h = input('nEnter step size (h) = ') x(1) = input('nx0 = '); y(1) = input('y0 = '); for i=2:n x(i)=x(i-1)+h; fprintf('nX%d = %f',i,x(i)); fprintf('ttY%d: ',i); y(i) = input(''); end x_reqd = input('nEnter X for which value of Y is sought: '); s=(x_reqd-x(1))/h; for i=1:n diff(i,1)=y(i); end %% Calculate Forward Differance Table for j=2:n for i=1:n-j+1 diff(i,j)=diff(i+1,j-1)-diff(i,j-1); end end %% Print Forward Differance Table fprintf('ntXt Forward Differance Table'); for i=1:n fprintf('n %.4f',x(i)); for j=1:n-i+1 fprintf('t%.4f',diff(i,j)); end end ans=y(1); for i=1:n-1 term=1; for j=1:i term=term*(s+j-1)/j; end ans=ans+term*diff(1,i+1); end Backward Methed: function Forward() x=[0;1;2;3;4;5;6];
  • 2. y=[2;3;10;29;66;127;218]; dy=[y(2,1)-y(1,1);y(3,1)-y(2,1);y(4,1)-y(3,1);y(5,1)-y(4,1);y(6,1)- y(5,1);y(7,1)-y(6,1)]; d2y=[dy(2,1)-dy(1,1);dy(3,1)-dy(2,1);dy(4,1)-dy(3,1);dy(5,1)- dy(4,1);dy(6,1)-dy(5,1)]; d3y=[d2y(2,1)-d2y(1,1);d2y(3,1)-d2y(2,1);d2y(4,1)-d2y(3,1);d2y(5,1)- d2y(4,1)]; d4y=[d3y(2,1)-d3y(1,1);d3y(3,1)-d3y(2,1);d3y(4,1)-d3y(3,1)]; d5y=[d4y(2,1)-d4y(1,1);d4y(3,1)-d4y(2,1)]; d6y=[d5y(2,1)-d5y(1,1)]; p=(.5-0)/1; Y=y(1,1)+(((p*dy(1,1)))+((p*(p-1))/2)*d2y(1,1))+(((p*(p-1)*(p- 2))/6)*d3y(1,1))+(((p*(p-1)*(p-2)*(p-3))/24)*d4y(1,1))+(((p*(p-1)*(p-2)*(p- 3)*(p-4))/120)*d5y(1,1))+(((p*(p-1)*(p-2)*(p-3)*(p-4)*(p-5))/720)*d6y(1,1)) end Striling function Forward() x=[0;1;2;3;4;5;6]; y=[2;3;10;29;66;127;218]; dy=[y(2,1)-y(1,1);y(3,1)-y(2,1);y(4,1)-y(3,1);y(5,1)-y(4,1);y(6,1)- y(5,1);y(7,1)-y(6,1)]; d2y=[dy(2,1)-dy(1,1);dy(3,1)-dy(2,1);dy(4,1)-dy(3,1);dy(5,1)- dy(4,1);dy(6,1)-dy(5,1)]; d3y=[d2y(2,1)-d2y(1,1);d2y(3,1)-d2y(2,1);d2y(4,1)-d2y(3,1);d2y(5,1)- d2y(4,1)]; d4y=[d3y(2,1)-d3y(1,1);d3y(3,1)-d3y(2,1);d3y(4,1)-d3y(3,1)]; d5y=[d4y(2,1)-d4y(1,1);d4y(3,1)-d4y(2,1)]; d6y=[d5y(2,1)-d5y(1,1)]; p=(.5-0)/1; Y=y(1,1)+(((p*dy(1,1)))+((p*(p-1))/2)*d2y(1,1))+(((p*(p-1)*(p- 2))/6)*d3y(1,1))+(((p*(p-1)*(p-2)*(p-3))/24)*d4y(1,1))+(((p*(p-1)*(p- 2)*(p-3)*(p-4))/120)*d5y(1,1))+(((p*(p-1)*(p-2)*(p-3)*(p-4)*(p- 5))/720)*d6y(1,1)) end