Simulinkは、モデルをコンパイルしたときに、信号のデータ型が確定します。
feval('モデル名', [], [], [], 'compile'); コマンドを使用し、モデルをコンパイルされた状態にします。
その状態で、任意のポートハンドルを取得し、ポートハンドルの、CompiledPortDataTypeを取得することで、そのポートのデータ型を取得できます。
最後に、feval('モデル名', [], [], [], 'term')コマンドで、コンパイル状態を解除します。
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1138740/image.png)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!