Write a program which has differnt cases
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
I'm writing a program that should allow a user to pick from a list of 20 different mathematical cases. Once the case has been selected they are allowed to input 6 different variables. After that the program should use the numbers and the case selected and do the computation. How do I start on this? and are there any examples like this?
댓글 수: 0
답변 (1개)
Walter Roberson
2016년 6월 22일
Hint:
case_names = cellstr( num2str((1:20).', 'case #%d') );
choice = menu('Pick one', case_names{:});
switch choice
case 1: ....
otherwise: ....
end
댓글 수: 1
ROJI
2016년 6월 22일
이 질문은 마감되었습니다.
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!