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

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.

## Comments

• 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.
:

Sign In or Register to comment.

#### Howdy, Stranger!

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