MATLAB Answers

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

3 ビュー (過去 30 日間)
Louis Foust
Louis Foust 2015 年 4 月 27 日
コメント済み: Neal Alnajran 2015 年 5 月 4 日
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,...

  3 件のコメント

John D'Errico
John D'Errico 2015 年 4 月 27 日
Its generally best if you don't give a student (especially ones with novice questions for homework) the complete code for their homework. This helps nobody, and certainly not the student.
Neal Alnajran
Neal Alnajran 2015 年 5 月 4 日
Please give us the full answer again!

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by