does warning in MATLAB effect the results of program?

3 ビュー (過去 30 日間)
Muhammad Umer
Muhammad Umer 2015 年 10 月 7 日
回答済み: Walter Roberson 2015 年 10 月 7 日
i am running a program it gives me the warning:
warning: negative time as input
rest of the things are working properly. does this warning effect the results?
  1 件のコメント
KSSV
KSSV 2015 年 10 月 7 日
You have to be more clear in what context you got that warning?

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

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 10 月 7 日
Warnings indicate that the code detected something that was probably wrong, and dealt with it somehow. It might have just been telling you "It is pretty uncommon that anyone really wants to do what you asked and usually when they do they have made a mistake, but there is a meaning to what was asked and here is the answer to what was actually asked". Or it might be telling you that it threw away some of the data or that it returned NaN or some other fixed value or it might be telling you that the answer is probably numeric nonsense (like the inverse of a matrix that is nearly singular.) It depends on the code.
Because warnings can mean so many different things, including telling you about conditions that are rare but are what you really want to do, there is no rule about what will happen to your program when you get a warning. It might be about to crash; it might have computed something that is probably nearly meaningless; it might have done exactly what you might hope it would do under the circumstances (like discard a bad data point and keep going.) We can't say without more information.

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by