SlideShare a Scribd company logo
Sheet 3
>> a=0:2:100;
>>sum(a)
ans =
2550
>>
k=0;
sum=0;
for i=0:1000
k=k+1;
sum=sum+1/2^i;
if (sum>1.995) break
end
end
k =
9
>>sum
sum =
1.9961
>>
3.1 Write a MATLAB program to add all the even
numbers from 0 to 100.
3.2 Add all the terms in the series
1 +
1
2
+
1
4
+
1
8
+ ⋯
until the sum exceeds 1.995.
Sheet 3
x=ones(1,12);
for i=3:12
x(i)=x(i-2)+x(i-1);
end
>>sequance
>>x
x =
1 1 2 3 5 8 13 21 34 55 89 144
>>
x=[70,85,90,97,50,60,71,83,91,86,77,45,67,88,64,
79,75,92,69];
A=0;
F=0;
For i=1: length(x);
if x(i)> 90
A=A+1;
elseif x(i)<= 60
F=F+1;
end
end
>>degres
>> A
A =
3.3 The Fibonacci sequence is given as
1 1 2 3 5 8 13 21 34 …
Write a MATLAB program to generate the Fibonacci
sequence up to the twelfth term.
3.4 The table below shows the final course grade and its
correspondingrelevant letter grade(a) Determine the
number of students who attained the grade of A and F.
(b) What are the mean grade and the standard deviation?
Sheet 3
2
>> F
F =
3
>>mean(x)
ans =
75.7368
>>std(x)
ans =
14.3946
>>
clear all
y=ones(1,7);
x=ones(1,7);
y(1)=2;
for i=3:7
y(i)=2*y(i-1)-y(i-2)+x(i);
end
z=y(4:7)
z =
2 4 7 11
3.5 Write a script file to evaluate y[1], y[2], y[3] and y[4]
for the difference equation:y[n]=2y[n−1]−y[n−2]+x[n]for
n ≥0. Assume that x[n]=1 for n ≥0, y[−2]=2 andy[−1]=1.
Sheet 3
clear all; close all; clc;
l=4; c=1e-6; w=200:1200;
Z=100+1j*w*l+1./(1j*w*c);
semilogy(w,abs(Z))
xlabel('angular frequency rad/sec');
ylabel('abs(z)');
zmin =
min(abs(Z))
k=find(Z==zmin);
w0 = w(k)
zmin =
100
w0 =
500
>>
3.6 The equivalent impedance of a circuit is given as
𝑍𝑍𝑒𝑒𝑒𝑒(𝑗𝑗 𝑗𝑗) = 100 + 𝑗𝑗 𝑗𝑗𝑗𝑗 +
1
𝑗𝑗 𝑗𝑗𝑗𝑗
If L = 4 H and C = 1 μF,
(a) Plot |Zeq(jw )| versus w. (b) What is the minimum impedance?
(c) With what frequency does the minimum impedance occur?
NAME: Ahmed El-morsy Abdel-hamid
Sec: 1
about me :)
THANK YOU 

More Related Content

What's hot

Computer Graphic - Lines, Circles and Ellipse
Computer Graphic - Lines, Circles and EllipseComputer Graphic - Lines, Circles and Ellipse
Computer Graphic - Lines, Circles and Ellipse
2013901097
 
Num Integration
Num IntegrationNum Integration
Num Integrationmuhdisys
 
Interpolation
InterpolationInterpolation
Interpolation
Dmytro Mitin
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversionMohd Arif
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
Kumar
 
10CSL67 CG LAB PROGRAM 9
10CSL67 CG LAB PROGRAM 910CSL67 CG LAB PROGRAM 9
10CSL67 CG LAB PROGRAM 9
Vanishree Arun
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
Introduction to curve
Introduction to curveIntroduction to curve
Introduction to curve
Omprakash Chauhan
 
Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2
empoweringminds
 
Computer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3dComputer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3d
2013901097
 
Calculo de integrais_indefinidos_com_aplicacao_das_proprie
Calculo de integrais_indefinidos_com_aplicacao_das_proprieCalculo de integrais_indefinidos_com_aplicacao_das_proprie
Calculo de integrais_indefinidos_com_aplicacao_das_proprieRigo Rodrigues
 
2 5 2-6 absolute value graphs and translations
2 5 2-6 absolute value graphs and translations2 5 2-6 absolute value graphs and translations
2 5 2-6 absolute value graphs and translationsdswanstromecasd
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
Tarun Gehlot
 
Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1Kt Silva
 
Matlab file
Matlab file Matlab file
Matlab file
rampal singh
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.Mohd Arif
 
Newton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with ExampleNewton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with Example
MuhammadUsmanIkram2
 

What's hot (19)

