Question
Note: I need matlab code and it must be on first entry, output what the question needs and i need it without any false in the matlab pls
program logic: • Find the index of minimum element with min() function. Make sure to take two outputs while using min(), the
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Matlab code

=====================================================================================

function x= findSum(v)

%index of minimum element is stored in minindex
%minimum value is stored in minvalue
[minvalue,minindex]=min(v);

%replace element at min index with mean of v
v(minindex)=mean(v);

%sum of v
x=sum(v);

end

=====================================================================================

Output

MATLAB R2018a Х HOME PLOTS APPS EDITOR PUBLISH VIEW ? Search Documentation Log In La Find Files Insert Efx til Comment % will

Add a comment
Know the answer?
Add Answer to:
Note: I need matlab code and it must be on first entry, output what the question...
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