Creating function with two vector inputs?

조회 수: 3 (최근 30일)
Ruby
Ruby 2014년 10월 27일
편집: Torsten 2023년 2월 15일
I'm very new to matlab and do not understand ANY of this question!
"create a function that requires two vector inputs- the mass and molecular weight- and returns the corresponding number of moles"
any help or advice please?

답변 (1개)

Sean de Wolski
Sean de Wolski 2014년 10월 27일
  댓글 수: 2
Kam
Kam 2023년 2월 15일
I am still confused. Could you provide more context?
Torsten
Torsten 2023년 2월 15일
편집: Torsten 2023년 2월 15일
What are you confused about ? How to write a function with two vector inputs and one vector output ?
function N = mass_to_moles(M,MM)
N = M./MM;
end

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by