Computer Graphic - Lines, Circles and Ellipse
Computer Graphic - Lines, Circles and EllipseComputer Graphic - Lines, Circles and Ellipse
Computer Graphic - Lines, Circles and Ellipse
 
Num Integration
Num IntegrationNum Integration
Num Integration
 
Interpolation
InterpolationInterpolation
Interpolation
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
 
10CSL67 CG LAB PROGRAM 9
10CSL67 CG LAB PROGRAM 910CSL67 CG LAB PROGRAM 9
10CSL67 CG LAB PROGRAM 9
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
Introduction to curve
Introduction to curveIntroduction to curve
Introduction to curve
 
Dda line-algorithm
Dda line-algorithmDda line-algorithm
Dda line-algorithm
 
Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2Integration By Parts Tutorial & Example- Calculus 2
Integration By Parts Tutorial & Example- Calculus 2
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Computer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3dComputer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3d
 
Calculo de integrais_indefinidos_com_aplicacao_das_proprie
Calculo de integrais_indefinidos_com_aplicacao_das_proprieCalculo de integrais_indefinidos_com_aplicacao_das_proprie
Calculo de integrais_indefinidos_com_aplicacao_das_proprie
 
2 5 2-6 absolute value graphs and translations
2 5 2-6 absolute value graphs and translations2 5 2-6 absolute value graphs and translations
2 5 2-6 absolute value graphs and translations
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1Perforacion de pozos, grupo d3 b, tarea numero 1
Perforacion de pozos, grupo d3 b, tarea numero 1
 
Matlab file
Matlab file Matlab file
Matlab file
 
Bresenham's line algo.
Bresenham's line algo.Bresenham's line algo.
Bresenham's line algo.
 
Newton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with ExampleNewton's Backward Interpolation Formula with Example
Newton's Backward Interpolation Formula with Example
 

Similar to Sheet 3

Palm ch1
Palm ch1Palm ch1
Palm ch1
Heera Rawat
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
Mohd Esa
 
Matlabch01
Matlabch01Matlabch01
Matlabch01
Mohammad Ayyash
 
More instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docxMore instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docx
gilpinleeanna
 
Dynamic1
Dynamic1Dynamic1
Dynamic1MyAlome
 
[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2
Kevin Chun-Hsien Hsu
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
agnesdcarey33086
 
“Introduction to MATLAB & SIMULINK”
“Introduction to MATLAB  & SIMULINK”“Introduction to MATLAB  & SIMULINK”
“Introduction to MATLAB & SIMULINK”
Amarjeetsingh Thakur
 
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
Farhan Ab Rahman
 
Basic operations by novi reandy sasmita
Basic operations by novi reandy sasmitaBasic operations by novi reandy sasmita
Basic operations by novi reandy sasmita
beasiswa
 
arithmetic sequence.pptx
arithmetic sequence.pptxarithmetic sequence.pptx
arithmetic sequence.pptx
DianneErana
 
ode45 task.docx
ode45 task.docxode45 task.docx
ode45 task.docx
likeme123456
 
CLUSTERGRAM
CLUSTERGRAMCLUSTERGRAM
CLUSTERGRAM
Dr. Volkan OBAN
 
Basic R Data Manipulation
Basic R Data ManipulationBasic R Data Manipulation
Basic R Data Manipulation
Chu An
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)asghar123456
 
Tutorial 2
Tutorial     2Tutorial     2
Tutorial 2
Mohamed Yaser
 
Statistics assignment 9
Statistics assignment 9Statistics assignment 9
Statistics assignment 9
Ishaq Ahmed
 
Matlab
MatlabMatlab

Similar to Sheet 3 (20)

Palm ch1
Palm ch1Palm ch1
Palm ch1
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
 
Matlabch01
Matlabch01Matlabch01
Matlabch01
 
More instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docxMore instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docx
 
Dynamic1
Dynamic1Dynamic1
Dynamic1
 
bobok
bobokbobok
bobok
 
[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
 
“Introduction to MATLAB & SIMULINK”
“Introduction to MATLAB  & SIMULINK”“Introduction to MATLAB  & SIMULINK”
“Introduction to MATLAB & SIMULINK”
 
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
 
Basic operations by novi reandy sasmita
Basic operations by novi reandy sasmitaBasic operations by novi reandy sasmita
Basic operations by novi reandy sasmita
 
Mat lab day 1
Mat lab day 1Mat lab day 1
Mat lab day 1
 
arithmetic sequence.pptx
arithmetic sequence.pptxarithmetic sequence.pptx
arithmetic sequence.pptx
 
ode45 task.docx
ode45 task.docxode45 task.docx
ode45 task.docx
 
CLUSTERGRAM
CLUSTERGRAMCLUSTERGRAM
CLUSTERGRAM
 
Basic R Data Manipulation
Basic R Data ManipulationBasic R Data Manipulation
Basic R Data Manipulation
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)
 
