Question

what does it mean: for i=1:length(t) h(i) = hat(t(i)); end how do I read it? I...

what does it mean: for i=1:length(t) h(i) = hat(t(i)); end

how do I read it? I have difficulties with the interpretation but I know is a hat function.

Homework Answers

Answer #1

Explanation:-

  • It is for loop execution in MATLAB
  • Here i is a variable for index of the vector t
  • Another vector h is declared
  • In MATLAB index start from 1
  • So loop through 1 to length of vector t
  • Take each element of t using t(i)
  • Ans pass as argument for your 'hat' function
  • Your hat function return a value which is assign to the vector h's corresponding index

        %Loop through from first index to end of the vector t
for i=1:length(t)
    %Assign vector h's corresponding index value as the hat function return value
    %Pass t's corresponding index value as argument to hat function
    h(i) = hat(t(i));
%End of for loop
end

-----------------------------------------------------

Note:-

I assume you implemented your hat function separately.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
What is the function of the RNase H domain in HIV-1 RT? I know RNases breakdown...
What is the function of the RNase H domain in HIV-1 RT? I know RNases breakdown RNA, but what is it breaking down? Because from what I know R.T does not have proofreading ability. What does this RNase H domain do when replicating DS Dna from SS RNA?
how do I explain this and what does it mean. []data=clearformula.split("(?<=[-+*/])|(?=[-+/])");
how do I explain this and what does it mean. []data=clearformula.split("(?<=[-+*/])|(?=[-+/])");
What does polarizability mean? How do things like bond strength and bond length affect the polarizability?
What does polarizability mean? How do things like bond strength and bond length affect the polarizability?
i want to know what does model fit mean & how to put it?
i want to know what does model fit mean & how to put it?
1. What does “t-distribution have thicker ends” mean? 2. Why do we divide by n-1, but...
1. What does “t-distribution have thicker ends” mean? 2. Why do we divide by n-1, but not n in empirical variance? 3. What is the level of significance?
What does it mean for the pendulum to have a small angle? How far does the...
What does it mean for the pendulum to have a small angle? How far does the period (T) of the pendulum differ from the linear model that we used to describe the pendulum as a function of initial angle? Note that for this one you will need to measure the period of a single swing of the pendulum. How can you / did you do this?
1. What does Nagel mean by "the subjective character of experience?" 2. Do you agree that...
1. What does Nagel mean by "the subjective character of experience?" 2. Do you agree that bats have experiences? Why? 3. Does Nagel believe in the existence of facts beyond the reach of any concept? Why? How do you know? 4. According to Nagel, how does reflection on what it is like to be a bat relate to the mind body problem? Do you agree? Why?
Suppose I have two coins: • Coin 1 is fair: H and T have the same...
Suppose I have two coins: • Coin 1 is fair: H and T have the same probability • Coin 2 is biased: H is twice as likely as T I select one of the coins with equal probability and flip it. If I obtained H, what is the probability that I chose coin 2?
When given NPV, I have trouble understanding how IRR functions. I read some materials online, it...
When given NPV, I have trouble understanding how IRR functions. I read some materials online, it mentioned that the IRR (which is the discount rate) that makes NPV goes 0. Hence, for example: Year 0 1 2 3 4 Present Value (900) 247.72 282.78 366.06 17.77 NPV = 9.32 I understand we can use IRR function in excel, however, when I want to do it in an trial end error method, what formula should I insert my "guess" rate? Kindly...
how do you read an intron exon diagram in “ensembl.org”? what do the lines mean?what about...
how do you read an intron exon diagram in “ensembl.org”? what do the lines mean?what about the filled in block?etc.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT