- Embedded Diploma Contents (1)
- 1.C Prgm
- release_notes
- b tech 1st sem syllabus uemj
- 70-483 Exam Dumps with PDF and VCE Download
- sapnote_0000942785
- Note 1519477 - Certificate for Encryption With Subject 255 Characters
- HW1.pdf
- 1. Previous Question Papers for Four Year b. Tech i Semester Regular Examinations February 2012
- cdsunit1
- Tavant Technologies Sample Programming Placement Paper Level1
- Ansi c Coding Convention
- The C Language
- BAS-001
- lec10
- JNTU Question papers 2008
- supply chain magement
- DATASTRUCTUREUSINGC
- Chapter 8 Review
- ChangeLog
- Solutions Assignment 4
- 15799_eep28
- Age Problems.docx
- rptIpPrintNew-8
- D_Optimal
- New Text Document
- D_EE_Parts_II-&-III
- 100797244-C-Entire-Notes
- 1309281380357719quantitative Aptitude
- Intrebari
- apa 3
- International Student Booklet 2014
- Chele Natalia ASDN_2
- l
- Chele NataliaLFPC 3
- Albu Vera Teorie
- Document 1
- MASA 1
- Oop History
- Declaraţia de Independenţă a Republicii Moldova
- Lab Source Code
- Procese de Testare Si Infrastructur1
- Eseu Structurat Pentru Bac 2
- Bacalaureat Limba Romana Competene
- Sulac - Griu marunt
- Laborator 2. Programare
- 0 Texte Functionale

Laboratory Work Nr. 1

Chele Natalia [FAF-131]

Problem 1: Implement the function

Try to evaluate this function for x=10, 100, 1000. Please explain the result. Find a way to increase

accuracy of the evaluation.

Code in Matlab:

>> x=10;

>> y=(x.*exp(x)-1./(x.^2))./(x.*exp(x)+1./(x.^2))

y =

1.0000

>> x=100;

>> y=(x.*exp(x)-1./(x.^2))./(x.*exp(x)+1./(x.^2))

y =

1

>> x=1000;

>> y=(x.*exp(x)-1./(x.^2))./(x.*exp(x)+1./(x.^2))

y =

NaN

Comments:

For obtaining corresponding results I divided the fraction to exp(x) because 1/exp(x) is very close to 0,

then we have more accuracy in the result.

>> x=1000;

>> y=(x-(1/(x.^2.*exp(x))))/(x+(1/(x.^2.*exp(x))))

y =

1

Evrica!!! I got the same result as in previous cases.

