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

조회 수: 4(최근 30일)
Louis Foust
Louis Foust 2015년 4월 27일
편집: Youssef Khmou 2015년 4월 27일
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
Joseph Cheng
Joseph Cheng 2015년 4월 27일
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 http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers to how to phrase your homework questions for people to help you out here.

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

답변(1개)

Youssef  Khmou
Youssef Khmou 2015년 4월 27일
편집: Youssef Khmou 2015년 4월 27일
try :
function [Mav,Err]=myAver(u)
% hint : use sum, length, std,...
  댓글 수: 2

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by