MATLAB Answers

Write a function that takes a vector xyz and returns as output two variables

6 views (last 30 days)
Louis Foust
Louis Foust on 27 Apr 2015
Commented: Neal Alnajran on 4 May 2015
Hi, I'm new to MATLAB and i'm trying to solve this problem:
Write a function: named myAver that takes a vector xyz as input argument and returns as output two variables: scalar Mav which stores an average value of the vector and logic variable err. You cannot use MATLAB mean function.
  1 Comment
Joseph Cheng
Joseph Cheng on 27 Apr 2015
Is there a specific portion that you are getting stuck on. As this is a homework problem you'll find few people to directly answer it for you. please read to how to phrase your homework questions for people to help you out here.

Sign in to comment.

Answers (1)

Youssef  Khmou
Youssef Khmou on 27 Apr 2015
Edited: Youssef Khmou on 27 Apr 2015
try :
function [Mav,Err]=myAver(u)
% hint : use sum, length, std,...

Sign in to comment.


Community Treasure Hunt

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

Start Hunting!