Professional Documents
Culture Documents
Uzaktan Egitim - Final Odevi Sorulari
Uzaktan Egitim - Final Odevi Sorulari
“Gazi_Insaat_CE102_Final_StudentName_StudentSurname_StudentID”
For example “Gazi_Insaat_CE102_Final_Sergen_Yalçın_181130093”
5. Make sure your files can be opened!! Some students tend to send broken files deliberately so that
they can replace the broken file on a later day by contacting the instructor. This will NOT be
tolerated. You have to control your files (i.e. send to your e-mail first and open it in another device).
6. Plagiarism and copying are STRICTLY FORBIDDEN! Even small similarities may cause your
final work to be faulty and such files WILL NOT BE GRADED! Necessary administrative
measures will be taken for plagiarism and copying.
7. This final assignment consists of 4 questions on 4 different pages. Please read the questions
carefully. Do not miss any thing the solution requires. If a method is declared to be used or not to
be used in a solution, please solve it accordingly. Otherwise, they will not be graded.
FINAL ÖDEVİ
Başlangıç 15.06.2020 – 18.00 Bitiş 15.06.2020 – 23.00
Gereklilikler:
1. Final ödevinizin cevaplarını içeren dosyayı 15.06.2020 tarihi saat 23.00’dan önce göndermeniz
gerekmektedir. Bu tarih ve saatten geç gönderilen dosyalar değerlendirmeye alınmayacaktır. Lütfen
ödevinizi yüklemek için son dakikayı beklemeyiniz. Ödev süresi olan 5 saat fazlasıyla yeterli
olacaktır.
2. Final ödevi dosyalarınızı “aynı anda” aşağıdaki iki e-posta adresinin yanı sıra GUZEM sistemine de
yüklemeniz gerekmektedir.
a. muratayhan@gazi.edu.tr
b. pandemifinal@gazi.edu.tr
c. GUZEM (Perculus) Sistemine yükleme
Eğer dosyalarınızı belirtilen üç adrese de zamanında yüklemezseniz, dersin yürütücüleri dosya
transferleri hususunda yaşanabilecek aksaklıklar hakkında herhangi bir sorumluluk kabul
etmeyecektir.
3. Final ödevinizi tek bir “WORD” dosyası olarak gönderiniz. Aynı, Word dosyasının “PDF”
versiyonunu da yükleyebilirsiniz.
a. Ödevde bulunan tüm soruların (4 soru) cevaplarını aynı dosya (tek Word veya PDF)
içerisinde gönderiniz.
b. MATLAB uzantılı (.m) dosya göndermeyiniz. Bu dosyalar notlandırılmayacaktır.
c. Çözümlerinizde Komut Ekranından komutlar, Editör Ekranından fonksiyonlar veya Figür
Pencerelerinden grafikler göndermeniz gerekecektir. Komutları ve fonksiyonları metin
olarak Word dosyanıza kopyalayabileceğiniz gibi, (MATLAB ekranınızın çözümle alakalı
tüm kısımlarını içermek kaydıyla) görüntü dosyası olarak da Word dosyanıza
kopyalayabilirsiniz. Bu durumda görüntünün kalitesinin yeterli okunurlukta olduğuna emin
olun. Ancak, grafiğinizi Word dosyanıza aktarmanın tek yolu, grafiği görüntü olarak Word
dosyasına aktarmak olacaktır.
4. Dosyanıza aşağıdaki formatta isim vermeniz gerekmektedir:
“Gazi_Insaat_CE102_Final_ÖğrenciAdı_ÖğrenciSoyadı_ÖğrenciNumarası”
Örneğin “Gazi_Insaat_CE102_Final_Sergen_Yalçın_181130093”
5. Dosyalarınızın açılabilir olup olmadığını gönderme aşamasında kontrol ediniz! Bazı
öğrencilerin, kasıtlı şekilde bozuk veya kırık dosya atma eğilimleri olabiliyor. Bu öğrenciler, ders
sorumlularıyla görüşerek dosyanın bozuk veya kırık olması nedeniyle ödevlerini sonraki bir tarihte
tekrar gönderip değerlendirilmesini talep ediyorlar. Bu tarz bir olaya kesinlikle izin
verilmeyecektir. Dosyalarınızı göndermeden önce açılıp açılmadığını mutlaka kontrol ediniz (örn.
önce kendinize e-posta atıp başka bir cihazda açmayı deneyebilirsiniz).
6. Kopyanın veya benzerliğin hiçbir türüne izin verilmeyecektir. En ufak bir benzerlik durumunda final
ödeviniz kopya muamelesi görecektir. Bu ödevler notlandırılmayacaktır. Dahası böyle bir hataya
düşen öğrenciler hakkında gerekli idari işlemler başlatılacaktır.
7. Bu final ödevi 4 sayfada yer alan 4 sorudan oluşmaktadır. Lütfen soruları dikkatlice okuyunuz.
Sorularda istenenleri atlamayınız. Bir çözümde belirli bir yöntemin kullanılması veya
kullanılmaması istenmişse buna mutlaka riayet ediniz. Aksi takdirde çözümleriniz doğru dahi olsa
puan alamayacaktır.
FINAL ASSIGNMENT QUESTIONS
Question 1 (25 points)
Write a function called “minandmax”.
Function “minandmax” takes only one input argument that is a matrix M.
This matrix M can be any size (any number of columns and rows) with any random integer values.
Function “minandmax” returns two output arguments.
The first output argument is called difference_row that returns a row vector containing the absolute
values of the difference between the maximum and minimum valued elements in each row.
The second output argument is called difference_all that returns the difference between the maximum
and minimum valued elements in the entire matrix.
Generate any random matrix of your choosing with sizes you want and integer values you want.
Execute the described function on your matrix.
BE CAREFUL! Correct function declaration with the correct names for output arguments, input
argument, and function name is required!
DO NOT use if-statements, for loops or while loops in this answer. They will not be graded.
We expect you to use basic matrix/arithmetic operations and built-in functions (i.e. abs & max & min).
Question 2 (25 points)
The table below shows the income from sales of a construction company for each year.
Year
2017 2018 2019
Company
Company A 200 250 400
Company B 50 650 150
Company C 550 300 Please select an income value you want
If you do not understand how to use bar graph from this example, please write “help bar” to your
Command Window to see how it works.
!! Please show every command (statement) you executed on the Command Window to generate the
bar graph with the required properties !!
!! Please attach the image of the bar graph !!
Question 3 (25 points)
Write a function called “cold”.
Function “cold” takes only one input argument called temperatures that is a vector of integers
corresponding to daily lowest temperatures in oC.
This vector can have any number of elements.
Function “cold” returns only one output argument called number_of_cold_days that is the number
of days with freezing temperatures (lower than 0 oC).
Generate any random temperature vector of your choosing with the length and values you want.
Execute the described function on your vector.
BE CAREFUL! Correct function declaration with the correct names for output argument, input
argument, and function name is required!
We expect you to use LOGICAL INDEXING in this solution. Other solutions will not be graded.
Question 4 (25 points)
A factorial is the product of all the integers from 1 to N.
However, 0! (0 factorial) is a special term and the result is equal to 1.
Then, 1! (1 factorial) is equal to 1*1 = 1.
Then, 2! (2 factorial) is equal to 1*2 = 2.
Then, 3! (3 factorial) is equal to 1*2*3 = 6.
Then, 4! (4 factorial) is equal to 1*2*3*4 = 24.
Then, 5! (5 factorial) is equal to 1*2*3*4*5 = 120.
Write a function called “fact” that calculates the factorial of any non-negative integer.
Function “fact” takes only one input argument called x that is a non-negative integer.
Function “fact” returns only one output argument called result that is equal to x! (x factorial).
BE CAREFUL! Correct function declaration with the correct names for output argument, input
argument, and function name is required!
You can use any method you want. However, you cannot use the built-in function factorial that is
already available in MATLAB.