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 日

0 投票

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 件のコメント

UTKARSH SINGH
UTKARSH SINGH 2014 年 10 月 20 日
thank you so much,you just prevented a nuke ;)
Zoltán Csáti
Zoltán Csáti 2014 年 10 月 21 日
Happy to hear it. :)

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File 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