Search results
This section contains a compilation of all the exercises (21 in total) presented in the course.
- Variables
If one then types “x” in an expression, MATLAB® will use the...
- What is Programming
In this course we are discussing the MATLAB® syntax. When...
- Newton's Method
Press_CtrlC_to tell MATLAB to erase the current line and...
- Debugging with MATLAB
Debugging code in MATLAB helps ensure that code produces the...
- Scope
For guided practice and further exploration of scripted...
- Exercise 11
Please be advised that external sites may have terms and...
- Conway Game of Life Implementation
It takes time and practice to understand code. Explain to a...
- Logistic Equation
Please be advised that external sites may have terms and...
- Variables
To practice the following in MATLAB: Creating the graphical layout of a Graphical User Interface (GUI) with GUIDE. Writing function M-files for the GUI, including callback functions. Debugging a program using the MATLAB Editor in Debug Mode.
Introduction to MATLAB – Step by Step Exercise 44. Solve the problem from 1st day, calculating how much sales the shop makes on each day in matrix operations: Matrix multiplication example: • Beef pies cost $3 each • Chicken pies cost $4 each • Vegetable pies cost $2 each They are sold in 4 days
b = [1:7; 9:-2:-3; 2.^(2:8)] Exercise 2: Give a MATLAB expression that uses only a single matrix multiplication with B to obtain. the sum of columns 5 and 7 of B. Answer: * [0 0 0 0 1 0 1] (b) the last row of B. Answer: [0 0 1] * b. (c) a version of B with rows 2 and 3 swapped.
Click here for data and code files necessary to complete the practice problems. The provided text file ( readings.txt ) contains a timestamp broken up into year, month, day, hour, minute, second, and timezone components, as well as a reading from a sensor.
This MATLAB function performs a logical OR of inputs A and B and returns an array or a table containing elements set to either logical 1 (true) or logical 0 (false).
If you call simplify for a logical expression containing symbolic subexpressions, you can get the symbolic constants symtrue and symfalse. These two constants are not the same as logical 1 (true) and logical 0 (false). To convert symbolic symtrue and symfalse to logical values, use logical.