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

Rahul@123

Member

03-01-2021 07:35 PM

Options

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

Hi

I have an array of elements example :

1

2

3

4

I have an element example : 10

My expected output is :

10 - 1 = 9

9 - 2 = 6

7 - 3 = 4

4- 0 =0

I am confused and it would be a great help if you can give an algorithm or a VI code?

Thank a lottt

Solved! Go to Solution.

altenbach

Knight of NI

03-01-2021 08:14 PM

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

Your description and example makes no sense.

Where do the other numbers come from?

What is the math?

Is 10 an array element or a scalar?

Why is 9-2=6?

Why is 4-0=0?

03-01-2021 08:23 PM

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

Sorry for the misunderstanding.

ITs kind of difficult to word it correctly. Attaching is a excel file and the kind of operation I am looking for.

Thank you once again

crossrulz

Knight of NI

03-01-2021 08:30 PM

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

What have you tried? What exactly is your input(s)? What exactly do you want for your output(s)?

There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Unofficial Forum Rules and Guidelines

"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5

03-01-2021 08:32 PM

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

Sorry for the misunderstanding.

Its kind of difficult to word it correctly. Attaching is a excel file and the kind of operation I am looking for.

Thank you once again

crossrulz

Knight of NI

03-01-2021 08:36 PM

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

Yes, I saw your Excel file. I understand the math, but I don't understand exactly what your inputs are and what you expect for an output. How about attaching your VI to show what you have tried so far.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Unofficial Forum Rules and Guidelines

"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5

03-01-2021 08:41 PM

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

To make it even more clear

There are two inputs:

1st input is any array of elements [1 2 3 4 ]

2nd input is a reference element : 10

My expected output is another array with the below mentioned operation.

my expected out is that, I need to subtract the 1st element of the array with the reference element : i.e. 10-1=9 .

Therefore 9 becomes the 1st element of my output array.

The second element of my output array is the 1st element of the output array (i.e.9) subtracted by the 2nd element of the input array(i.e.2). This result gives the 2nd element of the output array(9-2=7).. .

so on i need to populate the rest of the array in a similar way and final output being :[9 7 4 0]

I hope this would make things a bit more clear.

03-01-2021 08:43 PM

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

This is the first step to my program and I am stuck here. So kind of nothing in the VI.

Solution

Accepted by Rahul@123

altenbach

Knight of NI

03-01-2021 10:22 PM

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

Try to understand this, maybe you learn something:

03-02-2021 03:24 AM

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

Thank you for the solution.

I'm still learning the use of shifters, feedback node all these concepts.