combine different data types as a single output and send to workspace

2 次查看(过去 30 天)
Hello!
I use a bus creator to combine different data types (e.g double, string) in a single output. However, when i try to send this to workspace using the 'to workspace' block, it does not accept different data types. Do you have any other suggestions?
Thanks
  1 个评论
Dongyue
Dongyue 2023-1-18
My suggestion is using two ToWorkspace blocks instead of one. ToWorkspace will store data in array, and array can only store data with the same datatype. In MATLAB, items with different datatypes should be stored in cell, but this is not allowed for ToWorkspace block.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Event Functions 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by