Avoid "unnecessary data type conversion" warnings without switching of the respective diagnostics

2 visualizaciones (últimos 30 días)
I have a low pass filter library block using the "Conversion Inherited" block to maintain fixed point scaling. In some cases the fixed point scaling of the incoming signal has no fraction (2^0 scaling) and so should be the output. Here the "Conversion Inherited" naturally has no effect and I get "Unnecessary type conversions" warnings. But even if it wasn't inside a library, that is used in many other places, I would like to keep the conversion block as it should grant me the right data type of the output with respect to the input signal, which IMHO is exactly what the "Conversion Inherited" block is made for. Is there any workaround allowing me to keep the diagnostics as well as the "Conversion Inherited" block without the wrong diagnostics with it?
TIA, Robert
  1 comentario
John Harris
John Harris el 13 de Dic. de 2017
I have the same question for "Data Type Conversion" blocks set to "Inherit: Inherit via back propagation." This is inside some Simulink library blocks (e.g. the Aerospace Blockset > Flight Parameters > Ideal Airspeed Correction > Mach <= 1.0 block). If my inputs to the Ideal Airspeed Correction block are Doubles, the type conversion is unnecessary and gets flagged. I wish we could at least disable the UnnecessaryDatatypeConvMsg diagnostic for library blocks....

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Configure and View Diagnostics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by