Custom Functions plugin

Custom Functions plugin - functions: extended Max and Min, Unit of Measurement, Order of Magnitude - Сообщения

#21 Опубликовано: 10.02.2013 13:25:48
Martin Kraska

Martin Kraska

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

Группа: Moderator

I guess the problem is that in the example the variable V is not just a system but an expression involving systems. There was a sys2mat version with just replacing the "sys" in the string representation (num2str) by "mat". In the given case, this approach would fail.

Perhaps the function sys2mat should internally apply eval() and then do the replacement.

Martin
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#22 Опубликовано: 11.02.2013 18:11:20
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED

- fixed issue of sys2mat() involving sys() special features (many thanks to [userlink]mkraska[/userlink])


best regards,

w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Martin Kraska 12.02.2013 17:55:00
#23 Опубликовано: 17.02.2013 07:40:28
Martin Kraska

Martin Kraska

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

Группа: Moderator

The mat2sys function seems to be limited to column matrices. This might be a feature rather than a bug. In the first case I would recommend to be more specific in the doc string ("Converts column matrices (vectors) to systems" ). Alternatively, the linear indexing feature could be used to flatten the matrix.
mat2sys.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Radovan Omorjan 17.02.2013 07:59:00
#24 Опубликовано: 17.02.2013 14:45:16
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

The mat2sys function seems to be limited to column matrices. This might be a feature rather than a bug. In the first case I would recommend to be more specific in the doc string ("Converts column matrices (vectors) to systems" ). Alternatively, the linear indexing feature could be used to flatten the matrix.



Hi Martin

Yes, actually mat2sys function is limited to column matrices (the function brutally changes "sys(" to "mat(", without checks).

An improvement will be available ASAP.


best regards,

w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Martin Kraska 18.02.2013 05:58:00
#25 Опубликовано: 20.02.2013 11:56:19
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED

- mat2sys() now can handle also non-column matrices (nested or not)
- sys2mat() symbolical enhancements


regards,

w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
sergio 21.02.2013 06:44:00
#26 Опубликовано: 15.03.2013 07:05:31
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED

  • added new texts functions:
    • strtolower(1): converts all characters in a string to lowercase;
    • strtoupper(1): converts all characters in a string to uppercase;
    • ucfirst(1): converts the first characters in a string to uppercase;
    • ucwords(1): converts the first characters of each word in a string to uppercase;
    all functions works both with texts or texts nested in arrays/systems;

  • added norme(): unofficial patch of SMath Studio norme() function (BUG shown here);

  • sys2mat(): fixed unexpected influence on input arguments.


Plugin's Sources are moved to the SVN repository (I have added a link in the first post)


regards,

w3b5urf3r
SMath Studio - [customFunctions_examples.sm].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
3 пользователям понравился этот пост
Martin Kraska 16.03.2013 15:24:00, sergio 15.03.2013 09:36:00, Radovan Omorjan 16.03.2013 03:19:00
#27 Опубликовано: 16.03.2013 15:59:58
Martin Kraska

Martin Kraska

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

Группа: Moderator

Hi Davide,

thanks for the update. I added the functions to the function reference in the handbook and also added a section on string functions.

The norme replacement is highly welcome. I just had a small problem, see attachment.

Just in case you are looking for distraction from real stuff like unit and systems proof solvers:
I'd vote for unit-proof versions of int(), Re() and Im() and arg().

Martin
norme.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#28 Опубликовано: 16.03.2013 16:17:55
Davide Carpi

Davide Carpi

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

Группа: Moderator

Thank you Martin;

the issue is related with some SMath bug involving transpose and the linear indexing feature ... Tomorrow I'll look in the bug section to see if it has already been reported and I'll update the plugin with your formula
SMath Studio - [bug.sm].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#29 Опубликовано: 17.03.2013 07:40:20
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED

- fixed norme() issue involving transpose and the linear indexing feature;
- enhancements of ucwords(): now accept all Unicode white spaces as separator of words.