Then if all calculations are exact. Results: >> c=0.*c) display r end r r r r r r r r r r r r r r r = 0 = 0 = 0 = 0 = 0 = 0 =-2.1.1 (1/10) because it hasn’t be stored in finite binary.Problem 2: Implement the following procedure Please explain obtained results. Do you notice anything wrong with your answers? To analyze this suppose that the only error is in .1.5580e-013 = 0 = 0 = 0 = 0 =-2. Problem 3: Compute the integral that Using integration by parts show Using your favorite programming system compute Ik for k=0.*x.3. where u is the unit of roundoff? .then in floating point arithmetic the results are with errors.25. It is infinite number of 0 and 1. what is the error in ? What error do you expect if _ = u. >> for x=1:15 r=10^(1+(2.2737e-012 = 0 = -6./10))-10^(1+2.*x.3665e-012 = 0 Comments: Here the problem is in the value c=0.2.: : :.

0305 13 0.0244 16 0.0454 9 0.0332 12 0.0878 5 0.0281 14 0.0365 11 0.exp(-1) for i = 1:25 Ik = -exp(-1)+i*I0. end end nr Result of iterations 0 0. I0 = Ik.1139 4 0.0096 .0599 7 0.2642 2 0. disp(Ik).0222 17 0.6321 1 0.1606 3 0.0262 15 0.1 1 I o=∫ e−x x0 =∫ e−x =−e−1+ e0 =1−e−1 0 0 | 1 I k =∫ e−k x k = 0 | u=x k du=k x k−1 = ¿−1k ∙ e−1 +0k e−0 +k ∫ x k−1 ∙ e x =k ∫ e−x x k−1 dx−e−1=k ∙ I k−1−e−1 −x −x dv=e v=−e dx The result of computing the integral in Matlab function lab() I0 = 1 .0713 6 0.0517 8 0.0404 10 0.

297491+i*0. space). x) space = linspace(-zMax. That’s why I obtained the negative values . zn=zu^2+c. N). zn=zu^2+c.1769 21 -1. N. c. end end M = JuliaSet(1. zu=z0. c.73E+03 22 -3. . MATLAB source Code : function [M]=JuliaSet(zMax.80E+04 23 -8. 100. k). 1000).1959 19 -4. k) = EscVel(Z(j.10E+07 25 -5. imag] = meshgrid(space. At the first iteration the error is small.0905 20 -82. end end end function [n] = EscVel (z0. but taking into account the fact that the next values are computed using the previous result the error is propagated further and its value is increasing with each iteration . while ((abs(zn)<2)&&(n<=N)) n=n+1. Problem 4. x).18 -0. -0. [real. Z = real+i*imag.73E+05 24 -2.24E+08 Comments: The error occur when exp(-1) is computed.641051. N) n=1. zMax. zu=zn. c. for j=1:x for k=1:x M(j.

>> imagesc(atan(0. 0.5.100 200 300 400 500 600 700 800 900 1000 100 200 300 400 500 600 700 800 700 800 900 1000 >> M = JuliaSet(1.161803399.3141592+i*0. 1000).1*M) 100 200 300 400 500 600 700 800 900 1000 Finally Done ! 100 200 300 400 500 600 900 1000 . 100.

- Embedded Diploma Contents (1)Uploaded bymohamed
- 1.C PrgmUploaded byKUMAR
- release_notesUploaded byAtul Kumar Singh
- b tech 1st sem syllabus uemjUploaded byapi-351162654
- 70-483 Exam Dumps with PDF and VCE DownloadUploaded byAdouani Riadh
- sapnote_0000942785Uploaded byFerry Irawan
- Note 1519477 - Certificate for Encryption With Subject 255 CharactersUploaded byLuis Hakeinseng
- HW1.pdfUploaded byyanghong34
- 1. Previous Question Papers for Four Year b. Tech i Semester Regular Examinations February 2012Uploaded byprasaad08
- cdsunit1Uploaded bysuryareddy
- Tavant Technologies Sample Programming Placement Paper Level1Uploaded byplacementpapersample
- Ansi c Coding ConventionUploaded byCường BK
- The C LanguageUploaded byMaira Sand
- BAS-001Uploaded byJohana Lopez M
- lec10Uploaded bybdebbarma
- JNTU Question papers 2008Uploaded bySrinivasa Rao G
- supply chain magementUploaded byChaz Mcbride
- DATASTRUCTUREUSINGCUploaded byprac87
- Chapter 8 ReviewUploaded bybengej
- ChangeLogUploaded byFahad Ahmed
- Solutions Assignment 4Uploaded bywillize2k
- 15799_eep28Uploaded byRandeep Singh
- Age Problems.docxUploaded byIshtiaque Anwar
- rptIpPrintNew-8Uploaded bySandeep Kakran
- D_OptimalUploaded bypandaprasad
- New Text DocumentUploaded byJyotir Aditya
- D_EE_Parts_II-&-IIIUploaded byTapas Banerjee
- 100797244-C-Entire-NotesUploaded byRahul Sunny
- 1309281380357719quantitative AptitudeUploaded byShrey Yadu
- IntrebariUploaded byFlorin Gabriel Abagiu

- apa 3Uploaded byNatalia Chele
- International Student Booklet 2014Uploaded byNatalia Chele
- Chele Natalia ASDN_2Uploaded byNatalia Chele
- lUploaded byNatalia Chele
- Chele NataliaLFPC 3Uploaded byNatalia Chele
- Albu Vera TeorieUploaded byNatalia Chele
- Document 1Uploaded byNatalia Chele
- MASA 1Uploaded byNatalia Chele
- Oop HistoryUploaded byNatalia Chele
- Declaraţia de Independenţă a Republicii MoldovaUploaded byNatalia Chele
- Lab Source CodeUploaded byNatalia Chele
- Procese de Testare Si Infrastructur1Uploaded byNatalia Chele
- Eseu Structurat Pentru Bac 2Uploaded byNatalia Chele
- Bacalaureat Limba Romana CompeteneUploaded byNatalia Chele
- Sulac - Griu maruntUploaded byNatalia Chele
- Laborator 2. ProgramareUploaded byNatalia Chele
- 0 Texte FunctionaleUploaded byNatalia Chele