引用其他m文件的结果。

现有两个m文件,均有最终的结果,如何构造函数,使trend_1的计算结果加到trend_main中,即把trend_1中的v1、v2、v3、v4、v5加到trend_main对应的计算结果中。希望可以再有个m文件,在这个m文件实现相加,怎么调用,求教!

 Respuesta aceptada

twaccos
twaccos el 16 de Mayo de 2023

0 votos

构造函数:function [v1,v2,v3,v4,v5]=trend_1();
然后在tremd_main.m文件中调用trend_1函数,调用格式如下:
[v1,v2,v3,v4,v5]=trend_1();

Más respuestas (0)

Preguntada:

el 16 de Mayo de 2023

Respondida:

el 16 de Mayo de 2023

Community Treasure Hunt

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

Start Hunting!