Avoid "unnecessary data type conversion" warnings without switching of the respective diagnostics
조회 수: 4 (최근 30일)
이전 댓글 표시
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
John Harris
2017년 12월 13일
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....
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Configure and View Diagnostics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!