0
0
MATLABdata~15 mins

Matrix multiplication (*) in MATLAB - Mini Project: Build & Apply

Choose your learning style9 modes available
Matrix multiplication (*)
📖 Scenario: You work in a small company that analyzes sales data. You have two matrices: one with sales quantities and another with prices. You want to find the total sales amount for each product in each region.
🎯 Goal: Build a MATLAB program that multiplies two matrices using the * operator to calculate total sales amounts.
📋 What You'll Learn
Create two matrices with exact values
Create a variable for the result matrix
Use matrix multiplication operator *
Display the resulting matrix
💡 Why This Matters
🌍 Real World
Matrix multiplication is used in many fields like sales analysis, computer graphics, and engineering to combine data efficiently.
💼 Career
Understanding matrix multiplication is essential for data analysts, engineers, and scientists who work with numerical data and models.
Progress0 / 4 steps
1
Create the sales quantity matrix
Create a matrix called quantities with these exact values: [2 3; 4 5]
MATLAB
Need a hint?

Use square brackets and semicolons to create a 2x2 matrix.

2
Create the price matrix
Create a matrix called prices with these exact values: [10 20; 30 40]
MATLAB
Need a hint?

Use the same matrix format as before for prices.

3
Multiply the matrices
Create a variable called total_sales that stores the result of multiplying quantities by prices using the * operator
MATLAB
Need a hint?

Use the * operator to multiply matrices in MATLAB.

4
Display the total sales matrix
Use disp(total_sales) to display the total_sales matrix
MATLAB
Need a hint?

Use disp() to print matrices in MATLAB.