Tutorial 2
Tutorial     2Tutorial     2
Tutorial 2
 
Statistics assignment 9
Statistics assignment 9Statistics assignment 9
Statistics assignment 9
 
Matlab
MatlabMatlab
Matlab
 

More from Ahmed Elmorsy

Ahmed elmorsy
Ahmed elmorsyAhmed elmorsy
Ahmed elmorsy
Ahmed Elmorsy
 
Ahmed elmorsy
Ahmed elmorsyAhmed elmorsy
Ahmed elmorsy
Ahmed Elmorsy
 
block diagram representation of control systems
block diagram representation of  control systemsblock diagram representation of  control systems
block diagram representation of control systemsAhmed Elmorsy
 
Mcq questions for communication skills course
Mcq questions for communication skills courseMcq questions for communication skills course
Mcq questions for communication skills courseAhmed Elmorsy
 
Communication Skills introduction
Communication Skills introduction Communication Skills introduction
Communication Skills introduction Ahmed Elmorsy
 

More from Ahmed Elmorsy (6)

Ahmed elmorsy
Ahmed elmorsyAhmed elmorsy
Ahmed elmorsy
 
Ahmed elmorsy
Ahmed elmorsyAhmed elmorsy
Ahmed elmorsy
 
block diagram representation of control systems
block diagram representation of  control systemsblock diagram representation of  control systems
block diagram representation of control systems
 
My cv
My cvMy cv
My cv
 
Mcq questions for communication skills course
Mcq questions for communication skills courseMcq questions for communication skills course
Mcq questions for communication skills course
 
Communication Skills introduction
Communication Skills introduction Communication Skills introduction
Communication Skills introduction
 

Recently uploaded

HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 

Recently uploaded (20)

HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 

Sheet 3

  • 1. Sheet 3 >> a=0:2:100; >>sum(a) ans = 2550 >> k=0; sum=0; for i=0:1000 k=k+1; sum=sum+1/2^i; if (sum>1.995) break end end k = 9 >>sum sum = 1.9961 >> 3.1 Write a MATLAB program to add all the even numbers from 0 to 100. 3.2 Add all the terms in the series 1 + 1 2 + 1 4 + 1 8 + ⋯ until the sum exceeds 1.995.
  • 2. Sheet 3 x=ones(1,12); for i=3:12 x(i)=x(i-2)+x(i-1); end >>sequance >>x x = 1 1 2 3 5 8 13 21 34 55 89 144 >> x=[70,85,90,97,50,60,71,83,91,86,77,45,67,88,64, 79,75,92,69]; A=0; F=0; For i=1: length(x); if x(i)> 90 A=A+1; elseif x(i)<= 60 F=F+1; end end >>degres >> A A = 3.3 The Fibonacci sequence is given as 1 1 2 3 5 8 13 21 34 … Write a MATLAB program to generate the Fibonacci sequence up to the twelfth term. 3.4 The table below shows the final course grade and its correspondingrelevant letter grade(a) Determine the number of students who attained the grade of A and F. (b) What are the mean grade and the standard deviation?
  • 3. Sheet 3 2 >> F F = 3 >>mean(x) ans = 75.7368 >>std(x) ans = 14.3946 >> clear all y=ones(1,7); x=ones(1,7); y(1)=2; for i=3:7 y(i)=2*y(i-1)-y(i-2)+x(i); end z=y(4:7) z = 2 4 7 11 3.5 Write a script file to evaluate y[1], y[2], y[3] and y[4] for the difference equation:y[n]=2y[n−1]−y[n−2]+x[n]for n ≥0. Assume that x[n]=1 for n ≥0, y[−2]=2 andy[−1]=1.
  • 4. Sheet 3 clear all; close all; clc; l=4; c=1e-6; w=200:1200; Z=100+1j*w*l+1./(1j*w*c); semilogy(w,abs(Z)) xlabel('angular frequency rad/sec'); ylabel('abs(z)'); zmin = min(abs(Z)) k=find(Z==zmin); w0 = w(k) zmin = 100 w0 = 500 >> 3.6 The equivalent impedance of a circuit is given as 𝑍𝑍𝑒𝑒𝑒𝑒(𝑗𝑗 𝑗𝑗) = 100 + 𝑗𝑗 𝑗𝑗𝑗𝑗 + 1 𝑗𝑗 𝑗𝑗𝑗𝑗 If L = 4 H and C = 1 μF, (a) Plot |Zeq(jw )| versus w. (b) What is the minimum impedance? (c) With what frequency does the minimum impedance occur? NAME: Ahmed El-morsy Abdel-hamid Sec: 1 about me :) THANK YOU 