Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q . 6 ( H W # 1 0 ) ( 1 ) The following vector represents the distribution of final scores in a course:
Q#
The following vector represents the distribution of final scores in a course:
Write a MATLAB code to determine how many times the final scores are below :
a Using for loop.
b Using while loop.
A list of exam scores is:
Write a MATLAB program that determines how many grades are between and between and between and between and and between and
In the program while loop and if statement should be used. The results should be displayed in a table form showing the number of grades in each range.
#
The following array represents the prices, in $ of different goods in a store:
A discount strategy is applied as follow:
discount for goods that are less than $
discount for goods that are between $ and $
discount for goods that are above $
Write a MATLAB program to define the prices and returns an array representing the prices after application of the discount. You must use for loop and if statement to find the new prices. Display your results in a table with headings showing the prices before and after discount.
Pascal lowertriangular matrix consists of rows and columns can be represented as follows:
dotsdotsdotsdotsdotsdots,dots,dots,dots,dots
Based on the above representation for any row and column the following conditions are true:
The first column and the diagonal positions take the value of
The upper triangle contains zeros.
The rest of the elements is the sum of the two values in the row above it
Write a MATLAB program to create an mxn Pascal lowertriangular matrix L according to the following steps:
a The program first prompts the user to enter the size of the matrix enter the number of rows and the number of the columns
b The program calls a MATLAB function named "LowTri"with inputs and output and uses a nestedforloop and branchingifstatement to create
c Execute the program for the case of and display the matrix.
d Use the matrix obtained to get and then display the Pascal uppertriangular matrix and the Pascal symmetric matrix
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started