Similarities between matlab and c programming??which toolbox to use?

like in C programming,we can provide a method to take input from user until certain value tends to a limit,is it possible like that in matlab, where we can accept real time input from users and terminate or limit the method until a threshold value is reached...which toolbox do i need to use for it? another question-can i simultaneously use two or more toolboxes in a single program?

 채택된 답변

Zoltán Csáti
Zoltán Csáti 2014년 10월 20일
For the first question: core MATLAB is enough. The syntax (with an example) is:
correctAnswer = false;
while ~correctAnswer % reiterate until the right answer is provided
% put your function here, e.g.
output = input(description, 's');
if isa(output, 'double')
correctAnswer = true;
else
error('Wrong type is given.');
end
end
For the second question: you can use the functions of all toolboxes in a single program.

댓글 수: 2

thank you so much,you just prevented a nuke ;)
Happy to hear it. :)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2014년 10월 19일

댓글:

2014년 10월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by