Get Help

Turn on suggestions

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

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- PLS HELP! Error with the arrays at system of equat...

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

Highlighted

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

03-29-2020
11:27 AM

03-29-2020
11:27 AM

Hello everyone!

I´m trying to solve a system of equations with vectors and the solver tell me that there is an error in the array... I put captures so you can see what im doing.

Thanks to everyone!

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

03-30-2020
07:36 AM

03-30-2020
07:36 AM

I am surprised that you got a solution because when I tried I got the error message that no solution was found. Maybe I inadvertently changed an equation when I edited the file.

Anyway, the result you get in your variable solucion is a nested vector. A vector with six elements, each of which is a 12x1 matrix, a 12 element vector. By default Prime does not expand them when displaying but you can change that in the ribbon menu for array and tables.

You can also access a single result vector using vector indices.

So solucion[2= should show you the vector T.ico.

A better way probably is not to assign the result of the reply of the solve block to a single variable "Solucion" but to a vector of variables, like that:

In my first reply I forgot to mention why you should get rid of the square brackets. When you manually type a square bracket, you create a vector or matrix (like when you type Ctrl-M) which is sure not what you intended.

10 REPLIES 10

Highlighted
##

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

03-29-2020
01:51 PM

03-29-2020
01:51 PM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

Yes, pictures are fine. But the worksheet is of much more help.

You should ALWAYS attach the (or a) worksheet that, at least minimally, shows your problem.

Success!

Luc

Highlighted
##

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

03-29-2020
01:56 PM

03-29-2020
01:56 PM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

Here is the file, wish it is clear

Is at the end of the file

Highlighted
##

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

03-29-2020
04:18 PM

03-29-2020
04:18 PM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

In the Guess values part you've nicely placed guess values for each of your variables to be solved.

No look at the labels of your guess values, and the labels of the parameters of the Find function. The guess values are labelled 'variable', while the parameters of the Find function are 'automatic'. Change those to 'variable' and see what happens.

Success!

Luc

Highlighted
##

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

03-29-2020
05:00 PM

03-29-2020
05:00 PM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

I´ve change the labels in the solver part. It keeps telling me the array error...

I also tried to define the variables as numbers, escalars, and do it twelve times once per month so it doesnt have to deal with matrices. But then it tell me to change the input values or to change TOL or CTOL. Even i put those as high as possible and i tried changing the input variables and no success in the resolution. I dont know what to do next ;(

Highlighted
##

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

03-29-2020
05:07 PM

03-29-2020
05:07 PM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

One more, simple thing:

Remove the '=' that follows your Find() function.

(Although many times it works as expected, I've seen too many occasions where a definition including an evaluation causes trouble).

Success!

Luc

Highlighted
##

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

03-29-2020
05:21 PM

03-29-2020
05:21 PM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

Same error. I have try to change again between variable or automatic without the = after the Find() but with none of those labels works ;(

Highlighted
##

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

03-30-2020
07:10 AM

03-30-2020
07:10 AM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

Get rid of all the square brackets you typed manually! Especially the ones in your first equation which is the reason for the error message about the wrong array dimension.

Furthermore you should change your guess values to avoid the division by zero when using them (third equation).

Generally a much better approach would be to set up the solve block using just single scalar values, turn the solve block in a function with T.0 and T.red as arguments and then call this function vectorized.

Highlighted
##

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

03-30-2020
07:17 AM

03-30-2020
07:17 AM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

Hello Werner, i did that and now there is no error but i cant see the solution for each variable, how can i see them?

Highlighted

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

03-30-2020
07:36 AM

03-30-2020
07:36 AM

I am surprised that you got a solution because when I tried I got the error message that no solution was found. Maybe I inadvertently changed an equation when I edited the file.

Anyway, the result you get in your variable solucion is a nested vector. A vector with six elements, each of which is a 12x1 matrix, a 12 element vector. By default Prime does not expand them when displaying but you can change that in the ribbon menu for array and tables.

You can also access a single result vector using vector indices.

So solucion[2= should show you the vector T.ico.

A better way probably is not to assign the result of the reply of the solve block to a single variable "Solucion" but to a vector of variables, like that:

In my first reply I forgot to mention why you should get rid of the square brackets. When you manually type a square bracket, you create a vector or matrix (like when you type Ctrl-M) which is sure not what you intended.

Highlighted
##

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

03-30-2020
07:43 AM

03-30-2020
07:43 AM

Re: PLS HELP! Error with the arrays at system of equations dealing with matrix.

Done, changing the option "convert nested arrays" it displays all the values.

THANK YOU!!