필터 지우기
필터 지우기

how can I add a *.fig file to a *.html file through *.m file?

조회 수: 13 (최근 30일)
I have a fig file and I want to add that to the html file without loosing the features like zoom in, zoom out ,fit..etc which are available with figure viewer application.

채택된 답변

Walter Roberson
Walter Roberson 2021년 2월 8일
I suspect the only way that would be possible would be if you had an interactive MATLAB available at the time the html was to be viewed; in such a case it would in theory be possible to program javascript that made calls to MATLAB to do the zooming and fitting and so on.
Though possibly instead of an interactive MATLAB available, it might be possible to instead use MATLAB Compiler SDK to build a little viewer application that was talked to by javascript that was stored inside the .html file.
.fig files are really .mat files containing saved graphics objects, just as if you had used save() with a figure() . This is internal MATLAB format, not something that HTML understands. .fig files are not "image files" in the say that something like .jpg are.
If you need a "file" that can be "viewed", then one possibility is that you could export to a postscript file using U3D; see https://www.mathworks.com/matlabcentral/answers/238286-export-a-3d-figure-to-pdf-such-that-it-is-rotatable-etc-in-the-pdf

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by