Proektsoftbg / Calcpad

Free and open source software for mathematical and engineering calculations.
https://calcpad.eu
MIT License
313 stars 38 forks source link

Map Plot Error #279

Closed murilo-s closed 2 months ago

murilo-s commented 2 months ago

Hello,

I'm having trouble while trying to plot a map. I'm using a switch function and I get an error that the calculated unit is "unitless", but I'm checking all terms separately and the units are correct. MY assumption is that there is a bug when plotting a map with a switch function. See image:

image

Thanks.

Proektsoftbg commented 2 months ago

This certainly is not related to $Map. It occurs somewhere in the function. I can see that you have two switch cases "<" and "≡". It is not clear what happens when it is ">". My advice is always to have a "default" case - a final expression without check before it.

murilo-s commented 2 months ago

Thanks. That was the problem. Although my "y" is varying from 0...L, the function needs a general rule. When I fixed this, it worked fine.