help with function to solve mean

조회 수: 10 (최근 30일)
phoenix_47
phoenix_47 2017년 11월 16일
편집: phoenix_47 2017년 11월 16일
median and mean without using the functions
  댓글 수: 3
Steven Lord
Steven Lord 2017년 11월 16일
Can you show us what you have so far? That way we can offer specific suggestions for your implementation.
phoenix_47
phoenix_47 2017년 11월 16일
Can I private message you?

댓글을 달려면 로그인하십시오.

답변 (1개)

KL
KL 2017년 11월 16일
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!

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by