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

3 次查看(过去 30 天)
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 个评论
dpb
dpb 2020-6-2
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.

请先登录,再进行评论。

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by