<html><body><span class="xfm_17753698"><pre>Yes! I agree with this change. But constructions with condition in the left part such as

y(x>10)=y(x>10)+1;

at false condition cause the same result in 5.5.2 and 6.0.0. Therefore, the warning is not required in this special case. Now I will use additional "if" block to bypass this warning:

if or(x>10) then
    y(x>10)=y(x>10)+1;
end
    
B.r.
Viktor.

 --- Оригінальне повідомлення ---
 Від кого: tim@wescottdesign.com
 Дата: 27 березня 2017, 22:22:48
 



> Wait. That's a major change in behavior, and will result in some broken code out here in user-land:
> -->getversion
> ans =

> scilab-5.5.2 

> -->A = rand(3,3)
> A =

> 0.0683740 0.7263507 0.2320748 
> 0.5608486 0.1985144 0.2312237 
> 0.6623569 0.5442573 0.2164633 

> -->A = A + []
> A =

> 0.0683740 0.7263507 0.2320748 
> 0.5608486 0.1985144 0.2312237 
> 0.6623569 0.5442573 0.2164633 
> On 2017-03-27 11:49, Viktor Mileikovskyi wrote:Dear members!

I have problems with new warning "Warning adding a matrix with the empty matrix will give an empty matrix result.".

A construction such as

y(x>10)=y(x>10)+1;

produce the warning in 6.0.0 version if all of x<10. It is very critical if such construction is in a cost function of optimization, function for zero search or other iteration process.

If millions of calculations of the affected function is required, the time consumption significantly increases and the output will be littered and unreadable. Using warning('off') usually is not good idea because it can suppress some important warning during the calculation. Is it possible to suppress the warning separately?

Multiplication, division or power do not produce the same warning.

With best regards.
Viktor.


_______________________________________________
 users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users





E-Mail: v_mil@ukr.net
E-Mail: mileikovskyi@gmail.com
Skype: mileikovskyi
Mob: +38-044-2284247
Mob: +38-094-8284247

 </pre>
</span></body></html>