Matlan as Calculator

Submitted by: Submitted by

Views: 10

Words: 1055

Pages: 5

Category: Other Topics

Date Submitted: 09/13/2015 07:55 AM

Report This Essay

Experiment No. 1

MATLAB as a Calculator

Objectives:

* To be able to learn how to use MATLAB as a calculator.

* To be able to learn how to use variables and learn the different syntax.

* To be able to learn how to code arithmetic and use basic scientific functions.

* To be able to learn how to use scripts and input and output.

Abstract:

MATLAB is an interpreted environment and a high-level language and interactive environment for numerical computation, visualization, and programming. It can be used to analyze data, develop algorithms, and create models and applications. The language, tools, and built-in math functions in MATLAB enable us to explore multiple approaches and reach a solution faster than spreadsheets or traditional programming languages. We give a command and MATLAB executes it right away.

In our experiment entitled MATLAB as a Calculator, we were able to use MATLAB as a computing device. It was used to solve or compute for the volume of a cylinder with its given diameter and height, to evaluate a given equation/function, to compute for the total resistance, to convert Celsius to Fahrenheit and to display the denomination of an amount to be given by the user. We used the arithmetic functions like + (add), - (subtract), * (multiply), / (divide), and mod(x,y) and a scalar and matrix exponentiation operator ^. We also used basic scientific functions like pi, ex, sin(x), and cos(x). There were some wherein the needed parameters are already given and there were also a few wherein the user will be the one to input the needed parameter for the program to work. We used fprintf (‘…‘) and disp (‘…’) to display the output.

We were able to learn and type the scripts needed. Scripts are the codes for the program. It can be written in the editor or directly at the command window. The scripts we used are just basics since this experiment/activity only requires basic codes and a quite simple logic, except for the Challenge part where most of...