How can I read more than one variable with the 'vbload' command of MatrixVB?

1 次查看(过去 30 天)
I can save two matrices to a file using MatrixVB with the 'vbsave' command.
I would like to read them both in with the 'vbload' command.
Here is my sample of code:
Private Sub Form_Load()
a1 = magic(5)
a2 = magic(3)
vbsave "magic", a1, a2
' saves a1 and a2 to the file "magic.mat"
'THIS DOES WORK, You can verify by loading your file from MATLAB
'
b = vbload("magic") 'loads the content of the
' file "magic.mat" to the
' variable b
'This below does not work as expected
c = b(1) 'This is supposed to be a 5x5 matrix
c.Show
c = b(2) 'This is supposed to be a 3x3 matrix
c.Show
End Sub

采纳的回答

MathWorks Support Team
There is no workaround for this issue, because MatrixVB is no longer being developed.
Consider using Excel Builder as a replacement/migration product from MatrixVB.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by