Skip to main content
1-Visitor
April 22, 2017
Solved

range variable summation

  • April 22, 2017
  • 2 replies
  • 5838 views

Hello,


In the attached worksheet, inside the function "pulse2", the function L(k, θ, re ,d ,ti ) must be summed over different values of θ. Could you please help me to resolve the error message?

All the best,

Payman

Best answer by Werner_E

The commented attached file should help

2 replies

21-Topaz II
April 22, 2017

If origin = 0, you can not start qq from -2. Then you should change the loop start, in qq + 2

payman1-VisitorAuthor
1-Visitor
April 22, 2017

Thank you, but I'm not quite sure what you mean.

payman1-VisitorAuthor
1-Visitor
April 26, 2017

Could you please help me with the error message?

The output of the function “pulse2” is the times that the signal received by the left and the right microphones just reaches the threshold value.

But sometimes (as is shown in the worksheet) the signal never reaches the threshold value and hence there is no output . How can I setup the program that in this situation returns (0,0) value so the rest of my program continue working.

Thank you very much

Payman

F.M.‌, LucMeekes

21-Topaz II
April 26, 2017

At first glance, since everything depends on the threshold, I made this change where there is a comparison with the threshold. Could it be OK?

question033.jpg

payman1-VisitorAuthor
1-Visitor
April 26, 2017

Then it always returns (0,0) even when the signal reaches the threshold value.

Here is my complete program. The error also affect the next function.