Vous êtes sur la page 1sur 8

Chapter 1:

Computer programming is the art of instructing computers on what to do and should have
do next. These instructions are represented by a set of codes. This codes are the text of
programming world, it has its own vocabulary to describe objects and concepts. These codes are
written by people which are generally known as the computer programmers who shares a common
goal. The mission is, to create something that could mean anything form a pretty picture, a web
page, a big software, a calculator generator that can solve any mathematical problems or even
translating designs for engineers.
According to Thought.Co, many knowledgeable computer programmers write source code that
can be read by humans but not by computers. And in some cases, the source code is compiled to
translate the source code into machine code, which is readable by computers but not humans. The
examples of computer programming sites that uses compiled languages are Visual Basic, Delphi,
C, C++, C#, Swift, Pascal, Python, and many more. Furthermore, there are programs that doesn’t
need compiled languages. But rather, it composed of a just- in-time process on the computers.
These are the programming sites that has interpreted computer programming languages are: Java
script, Perl, PHP, Postscript, Ruby and more.
Meanwhile the term MATLAB stands for Matrix Laboratory. MATLAB was written
originally to provide easy access to matrix software developed by the LINPACK (linear system
package) and EISPACK (Eigen system package) projects. According to Houcque, D. of North-
western University, MATLAB is a high-performance language programming for technical
computing. It incorporates computation, visualization, and programming environment.
Furthermore, MATLAB is more modernized programming environment compared to other
mathematical computational platforms. Because it contains sophisticated data structures, built in
editing and debugging applications, and lastly, supports object-oriented programming. These
functionalities made MATLAB an excellent platform for teaching and research.
According to Mathworks.com, MATLAB is a programming site made most specially for
engineers and scientist. The core of MATLAB is its language, which is a matrix-based language
allowing the most natural expression of computational mathematics. Furthermore, it is tuned for
iterative analysis and design process that expresses matrix and array mathematical computations
directly. With MATLAB we can do various things, which are analyse data, develop algorithms,
and lastly, create models and applications. MATLAB itself is a user friendly programming
platform, because of its language, built in functions, and applications, creates a passage way for
the program and the programmer to jive and quickly explore various approaches to arrive with a
credible solution.
In addition. MATLAB adds many advantage compared to other conventional platforms in
solving methodical problems. Like what cimss.ssec.misc.edu tells their readers, MATLAB is an
interactive system whose data element is an array which not requires dimensioning. MALAB has
been commercialized since 1895 and now considered as one of the standard tool at most state and
non-state universities. With its powerful built in routines that able to program variety of
computations and easy graphic commands that visualizes results immediately. Cleary made its

1
mark on many countries especially in the European continent. Other specific functions are in
packages which is referred as toolbox. Toolboxes in MATLAB are professionally developed,
rigorously tested, and fully documented. This is use for signal processing, symbolic computation,
control theory, simulation, optimization, and several other fields of applied science and
engineering.

2
Chapter 2:
A flowchart diagram can be defined as a visual, diagrammatic representation which depicts
a process, system or computer algorithm. According to lucidchart.com, flow charts has a wide used
in multiple fields to documents, study, plan, improve and communicate often complex processes
in clear, easy-to-understand diagrams. Furthermore, there are a sequence of steps and decisions
needed to perform a process. Each step in the sequence is noted within a diagram shape: it can be
rectangles, ovals, diamonds and potentially numerous other shapes that also define a short
description of the processed step. Steps are linked by connecting lines and directional arrows. This
allows anyone to view the flowchart and logically follow the process from beginning to end.
On the other hand, in accordance to mindtools.com, a flowchart are easy-to-understand
diagrams that show how the steps of a process fit together. It was believed that American engineer
Frank Gilbreth is widely believed to be the first person to document a process flow, having
introduced the concept of a “Process Chart” to the American Society of Mechanical Engineers in
1921. In addition to that, flowcharts tends to consist of four main symbols, linked by an arrow that
show direction of the step by step process. First is the Elongated circles (Terminator), which signify
the start or end of a process. Second is the Rectangles (Process), which show instructions or
actions. Third is the Diamonds (Decision), which highlight where you must make a decision.
Fourth is Circles (Connector), which is used to indicate a jump in the process flow. And lastly
which the Parallelograms (Data), which show input and output. This can include materials, services
or people.
There are many advantages of using a flowchart, one is It helps to clarify complex
processes. Images helps break down the meaning which lightens the understanding of the one
reading it. Second is, It identifies steps that do not add value to the internal or external customer,
including: delays; needless storage and transportation; unnecessary work, duplication, and added
expense; breakdowns in communication. Thirds is it serves as a basis for designing new processes,
fourth is Identify bottlenecks or waste in a process. And lastly, and also the most important is, to
solve a problem.

3
A
START

word (e-1:-1:f+1) = reverse (word(e-1:-1:f+1));


Input word word(a) = d3
word(b) = d3
break

x = length(word);
a = '(';
b = ')';
c = '*';
Does
word still
contain ')'

elseif x == 0 Yes Display “Empty”

