Turn on suggestions

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

Showing results for

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

Showing results for

Options

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

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

Showing results for

Aug 01, 2016
07:01 PM

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

Aug 01, 2016
07:01 PM

Can you store multiple solutions of a Find function which has a vector as a constant?

I have a program that uses the Find(x) function to solve for the allowable length of a beam whose design is based on a series of moments and shears. The file attached is a very simplified version of what I am trying to do in the actual program. One of the constants (in this case y) is a vector of fixed values. I want to solve the system of equations for x using the three different values of y and store each of the results for x in a new vector. Can someone assist me in developing the correct notation to get the desired solution?

Thanks,

Derek

4 REPLIES 4

Aug 02, 2016
03:10 AM

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

Aug 02, 2016
03:10 AM

at first glance, it seems to me that this is the solution:

Aug 02, 2016
04:21 AM

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

Aug 02, 2016
04:21 AM

At first it has to be said that this is NOT a system of equations! Its just one equation in one variable which you defined using some helper functions m and n.

I guess that you posted a simplificated version of your real problem and so I was not sure, if the guess value for x should be the same for any y or if you really want to provide a different guess for every value of y - so I provided both versions.

If you want to evaluate a solve block for different input values its always the best solution to write the solve block for a single scalar input variable (in your case y), turn it into a function (!!) and then call that function with a vector of inputs. That function call should be vectorized to be on the safe side.

Here is the solution using the same guess x=0 for every value of y:

And here is the modification which allows you to provide the guess value as additional function argument. In your example there are always two solutions and it depends on the guess value which one you get:

Of course your simplified equation could easily be solve symbolically which gets you both solutions for every value of y at once:

Regards Werner

Aug 03, 2016
12:59 PM

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

Aug 03, 2016
12:59 PM

This was helpful but we are still not getting exactly what we are looking for. I have attached two files. The 1 Zone file is the calculations that we are currently running. The All 3 Zones calculation turns wx7 into a vector to run the analysis for three separate values. Can you take a look at the attached and let me know if there is a way to get the vector analysis to work?

Aug 04, 2016
12:09 PM

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

Aug 04, 2016
12:09 PM

Hi Derek.

The problem is in the abs function: with a vector it is the norm.

In the attached, a workaround.

Best regards.

Alvaro.