Filter löschen
Filter löschen

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

13 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 8 Feb. 2021
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

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by