Borrar filtros
Borrar filtros

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

13 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Walter Roberson
Walter Roberson el 8 de Feb. de 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

Más respuestas (0)

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by