Hi Ulf,
I understand that you're looking to ensure that your signals are represented with a different unit via COMPU_METHOD declaration in an A2L file for an AUTOSAR-compliant model in MATLAB R2019b.
Note that MATLAB R2019b does not provide the option to create a custom definition of 'CompuMethod' and associate that with a measurement/characteristic.
However, as of MATLAB R2022b, you can use the 'coder.asap2.getEcuDescriptions' object to create an information object for your model ans customize it by creating a new 'CompuMethod' and setting it for your desired signals. Please refer to the "Customize an ASAP2 File" example given in the following documentation for more information on the same:
The following links can be useful to learn more about ASAP2 Customization:
- get ECU description object - https://www.mathworks.com/help/rtw/ref/coder.asap2.getecudescriptions.html
- add - https://www.mathworks.com/help/rtw/ref/coder.asap2.getecudescriptions.add.html
- find - https://www.mathworks.com/help/rtw/ref/coder.asap2.getecudescriptions.find.html
- set - https://www.mathworks.com/help/rtw/ref/coder.asap2.getecudescriptions.set.html
- export - https://www.mathworks.com/help/rtw/ref/coder.asap2.export.html
Hope this helps.