Question

Create a new 20 x 24 matrix using Matlab, I, that will contain the following for...

Create a new 20 x 24 matrix using Matlab, I, that will contain the following for each location
rowIndex*2-columnIndex*0.7

0 0
Add a comment Improve this question Transcribed image text
Answer #1
mat = zeros(20, 24);    % declaring a 20*24 matrix with all zeroes

% using nested for loop to fill the matrix using the given formula
for rowIndex = 1:20
    for columnIndex = 1:24
        mat(rowIndex, columnIndex) = rowIndex*2 - columnIndex*0.7;
    end
end
                
% displaying the matrix
disp(mat);

The output is big so I am giving you just a look at it.

FOR HELP PLEASE COMMENT.
THANK YOU.

Add a comment
Know the answer?
Add Answer to:
Create a new 20 x 24 matrix using Matlab, I, that will contain the following for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT