Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

09-17-2013 12:18 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Each term of the expansion can be calculated directly from [I]. All you need is to add them up. Where do you have problems?

09-17-2013 12:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

09-17-2013 01:09 PM - edited 09-17-2013 01:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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]:

- (-1)^n
- x^(2n+1)
- (2n+1)!

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

11-28-2017 10:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

11-28-2017 02:54 PM - edited 11-28-2017 03:18 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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?