operation using *.m file

1 Ansicht (letzte 30 Tage)
Nik
Nik am 1 Apr. 2014
Kommentiert: Nik am 3 Apr. 2014
Can we make mathematical operation by calling our *.m function? For example, I have hthresh.m and sthresh.m. I want to get the average value of these 2 file.

Akzeptierte Antwort

Chandrasekhar
Chandrasekhar am 1 Apr. 2014
make hthresh.m and sthresh.m as function files
function val1 = hthresh()
function val2 = sthresh()
and use the below code in another .m file
val1 = hthresh();
val2 = sthresh();
avg = (val1+val2)/2;
  1 Kommentar
Nik
Nik am 3 Apr. 2014
Tq very much Sir Akshata... it helps..

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Entering Commands finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by