Avoid "unnecessary data type conversion" warnings without switching of the respective diagnostics
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
John Harris
il 13 Dic 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....
Risposte (0)
Vedere anche
Categorie
Scopri di più su Configure and View Diagnostics in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!