Yes word = erase(word, '*')

for e = 1:x

Display word
No
word(e) == b

END

for f = e-1:-1:1

word (f) == a

4
Chapter 3:
In this chapter, the codes that were used in the program will be discussed thoroughly. The
program is divided into three parts, the input, process, and output.
In concern about the input, the codes that was used was; request user input, determining
the length of a string, and distributing value to a variable. This syntax will mainly require the user
to enter something which will be further converted into a string.
Because of this syntax, the user can accessibly determine the number of elements present
at the string given for the program.
In the given codes below, there are three given variables which is named “a”, “b”, and “c”.
For “a”, it was given a value of ‘(‘, “b” was given a value of ‘)’, and lastly, “c” was given a value
of ‘*’. Mainly, using the operator “=”, the programmer will able to change or assign values to a
certain variable present in the program.
If the programmer successfully coded the first part which is the input stage, the program is
now on the second part, which is the process stage, and on this stage the program is now merely
done. In the process stage, there are certain codes like if, elseif, else statement, for loop, reverse
string, distribution of value, erase string, and loop break, which is important in the whole
processing of the program. The involvement of these codes will help in smooth transition of input
data to the resulting data of the program.
n = 'Type the word: ';
word = input(n, 's');
x = length(word);

a = '(';

b = ')';
c = '*';
if (x >= 1) && (x <=50)
for e = 1:x

if word(e) == b

for f = e-1:-1:1

if word(f) == a

word(e-1:-1:f+1) = reverse (word(e-1:-1:f+1));

word(e) = c;

5
word(f) = c;

break

end

end

end

end

word = erase(word, '*');

word

elseif x == 0

disp('Empty');

end

To introduce to you the codes and the flow of the program; First is the if, elseif, else
statement which is defined as an execute statements if the condition is true. And, it used to
determine if the given string was within the guaranteed constraints. Second is the for loop and it
is defined as to repeat specified number of times. It was used to run a loop from 1 to y and if the
condition word(e) == b is true, then it will proceed into running another for loop from a-1 to 1.
Then if the condition word(f) == a is true, then it will proceed into retreating the string within
word(a-1:-1:b+1) and changing the values of word(e) and word(f) into ‘*’. After that, the program
will go through a loop break on the second loop in give way for the first loop to continue. This
specific code ‘*’ was used to change the previously read parentheses, therefore it wouldn’t be read
again by the loop. After all the revisions and changes, the program will now perform an erase
string command which is tasked to remove all asterisk within the given string.

In the output stage of the program, the code used was only display syntax. In principal, by
negating to include a semicolon after a variable word, the program will spontaneously show the
final output of the programmed script. Furthermore, by using elseif statement, in the condition of
y == 0 proven true , by using disp('Empty'), the program will illustrate “empty” as the final output.

6
Chapter 4:
Summary
This project is given to students to make a program in accordance to the problem
given by the professor. But basically, the project is all about making a script that will reverse a
word or a character which placed under a parenthesis. Furthermore, the project also calls for the
students to be able to explain the flow of the program in accordance to the codes that were used in
the script. The significance of the project is that, first, the participating students were able to gain
understanding, extra knowledge, and most especially experience in programming by using
MATLAB as the programming site and language. And last but not the least, the given problem can
be compared to a puzzle which uses the mind to think how would you execute the program and
translate it into computer programing language. Which it develops the participating students their
decision making to the different machine or situational problem thrown onto them.
Recommendations
To the future programmer who will further investigate and improve my program.
As the programmer of the given script, I recommend that to do various research to be able to use
on variety of examples that enables them to criticize and investigate the blemishes on the given
program I set. And also I recommend that before typing codes, first draft your ideas for the student
will not be confuse when he or she is programming. These recommendation will lessen your
mistakes of programing and will further enhance your work with lesser errors that would be
accounted by your professors.

7
Chapter 5: Appendices
5.1 User’s Manual

5.2 References:
https://www.lucidchart.com/pages/what-is-a-flowchart-tutorial
https://www.mathworks.com/discovery/what-is-matlab.html
https://www.mathworks.com/products/matlab.html
https://www.mccormick.northwestern.edu/documents/students/undergraduate/introductio
n-to-matlab.pdf
https://www.lucidchart.com/pages/what-is-a-flowchart-tutorial
https://www.smartdraw.com/flowchart/
https://www.breezetree.com/articles/what-is-a-flow-chart
https://online.visual-paradigm.com/tutorials/flowchart-tutorial/
https://asq.org/quality-resources/flowchart
https://www.edrawsoft.com/Flowchart-Definition.php
https://www.mindtools.com/pages/article/newTMC_97.htm
https://cimss.ssec.wisc.edu/wxwise/class/aos340/spr00/whatismatlab.htm
https://www.thoughtco.com/what-is-programming-958331
https://www.edx.org/learn/computer-programming
https://www.computerscience.org/careers/computer-programmer/
https://techprep.org/what-is/
https://news.codecademy.com/what-is-computer-programming/

Vous aimerez peut-être aussi