How do I store results into a vector? (MATLAB) - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# How do I store results into a vector? (MATLAB)

Posts: 10Member
So here's my code:

function Ratio = findit(fc)

for M = 1:200;

gains = dtmf_filt_char(M,fc,0); %dtmf_filt_char is a funtion
gain_ratio(gains); %gain_ratio is a funtion that I made

M = M +1;

end

Basically, I want to store all the results of gain_ratio(gains) into a vector so I can plot it against M. Can anyone help? Thanks.

• Posts: 2Member
hi there....u can jus alter this statement to
result=gain_ratio(gains);
but before that just check that does the function u made returns the value in a vector form or not.
lemme kno abt the function as well so i can try sort out...
hope it helps:)
c ya
: So here's my code:
:
: function Ratio = findit(fc)
:
: for M = 1:200;
:
: gains = dtmf_filt_char(M,fc,0); %dtmf_filt_char is a funtion
: gain_ratio(gains); %gain_ratio is a funtion that I made
:
: M = M +1;
:
: end
:
: Basically, I want to store all the results of gain_ratio(gains) into a vector so I can plot it against M. Can anyone help? Thanks.
: