Is there a Matlab function to find the minimum of 4 integers? Min only finds for 2 integers

 채택된 답변

Karsten Reuß
Karsten Reuß 2017년 1월 19일

0 개 추천

Do you mean this?
smallestnumber=min([3 5 6 7])

추가 답변 (1개)

Guillaume
Guillaume 2017년 1월 19일
편집: Guillaume 2017년 1월 19일

0 개 추천

Put all your integers in one array and call min, e.g.:
min([10 15 11 9])

댓글 수: 2

Ken
Ken 2017년 1월 19일
Thanks
Ken
Ken 2017년 1월 19일
편집: Ken 2017년 1월 19일
I am trying to evaluate this, but I want the answer in the expression for x and y; instead I am getting an integer. Please help:
min([(x-1 - Goal(1) +y - Goal(2)),(x+1- Goal(1) +y- Goal(2)),...
(x - Goal(1) +y-1 - Goal(2)),(x - Goal(1) +y+1 - Goal(2))])

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

카테고리

도움말 센터File Exchange에서 Aerospace Blockset에 대해 자세히 알아보기

태그

질문:

Ken
2017년 1월 19일

편집:

Ken
2017년 1월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by