You are on page 1of 5

CL2014 MATLAB Programming

Tutorial # 1

Title: Calculating are and number of tiles of the given house


Student Name: Moosa Shahid
Student ID: 22L-7083
Date of Submission: 29-09-23

Grading Rubrics
Exemplary Proficient Developing Beginning
Statement Novice (1) Score
(5) (4) (3) (2)
1 Output/ Results Able to produce Able to Able to get Hardly able to Not able to
(40%) a high quality produce a some results produce the get any
code with code with from the code without results from
desired output desired output program with instructor’s the program
results. having minor major help without
mistake(s) mistakes(s). instructors
help in every
step
2 Coding Style/ Able to write Able to write Used some of Used marginal None of the
formatting program in program in the mentioned formatting formatting
excellent coding good coding formatting techniques in techniques
(20%): style fulfilling style missing techniques in the program. were used in
Ability to use all the 1-2 mentioned the program. the program.
necessary mentioned criterion.
commands at the criterion.
start of the
program, provide
appropriate
description of
function, write
comments and use
proper indentation.
3 Coding Able to write Able to write Able to write Struggling to The student
Performance efficient code fairly good correct code in identify and is not able to
with appropriate code with hardcoding correct the identify and
(20%): error handlers. some logical without any errors in the correct the
Ability to write errors or error handler. codes without errors in his
appropriate error missing error help. code.
handlers and handlers.
efficient code
without
hardcoding and
errors.
4 Lab Able to finish Able to finish Able to finish Struggling to Unable to
Management coding most of the most of the finish the code finish the
complete in all coding within coding within without code without
(20%): aspects within given time given time instructors instructors
Time management given time missing 1-2 missing 3-4 help help in every
content criteria criteria step
organization

Attained Score

Page 1 of 5
…………………….Start of MATLAB Code……………………….

%This is my first tutorial of matlab


%Calculating inner area and number of tiles for the project
%Name = Moosa Shahid
%Roll No = 22L-7083
clc
clear
t = input('Enter thickness of outer wall (in): '); %taking thickness of
outer wall
i = input('Enter thickness of inner bathroom wall (in): '); %taking
thickness of bathroom wall
l = input('Enter length of living room and kitchen c2c (ft): '); %taking
length of the room (living and kitchen)
w = input('Enter width of living room and kitchen c2c (ft): '); %taking
width of the room (living and kitchen)
l1 = l-(t/12); %converting in into ft and then getting the inner length
(living and kitchen)
w1 = w-(t/12); %converting in into ft and then getting the inner width
(living and kitchen)
r = input('Enter length of bedroom c2c (ft): '); %taking length of the
bedroom
p = input('Enter width of bedroom c2c (ft): '); %taking width of the
bedroom
r1 = r-(t/12); % inner length of bedroom
p1 = p-(t/12); % inner length of bedroom
m = input('Enter length of inner bathroom (ft): '); %taking length of
bathroom inner wall
n = input('Enter width of bathroom w2w(ft): '); %taking width of bathroom
wall 2 wall
m1 = m; % inner length of bedroom
n1 = n-(i/12); % inner length of bedroom
Al= (l1*w1)-((m+(i/12))*n); %Area of living room and kitchen after
subtracting area of bathroom from it
Ab = (r1*p1); %Area of bedroom
Abt= (m1 * n1); % area of bathroom
tl= input('Enter length of room tile (in) :'); % input of length of tiles
tw= input('Enter width of room tile (in) :'); % input of width of tiles
tl = tl/12; % converting dimensions into ft
tw = tw/12; % converting dimensions into ft
at= tl*tw; % area of outer tile
tbl = input('Enter length of bathroom tile (in) :'); % input of length of
tiles
tbw = input('Enter length of bathroom tile (in) :'); % input of width of
tiles
tbl = tbl/12; % conversion
tbw = tbw/12; %conversion
abs= tbl*tbw; % area of bathroom tile
ta = Al + Ab + Abt ; % total area addition
disp(['Total covered area of house = ' num2str(ta)]) % displaying total
area (inner)
inner = Abt/abs; %tiles bathroom
outer = (Al+Ab)/at; % tiles except bathroom
tiles = inner + outer; % total tiles
disp(['Tiles required for this project = ' num2str(tiles)]) %displaying
total tiles

Page 2 of 5
……………………….End of MATLAB Code……………………….

Page 3 of 5
…………………….Start of Results……………………….

……………………….End of Results……………………….

Page 4 of 5
Page 5 of 5

You might also like