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

조회 수: 1 (최근 30일)
alpedhuez
alpedhuez 2020년 6월 1일
댓글: alpedhuez 2020년 6월 2일
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에서 Variables에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by