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
MathWorks Support Team 2009년 6월 27일
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