Dynamic Link between MATLAB and EXCEL

조회 수: 10 (최근 30일)
Tolutola
Tolutola 2012년 11월 7일
Hello, Is it possible to create a dynamic link between cells in excel and matlab variables? It would be really nice if the spreadsheet link tool can enable spreadsheet cell values to update when matlab variables change and vice versa. I've tried to figure it out with the spreadsheet link tool but I seem not to get it.
Thanks.
  댓글 수: 2
Jan
Jan 2012년 11월 7일
It is not trivial to let even Matlab itself perform an action, when a variable is changed.
Image Analyst
Image Analyst 2012년 11월 7일
Not sure I understand that comment. MATLAB's own built-in variable spreadsheet (what you get if you double click a variable in the workspace panel) does change immediately when you change a variable (say in the command window or in your code).

댓글을 달려면 로그인하십시오.

채택된 답변

Friedrich
Friedrich 2012년 11월 7일
편집: Friedrich 2012년 11월 7일
Hi,
triggering some MATLAB calaculation when a Cell is changed in an Excel Worksheet is doable with some VBA programming knowledge. Each Excel sheet raises an event:
when something is chnaged in that sheet. You also get the Range Object which tells you what changed. So you get an event when something changes and you also get information about what Range changes. From there on you can determine if a MATLAB action is needed and call MATLAB to perform whatever you need if necessary. See "Data export to MATLAB" and "Data import from MATLAB" here:
The other way around is the very tricky one. So when some value in MATLAB changes one need to notify Excel in a smart way without creating a deadlock. At the moment I haven't a good idea how to do that. If I come up with something I will post it here.
  댓글 수: 1
Tolutola
Tolutola 2012년 11월 7일
Thanks a lot, I'll try using some VBA code and MATLAB's spreadsheet link toolbox.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by