About GivenFind function

About GivenFind function - Сообщения

#1 Опубликовано: 17.03.2018 19:05:44
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

Greetings to everyone.

I have tried to solve a system of nonlinear equations using the "GivenFind" procedure. I've attached two screenshots below with the bugs returned by the program. In the first image, the program has returned: "x - undefined" error, as can be seen. I then defined the vector x, and the program returned the error "GivenFind - the function is not defined" as in the second image. What could be wrong?
Файл не найден. Файл не найден.
#2 Опубликовано: 17.03.2018 20:38:36
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

"GivenFind" procedure.



It is not an Smath procedure. The native procedure "FindRoots"
Which to me is a non sense as you are given something and want to find.

Solve GivenFind PetShop.sm (13 КиБ) скачан 58 раз(а).

Solve TREASURY_1 [Iterate L, Lc].sm (36 КиБ) скачан 45 раз(а).
#3 Опубликовано: 18.03.2018 02:49:55
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

Bonjour Jean Giraud.
.
I tried before, including the way you suggest it. In addition I analyzed some examples I found on the forum. The results were the same. I attach a new image to one of the examples you gave me in your answer. You may notice a similar error. Therefore, please help me solve the problem.

GivenFind 3.jpg
#4 Опубликовано: 18.03.2018 04:05:29
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello,

Just suppress evaluation of the marked region.

nonlin.PNG
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Опубликовано: 18.03.2018 05:06:26
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

hello omorr.

The result is the same. I have not attached a new image. I specify that if I define the sizes x, y and z, the program returns the error "FindRoot - the function is undefined"
#6 Опубликовано: 18.03.2018 05:58:48
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

BTW, I still have a frustrating experience in SMath whenever I try to numerically solve a nonlinear system of equations F(X)=0 given n valued vector function F(X) with unknown vector X with n elements when, say, n >= 10.
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#7 Опубликовано: 18.03.2018 11:34:21
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

BTW, I still have a frustrating experience in SMath whenever I try to numerically solve a nonlinear system of equations F(X)=0 given n valued vector function F(X) with unknown vector X with n elements when, say, n



Bonjour Radovan, please give us an example.

#8 Опубликовано: 18.03.2018 12:01:58
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

Wrote

BTW, I still have a frustrating experience in SMath whenever I try to numerically solve a nonlinear system of equations F(X)=0 given n valued vector function F(X) with unknown vector X with n elements when, say, n



Bonjour Radovan, please give us an example.



Bonjour Jean, ça va?

We already had this discussion some time ago - see this post, please.
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
Davide Carpi 18.03.2018 12:39:00
#9 Опубликовано: 19.03.2018 07:02:34
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

Greetings to all

Here is a practical and very laborious way to solve the initial problem. The three basic non-linear equations are those on a yellow background. The MathCAD program's symbolic calculation facilities were used to solve two of the basic equations in relation to the η and λ variables. The necessary substitutions were made in the third equation and I was able to define the function N (n) in this way. The equation N (n) = 0 is solved using the "solve" function in Smath. A second function (Λ (λ)) was then elaborated which was solved in turn using the same function. Finally, one of the two equations solved in relation to the variables η and λ is actually calculated. The whole calculation process lasted about 60 minutes. I wonder how long it would take if I did not have the facilities of MathCAD's symbolic calculation ?! Probably a lot of hours. What would have happened if (as Radovan had said) the number of variables would have been greater than 3 ?! It would have been frustrating indeed. Therefore, if Smath developers read this post, I think it would be good to consider the possibility of implementing a "Given-Find" and / or "Given-Minerr" computation procedures similar to those used in MathCAD. I attached here along with the image of the Smath solution, a picture of solving the same problem in MathCAD by using the "Given-Find" procedure. It lasted only as long as it was necessary to edit the necessary relationships in that spreadsheet. Otherwise, all the best.

Файл не найден. Файл не найден.
#10 Опубликовано: 19.03.2018 07:51:47
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello,

It seems that for your problem there is a solution (do not know if it is a viable one). FindRoot() will do the job here. One might consider FindRoot() similar to Given/Find in Mathcad.

FindRoot3.GIF

FindRoot3.sm (13 КиБ) скачан 40 раз(а).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
Davide Carpi 19.03.2018 10:26:00
#11 Опубликовано: 19.03.2018 09:45:21
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Therefore, if Smath developers read this post, I think it would be good to consider the possibility of implementing a "Given-Find" and / or "Given-Minerr" computation procedures similar to those used in MathCAD.



I claimed for that ... no answer. Mathcad Given/Find, Given/Minerr are/were Mathsoft proprietary
from "Numerical Recipes" [improved methods]. In a loop, Given/find goes up to 399 steps.
In common use, past few visible conditions it's no problem. We did a project from blank
knowledge up to 22 conditions, it lasted at least a week. Generally, the problem has some
sort of model guide line. If NOT, pedal in patience [pedal in butter].

Given/Minerr would be a great asset in Smath. Otherwise, we have the Conjugate Gradient,
just a bit more difficult to manage but 62 optimized model functions were done.
The difficulty, even in Mathcad Given/Minerr [LM] is that many models are very reactive
and LM fails ... only manual fit are possible. I have not yet managed to Minerr/Solve DE
in Smath ... Original from Mathsoft, extended from Russian Mathcad Collabs.

Cheers.
#12 Опубликовано: 19.03.2018 10:48:35
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

Hello

@Radovan: It works

@Jean Giraud: I can not comment. For now, I've managed to solve the problem. Another time I will see.
#13 Опубликовано: 19.03.2018 10:53:59
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Wrote

My variant is a portable one, which I installed recently and I would not want to change it for the time being.



Which version?
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#14 Опубликовано: 19.03.2018 11:00:56
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

Hello

It is 0.98.6484 but it does not matter. It finally worked.
... As it seems (to work) I have to copy the examples I download directly from the forum into a page of my program.
#15 Опубликовано: 19.03.2018 11:25:45
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Wrote

As it seems (to work) I have to copy the examples I download directly from the forum into a page of my program



It is possible, there were several changes in the worksheet structure since your version, thus something from newer worksheets might confuse your version.... good that it worked within the clipboard

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#16 Опубликовано: 19.03.2018 11:38:50
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

Hello

Finally it worked in this version

FindRoot.jpg
#17 Опубликовано: 19.03.2018 12:17:27
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

ola_nicolas,
Please repost working sheet. I am not getting your solutionsFindRoot(ES).smz (2 КиБ) скачан 36 раз(а).
#18 Опубликовано: 19.03.2018 13:03:40
Nicolae Olaru

Nicolae Olaru

1 сообщений из 115 понравились пользователям.

Группа: User

Hello

Here's the Smath file. The other was an image file.

FindRoot.sm (8 КиБ) скачан 47 раз(а).
#19 Опубликовано: 19.03.2018 13:12:19
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

ola_nicolas,
Please repost working sheet. I am not getting your solutionsFindRoot(ES).smz (2 КиБ) скачан 36 раз(а).



This is a matter of third and fourth parameter of FindRoot() function (numerical precision). The solution will be different if you change them. Just look at the order of magnitude of the solutions. The second and third values are quite close to zero. Therefore, one might expect this behavior.
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
ElSid 19.03.2018 13:59:00
#20 Опубликовано: 19.03.2018 13:28:46
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

For now, I've managed to solve the problem


I don't think so ! Check I recomposed correctly.

GivenFind PossibleBug.sm (235 КиБ) скачан 51 раз(а).


  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений