Units don't match problem

Units don't match problem - Сообщения

#1 Опубликовано: 06.08.2016 13:09:41
Eduardl

Eduardl

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

Группа: User

Hi everybody, I have a units problems that I can´t solve. Can be a bug?

Units

Here is my file.

Documento1.sm (29 КиБ) скачан 57 раз(а).

Libro2.xlsx (8 КиБ) скачан 49 раз(а).

Thanks in advance

Regards

Eduar
#2 Опубликовано: 06.08.2016 13:42:29
Davide Carpi

Davide Carpi

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

Группа: Moderator

Hello Eduar,

nope, is not a bug; the problem is in your second boolean comparison. You have nested a boolean less or equal in the left argument of a boolean less -> the first returns 0 and 1, then this result is compared with the second argument of the boolean less (and here you were lucky because you got 1 - when you get 0 you can't see the error)

2016-08-06 18_34_31-SMath Studio Desktop - [Documento1.sm].png


You have to use the boolean AND to chain two boolean comparisons

2016-08-06 18_37_51-SMath Studio Desktop - [Documento1.sm_].png


Alternatively it is possible to use the function lelt(3) from the plug-in "Custom Functions"

lelt.gif
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 06.08.2016 13:57:06
Eduardl

Eduardl

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

Группа: User

Thanks Davide, I´ll try it.

And thank you for the plugin.

Regards

Eduar

#4 Опубликовано: 06.08.2016 14:46:02
Eduardl

Eduardl

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

Группа: User

Wrote

Thanks Davide, I´ll try it.

And thank you for the plugin.

Regards

Eduar



Hi Davide, your method works fine. But I still have problems with the resolution of the division.

I don't understand, the result is a vector.

Sorry for the question, I'm a newbie in Smath.

#5 Опубликовано: 07.08.2016 05:25:18
Davide Carpi

Davide Carpi

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

Группа: Moderator

Don't worry; vectorize() is intended to apply to all the vectors' elements functions normally intended to work with scalars without using loops. In your case you have 2 ways:

1) use the loop; in this case vectorize() is not needed, remove it and everything should works

2016-08-07 10_21_27-SMath Studio Desktop - [Documento1.sm_].png

2) use vectorize(); in this case you have to remove all the references to the matrix elements. Note that in your case you have to pre-process or post-process the elements where Mu doesn't meets the requirements

2016-08-07 10_21_37-SMath Studio Desktop - [Documento1.sm_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Eduardl 08.08.2016 15:33:00
#6 Опубликовано: 07.08.2016 08:55:06
Eduardl

Eduardl

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

Группа: User

Wrote

Don't worry; vectorize() is intended to apply to all the vectors' elements functions normally intended to work with scalars without using loops. In your case you have 2 ways:

1) use the loop; in this case vectorize() is not needed, remove it and everything should works

2016-08-07 10_21_27-SMath Studio Desktop - [Documento1.sm_].png

2) use vectorize(); in this case you have to remove all the references to the matrix elements. Note that in your case you have to pre-process or post-process the elements where Mu doesn't meets the requirements

2016-08-07 10_21_37-SMath Studio Desktop - [Documento1.sm_].png



You are right!

Thank you Davide.

I hope I can contribute to the community in the future.

Best regards

Eduar
#7 Опубликовано: 09.08.2016 11:39:29
Jean Giraud

Jean Giraud

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

Группа: User

EduardI,

If you have to select elements in the vectorise,
the Dot function may be the tool... just posted.

Jean
#8 Опубликовано: 09.08.2016 11:44:18
Eduardl

Eduardl

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

Группа: User

Jean, thanks for the tip. I'm learning fast thanks to you guys!



#9 Опубликовано: 10.08.2016 00:36:46
Jean Giraud

Jean Giraud

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

Группа: User

"Jean, thanks for the tip. I'm learning fast thanks to you guys!"
How do you know you are learning fast ? !

This type of indexed construction has many variantes, most useful.
For instance: randomly select reasonable number of data points from
an overpopulated collection to be fitted ...

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