-
Notifications
You must be signed in to change notification settings - Fork 193
Utilities.Streams.writeRealMatrix seems to not work properly #4198
Hi,
I have a block component that writes in a mat file using the following code:
String dataName(start = getInstanceName() + "_dsignal", fixed = true); algorithm /* Write */ when terminal() and saveToFile then dataName := Utilities.Strings.replace(dataName, ".", "_"); success := Utilities.Streams.writeRealMatrix(fileName, dataName, dataSignal, format=format, append=true); end when;
The first line simply substitutes "." by "_" for matlab compatibility. I use two instances of this block in a model (Maximums and Minimums):
in such a way that two dataName strings are properly generated: "ModelName_Minimums_dsignal" and "ModelName_Maximums_dsignal". dataSignal is the matrix to be saved, which is properly defined.
In the case that the file does not exist, only one component writes in the file, despite the names of arrays to write are different and argument append = true. That is:
image
If the file exist, no one writes in the file (in that case Matlab indicates that mat file is empty). I have tried with different Mat formats and append values without success.
Can someone help me?
System: MSL 4.0.0 on OMEdit 1.22 dev and Windows 11.
Thanks!