best regards,

w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Martin Kraska 17.03.2013 19:50:00
#30 Опубликовано: 16.04.2013 09:58:33
sublim21

sublim21

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

Группа: User

Great job websurfer!

Would it be possible to change mat2sys such that it doesn't collapse nested matrices?

Please see attached
sys2mat_suggestion.sm (5 КиБ) скачан 82 раз(а).
#31 Опубликовано: 16.04.2013 11:14:06
Martin Kraska

Martin Kraska

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

Группа: Moderator

Wrote


Would it be possible to change sys2mat such that it doesn't collapse nested matrices?



That won't work as list nesting is not persistent:
[MATH lang=ENG]sys(sys(1,2,2,1),3,2,1)=sys(1,2,3,3,1)[/MATH]
mat2sys could, however, have an option to restrict the conversion to the outer level matrix and leave all entries as they are.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#32 Опубликовано: 16.04.2013 11:35:06
sublim21

sublim21

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

Группа: User

mkraska, you're right. sys2mat was a typo. Thanks!
#33 Опубликовано: 23.04.2013 04:31:11
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED

- fixed norme issue with 1x1 matrices
- UoM now get the units element-by-element from any matrix/system (nested or not)


best regards,

w3b5urf3r
SMath Studio - [UoM].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#34 Опубликовано: 23.04.2013 10:54:12
Martin Kraska

Martin Kraska

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

Группа: Moderator

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#35 Опубликовано: 04.06.2013 02:46:56
Davide Carpi

Davide Carpi

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

Группа: Moderator

A Nightly update for anyone are using SMath Studio 0.96.4902 (plugins -> online gallery)

- removed norme clone (not needed anymore)

- added not recursive [MATH eng]mat2sys.1(#)[/MATH]

- added not recursive [MATH eng]sys2mat.1(#)[/MATH]


best regards,

w3b5urf3r
customFunctions_examples.zip (4 КиБ) скачан 82 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Radovan Omorjan 04.06.2013 03:05:00
#36 Опубликовано: 27.12.2013 09:29:52
Martin Kraska

Martin Kraska

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

Группа: Moderator

mat2sys requires the argument to be literal matrices. Matrix-valued expressions need to be evaluated first either by assigning them to a variable or by wrapping them in eval(). A similar issue has been reported for sys2mat and has been solved.

I propose to transfer the solution to mat2sys.
mat2sys.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Davide Carpi 27.12.2013 20:24:00
#37 Опубликовано: 01.03.2014 12:12:08
Davide Carpi

Davide Carpi

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

Группа: Moderator

UPDATED

- new function: InterpBilinear()
- new function: GetType()
- mat2sys() improvements for 1x1 matrices

(examples attached in the first post)
2014-03-01 17_13_27-SMath Studio Desktop - [CustomFunctions_examples.sm_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 пользователям понравился этот пост
ioan92 01.03.2014 15:59:00, Mike Kaganski 01.03.2014 18:23:00
#38 Опубликовано: 22.06.2014 18:42:25
Davide Carpi

Davide Carpi

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

Группа: Moderator

PLUGIN UPDATED

- added strsplit("string","delimiter" )


Best regards,

Davide
Screenshot_1.png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
ioan92 23.06.2014 06:21:00
#39 Опубликовано: 23.06.2014 04:17:53
Вячеслав Мезенцев

Вячеслав Мезенцев

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

Группа: Moderator

Davide, try string.Join().
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Davide Carpi 23.06.2014 04:57:00
#40 Опубликовано: 23.06.2014 05:37:48
Davide Carpi

Davide Carpi

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

Группа: Moderator

Thank you Viacheslav

Done: added strjoin(2)


Best regards,

Davide
Screenshot_3.png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 пользователям понравился этот пост
ioan92 23.06.2014 06:20:00, Вячеслав Мезенцев 23.06.2014 05:40:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений