09-17-2013 12:18 PM
09-17-2013 12:48 PM
I do not know how to correctly set it up that way... I have tried many times but it does not work. I do not know where my problem is
09-17-2013 01:09 PM - edited 09-17-2013 01:12 PM
This is very simple. Part of the problem could be that you have some of your inputs reversed. For example instead of "(-1)^n" you seem to calculate "n^(-1)", which is someting completely different! Also mind your representations. The value wired to N should be an integer (blue). You definitely don't need a formula express VI.
For each iteration you need the following terms based on the iteration number obtained from [i]:
combine them according to the formula and run the loop N times and autoidenx the result at the right loop boundary. After the loop, use "add array elements" to create the sum. You don't even need a shift register.
There are many other ways to do it (e.g. as in the quoted thread), but try this first. Post your code (the actual VI, not pictures!) if you get stuck.
11-27-2017 05:48 PM
I am trying to do this. But I can't on configure formula. This looks hard to me. Would you kindly provide an example?
Thanks!
11-28-2017 12:25 AM
@BArtzon wrote:
I am trying to do this. But I can't on configure formula. This looks hard to me. Would you kindly provide an example?
You are adding to a very old thread with many posts.
What is "this" that you are trying to do?
Why are you trying to use a formula node at all and what exactly seems hard to you?
11-28-2017 02:57 AM
I had to try it for funsies. It's quite impressive how well it hits the target just with n=5.
/Y
11-28-2017 10:25 AM
@Yamaeda wrote:
I had to try it for funsies. It's quite impressive how well it hits the target just with n=5.
Yes, it is pretty good. In my old post, I claim that with 14 terms we get within 1e-15 of the correct values.
11-28-2017 02:44 PM
You gave me the solution, but I think I missed something. I am getting the wrong output. Can you check what is wrong? I am new to this.
11-28-2017 02:54 PM - edited 11-28-2017 03:18 PM
did you notice the inversion circle on the lowest input of the middle compound arithmetic node? Right-click the terminal and select invert, resulting in a division. The rest is correct.
You probably also want to remove that wait. Makes no sense to have it there
Btw, my code is posted here. (Also, the above image is a snippet)
11-29-2017 01:29 PM
Thank you!
I am trying to do the taylor expansion of sinx using the formula node but don't quite understand how to go about defining the factorial. How would you do that?