Matlab → Basics → Variables → Functions → Arrays We usually need a list of numbers to manipulate data. An array is a list of numbers arranged in rows or columns. The simplest array (also called vector) is a single row or column of numbers. It is also called one-dimensional array. And a two-dimensional array (also called matrix) has […]

# Matlab Display Formats and Helpful Commands

Matlab → Basics → Variables → Functions → Display Formats In the example given in Matlab Built-In Functions section, the Matlab showed the answers A=2.7987e+03 for part-a and A=3.0237e+03 in part-b. This is the default display format of Matlab. And with the command, >> format long g >> P=2000; r=0.08; t=4.2; >> A=P*exp(r*t) A = 2798.67804962186 The Matlab will […]

# Matlab Built-In Functions

Matlab → Basics → Variables → Built-In Functions Suppose we want to find the square root of 16. It could easily be done in Matlab using the command >> sqrt(16). It shows the answer 4 when you press the Enter key. For example, Command Window >> sqrt(16) ans = 4 Matlab has several useful built-in functions. A few […]

# Assigning Values to Variables in Matlab

Matlab → Basics → Variables in Matlab Like all programming languages, we can declare variables in Matlab and can assign values to them. When a variable is given a value, that value is actually placed in the memory space assigned to the variable. Matlab shows all the declared variables and their values in the right […]

- « Previous
- 1
- …
- 8
- 9
- 10