2

I have a matlab file that draws 3 plots and I have an application in WPF. How can I insert the plots from matlab into my WPF application? (I do not want to run matlab's interface from my application)

I do not want to insert the screenshot of the plot, but I want to import the live plot from matlab with the ability to make zoom in and zoom out and resize the plot. Is it possible?

If there is an extern tool for this it would also be great.

1 Answer 1

5

This cannot be done under the restrictions you are putting on it.

If you remove at least one restriction:

  1. If you display the screenshots, you can just export it from matlab as a png and show it as an image.
  2. If you shell out to Matlab, you can let it do the loading, plotting, zooming, and resizing for you.
  3. If you would want to do the zooming and resizing yourself, you could make the matlab script generate a csv file or something similar, then load it in your WPF application, plot it using many available plotting utilities (ex: NPlot).

The only way you can come close is to shell out to matlab, and then using low level Windows calls make the Matlab figure show up as part of your WPF application, but this will not be easy and could break from version to version of Windows or Matlab.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.