How can one refer to the calculation in a function m-file?

2 visualizaciones (últimos 30 días)
alpedhuez
alpedhuez el 1 de Jun. de 2020
Comentada: alpedhuez el 2 de Jun. de 2020
I have a livescript file main.mlx. The file refers to a function m file test.m. In this test.m I calculate
s1=polyvar(x,y).
I want to use s1 in main.mix to calculate polyfit. What should one do?
  1 comentario
dpb
dpb el 2 de Jun. de 2020
Call test with place to store the returned result -- presuming, of course, the function was written to return the desired result. If that's not the case will have to rewrite at least the function line to return the desired output.

Iniciar sesión para comentar.

Respuesta aceptada

Kevin Joshi
Kevin Joshi el 2 de Jun. de 2020
Hi,
Please check the example of live script and a function called by it.

Más respuestas (0)

Categorías

Más información sobre Software Development Tools en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by