MATLAB: What will be the program in matlab to find the average of various numbers arithmetic meanaverage average means the sum of a list of numbers divided by the size of the list, in other words the arithmetic mean. Best Answer mean(X)where X is a vector of the list of numbersORmean([1 3 4 5 7 3])Where your numbers are in the square brackets Related SolutionsMATLAB: Create a program that asks a user to input a number and then finds the sum of digits of the number using recursion. for example 341 = 3+4+1 = 8 Hi Matt,You have written function definition but missed to call the function 'mySum', that is why it is unable to compute anything.You can refer to the following code snippet to achieve thisnumbers=input('get a number'); numbers = num2str(numbers); out=mySum(numbers) function result = mySum(numbers) result=0; for i=1:length(numbers) result=str2double(numbers(end))+mySum(numbers(1:end-1)); end endHope this helps you! MATLAB: How to correct the program to execute this program for stadard deviation of non intger numbers by for loop Note that the indices in MATLAB are positive....ypu cannot use ii = p..you should use like below:p=input('enter value p');n=length(p);suma=0;for ii=1:length(p) suma=suma+p(ii)enddisp(suma)M=(suma)/(n);sumb=0;for ii=1:length(p) sumb=sumb+(p(ii)-M)^2endG=sumb;variance=((G)^2)/n ;sdeviation=(variance)^(0.5);Cv=(100*sdeviation)/(M);e=Cv/((n)^(0.5));N=(Cv/e)^(2);NR=round(N);disp(NR) Related QuestionThe function may be unusedHow to automate the sequence of codeHelp with for cycle in a vectorHow to finish this functionTaking An Average of Multiple Outputs From For Loop
Best Answer