hello...when an error occurs i have to run the code again and enter all my input datas again...i want you to help me please to re-enter just the incorrect data not all again
显示 更早的评论
hello...my code has at least 500 inputs...my problem is when i enter wrong input such as empty input(enter without entry) error occurs and i have to re-enter datas again...please help me to re-enter just the incorrect data not all datas again... abstract:when an error occurs i have to run the code again and input all my input datas again...i want you to help me please to re-enter just the incorrect data not all again thanks
5 个评论
James Tursa
2014-10-29
500 manual inputs??? Really? I think you need to rewrite your code to get these inputs from a script file, mat file, text file, etc. That way if you make a mistake it is a simple task of editing the file and re-running.
amir
2014-10-31
amir
2014-10-31
Image Analyst
2014-10-31
Why do you HAVE TO ? Why can't you enter it once in a data file and then just read it in?
amir
2014-11-1
回答(1 个)
per isakson
2014-11-1
This is not the most elegant approach, but it is easy to grasp and it works
Try
>> area = my_main_function
area =
12
where
function area = my_main_function
S = my_answers();
area = S.length * S.width;
end
and
function sas = my_answers()
sas.length = 3;
sas.width = 4;
sas.goodname = 'Cannot think of one';
% and another 497 lines
end
类别
在 帮助中心 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!