How can I get data computed inside of a function to my work space to use?

3 vues (au cours des 30 derniers jours)
Thomas Firsich
Thomas Firsich le 20 Juin 2018
Commenté : Stephen23 le 20 Juin 2018
I currently have a function that runs with user inputted data to calculate a grid. I then plot the surface on a plot and have sliders that update the graph. Everything works as intended. However, I want to be able to switch what is on the x-axis and what is on the slider. In my function I take columns of the inputted data that the user specifies to assign them to the axis or sliders accordingly. I want to be able to run the grid computation once and then be able to make the graph in another so I can change the graph without having to let it run for two hours because it is 5 dimensional.
Thanks for any help!

Réponse acceptée

dpb
dpb le 20 Juin 2018
Anything you want to can be returned as one or more output arguments either as individual variables or arrays or any other higher-level data form; whatever is most convenient. You then just call the function with variables on the LH side of the expression as any other ML function.
See Createfunctions for tutorial discussion and the documentation for function for all the details.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by