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

1 Ansicht (letzte 30 Tage)
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

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 27 Jun. 2009
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.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by