Sunteți pe pagina 1din 10

1

FACULTY OF ELECTRICAL ENGINEERING



ELECTRICAL ENGINEERING COMPUTING
(ECE123)

MINI PROJECT REPORT
SET H

DATE OF PROJECT
8 MARCH 2013

Name Group UITM No.
Muhammad Syafiq Bin Mohamad Zamri EE1112D1 2012841514
Muhamad Syafiq Ariff Bin Mad Pazir EE1112D1 2012631602
Mohd Tarmizi Bin Zakaria EE1112D1 2012435774

MARKS
Cover Page /10
General Presentation /15
Theory /15
Results /20
Discussion /20
Conclusion /7
References /3
On Time Submission /10
/100

Instructors Name Puan Fatimah Zaharah Binti Ali
Comment

2

TABLE OF CONTENTS


INTRODUCTION/THEORY


3-4

RESULTS


5-6

DISSCUSSION


7-8

CONCLUSION


9

REFERENCES


10







3

INTRODUCTION/THEORY
FLOW CHART OF MATHEMATICAL GAME SYSTEM





NO NO








YES NO






YES YES

START
Ask Question
A = input(25*2= );
B = input(72/9= );
C = input(89+11= );
D = input(100-75= );
E = input(100*2= );
Correct?
Display this message your
answer is wrong ,no mark
for you
Display this message your
answer is correct ,one mark
for you
Finish?
Finish ?
Display
Total Mark
END
4


When the program is run, mark is count as zero (0). Then, first question appeared. After the input
(answer) is entered, it display 'Well done, you answer is correct, 1 mark for you' if the answer
entered by user is correct. Then, the previous mark is added by one. If the answer entered by user
is incorrect, it display 'you answer is wrong, no mark for you'. This process happens repeatedly
until all questions are attempted by user. After all questions is attempted by user, the program
will display the total mark. For the total mark, the program will add up all counted mark which is
if the answer entered by user is correct.

















5

RESULTS
M-file

mark=0;
A = input('25*2= ');
if A==50
disp('Well done, you answer is correct, 1 mark for you');
mark=mark+1;
else
disp('You answer is wrong, no mark for you');
end
B = input ('72/9= ');
if B==8
disp('Well done, you answer is correct, 1 mark for you');
mark=mark+1;
else
disp('You answer is wrong, no mark for you');
end
C = input('89+11= ');
if C == 100
disp('Well done, you answer is correct, 1 mark for you');
mark=mark+1;
else
disp('You answer is wrong, no mark for you');
end
D = input('100-75= ');
if D == 25
disp('Well done, you answer is correct, 1 mark for you');
mark=mark+1;
else
disp('You answer is wrong, no mark for you');
end
E = input('100*2= ');
if E == 200
disp('Well done, you answer is correct, 1 mark for you');
mark=mark+1;
else
disp('You answer is wrong, no mark for you');
end
fprintf ('total mark is = %d', mark);




6

OUTPUT SAMPLES
3 ANSWERS CORRECT


ALL ANSWERS ARE CORRECT


ALL ANSWERS ARE WRONG


7


DISCUSSION
1. What is the disadvantage of this mathematical game system?
a) Execution speed:
When a language is compiled, all of the code is analyzed and processed efficiently,
before the programmer distributes the application. With an interpreted language, the
computer running the program has to analyze and interpret the code (through the
interpreter) before it can be executed (each and every time), resulting in slower
processing performance.
b) Errors not discovered until run-time:
For example, the constant i is pre-defined as the square root of -1. However, you can
redefine it to be an integer or an array. Or, if you name a variable the same name as a
function, this will hide the function, making it impossible to call.
c) Lack of mathematical symbols:
We cannot enter any fractional number as it cannot be detect by MatLAB system. There
is no symbol available for fraction.All number must be in decimal or whole number.
d) Division symbols in mathemathical :
User always confuse with the symbol for division(/). They always use this (\) symbols
for division and which result error and miscalculation. For example user want to enter
equation 5-9/3 but get confuse and enter the equation 5-9\3.
e) Multiply symbols in mathemathical :
The m-file use (*) symbol as multiply symbol which people known as the symbol for
power of. For example:
25*2 = 50
But some of people get confuse and answered 625 which he believe * is the symbol for
power of
f) Less user friendly and non-interactive:
We have retype the same sequence of commands every time when we need to solve
similar problem.

8



2. How to improve this mathematical game system?
a) Change mathematical symbol:
i) Use () symbol for the division calculation. This symbol is more familiar to user and
easy to remember than the (/) symbol.
ii) Also use (x) symbol for multiply symbol
b) Add built-in mathematical symbol:
The built-in mathematical symbols should be added to the system so it is easier to create
any mathematical calculation. No need to type it using keyboard which can cause error
c) Auto-detect error:
Add auto detect error function when creating the m-file.

















9

CONCLUSION
In a conclusion ,from this project which conducted by our group we have gained our knowledge
in Electrical Engineering Computering (ECE123) which we have learned how to use Pspice and
MAtlab software .Besides ,we also have learned how to create a commad by using MAtlab
which is useful to us in the future. We also found that both this software are very useful to
student who are taking Electrical Engineering course. For an example ,in Electrical Engineering
course we learned circuit measurement ,instead of drawing the electrical circuit manually we also
can use Pspice to draw out our electrical circuit. Futhermore ,we also can measure the current
,voltage and resistor by using Pspice. If we need to calculate an equation which has 3 equation
we can use MAtlab to calculate it.












10

REFERENCE

1. http://introcs.cs.princeton.edu/java/11matlab/
2. http://books.google.com.my/books?id=BqrKYEzPer8C&pg=PA185&lpg=PA185&dq=di
sadvantages+of+M-file&source=bl&ots=zYla4VOJ-
E&sig=KEZds4zW69IvZ3HE4u1V48DdyOg&hl=en&sa=X&ei=NEI5UYDUPIf4rQfi44
GACQ&ved=0CFMQ6AEwBA#v=snippet&q=disadvantage&f=false
3. http://en.wikibooks.org/wiki/MATLAB_Programming/Scripts

S-ar putea să vă placă și