Question
matlab
r own code for the Matl.ab function min( ) that will have a vector or and will return the minimum and index matrix of the min
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB:


clc;clear all;

A=[1 22 30 4 15;
11 12 10 8 35;
21 32 5 44 60;]

[M,N]=size(A);
for i = 1 :N   
AA = A(:,i)';
m = AA(1);
for i1 = 2:M
if m > AA(i1)
m = AA(i1);
end
minimum(i)=m;
index(i)=find(AA==m);
end
end
disp('Minimum values of each column of the matrix')
disp(minimum)

disp('index of the mMinimum values of each column of the matrix')
disp(index)

Command window:

A =

1 22 30 4 15
11 12 10 8 35
21 32 5 44 60

Minimum values of each column of the matrix
1 12 5 4 15
index of the mMinimum values of each column of the matrix
1 2 3 1 1
>>

Add a comment
Know the answer?
Add Answer to:
matlab r own code for the Matl.ab function min( ) that will have a vector or...
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
ADVERTISEMENT