help with function to solve mean

11 vues (au cours des 30 derniers jours)
phoenix_47
phoenix_47 le 16 Nov 2017
Modifié(e) : phoenix_47 le 16 Nov 2017
median and mean without using the functions
  3 commentaires
Steven Lord
Steven Lord le 16 Nov 2017
Can you show us what you have so far? That way we can offer specific suggestions for your implementation.
phoenix_47
phoenix_47 le 16 Nov 2017
Can I private message you?

Connectez-vous pour commenter.

Réponses (1)

KL
KL le 16 Nov 2017
First you need to learn to create an array. You could either use concatenation operator - [] or the semicolon operator,
once you have that you need to learn how to create functions,
Passing arrays into functions is just like passing a scalar, for example,
function [out_mean, out_median] = calculateMeanMedian(inputArray)
%your calculation
end
To do the computation in your function, you need to learn how to index arrays in matlab and then how to use a loop,
now all you need to do is to get started, good luck!

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by