Matlab Runtime Library

Matlab Runtime Library - Consists of approximately 400 Matlab math functions - Сообщения

#21 Опубликовано: 24.08.2013 09:37:51
Вячеслав Мезенцев

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

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

Группа: Moderator

Wrote

Wrote

Updated. Now the installer is located within the plugin.


There is an user interaction issue. After updating the plugin and re-starting smath,
the installer dialog pops up and offers installation. You are also informed that you do not need installation if you already have the runtime environment installed. In this case it is natural that the user chooses [Cancel]. Then, however, the dialog pops up every time you launch smath.

If you choose [Install] even if you know that nothing needs to be installed, then suddenly the installer gets aware of that and just finishes and no more messages appear on start-up.


Updated. I think I found a way to do the installation without the use of environment variable path. You can remove the path from the environment variable. Also, you can delete the installation files from c:\MATLAB6p5.
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Martin Kraska 24.08.2013 10:25:00
#22 Опубликовано: 24.08.2013 10:24:53
Martin Kraska

Martin Kraska

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

Группа: Moderator

Works here.

Is there a chance to return scalars if the result matrix has 1x1 size by default (without touching each function separately)? Then we could use all the functions as direct replacement for the standard ones. The drawback would be that these functions cannot handle lists (except if you can recognize that in the plugin and do sys2mat and vice versa.

One could even think of working with any nested structures by flattening them out internally and afterwards restructuring the results according to input.

I guess that unit handling would not be trivial. However, for most special functions this is irrelevant anyways.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#23 Опубликовано: 24.08.2013 11:36:32
Вячеслав Мезенцев

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

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

Группа: Moderator

Wrote

Works here.

Is there a chance to return scalars if the result matrix has 1x1 size by default (without touching each function separately)? Then we could use all the functions as direct replacement for the standard ones.



Updated. Done. As for the rest, I'll think about it.
Russia ☭ forever, Viacheslav N. Mezentsev
2 пользователям понравился этот пост
Davide Carpi 24.08.2013 18:23:00, Martin Kraska 24.08.2013 12:17:00
#24 Опубликовано: 24.08.2013 12:17:01
Martin Kraska

Martin Kraska

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

Группа: Moderator

Great! Thanks a lot. Now all functions can be called with scalar argument and return scalars in that case. Is it sensible to include the mw... names in the doc (some of them are already in it) or can they be expected to change to generic ones in the near future?
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#25 Опубликовано: 24.08.2013 12:27:08
Вячеслав Мезенцев

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

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

Группа: Moderator

I'm not sure, but I think that next year we will not see support for namespaces and function overloading. Andrey is a very busy. Therefore, I recommend to use prefixes in the documentation.

For now we have 49 functions.

Показать спойлер

Russia ☭ forever, Viacheslav N. Mezentsev
3 пользователям понравился этот пост
Davide Carpi 24.08.2013 18:23:00, Martin Kraska 24.08.2013 17:17:00, Radovan Omorjan 25.08.2013 04:22:00
#26 Опубликовано: 24.08.2013 17:16:12
Martin Kraska

Martin Kraska

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

Группа: Moderator

Thanks for the information. If the loss of list processing capability would be the only drawback of just re-defining the internal functions, I would vote for that.

Something went wrong with the diagonal scaling. I can't see such a function.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#27 Опубликовано: 25.08.2013 04:32:19
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Wrote

I'm not sure, but I think that next year we will not see support for namespaces and function overloading. Andrey is a very busy. Therefore, I recommend to use prefixes in the documentation.

For now we have 49 functions.

Показать спойлер


Thank you uni

As I could see in the first post of yours, when you manage to get those functions to work you are updating the plugin - blue starting with mw... (I counted more than 49 at the moment ) and the rest in some green - not working yet. By the way, an insignificant observation about - on ode function in the list, mw... prefix is missing.

If you get most of those functions in the list to work in spite of the mentioned obstacles in SMath (different number of arguments etc.), it would be really something big .

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
#28 Опубликовано: 25.08.2013 05:38:43
Martin Kraska

Martin Kraska

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

Группа: Moderator

The functions mwall() and mwany() do not work correctly.

Also, I recommend to modify the calling syntax.

mwany(M) test if any of the elements in M is nonzero. Corresponds to matlab any(M( : )), where the colon operator flattens the matrix into a vector.

mwany(M,1) or mwany(M,2) do the test along the columns and rows respectively (no change except bug fixing required)

Same for mwall.
mwany.sm (10 КиБ) скачан 101 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 пользователям понравился этот пост
Вячеслав Мезенцев 25.08.2013 05:58:00, Radovan Omorjan 25.08.2013 07:18:00
#29 Опубликовано: 25.08.2013 06:04:51
Вячеслав Мезенцев

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

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

Группа: Moderator

Updated. 83 functions (see log.txt in the plugin folder).
Russia ☭ forever, Viacheslav N. Mezentsev
2 пользователям понравился этот пост
ioan92 25.08.2013 07:00:00, Radovan Omorjan 25.08.2013 07:01:00
#30 Опубликовано: 25.08.2013 07:16:02
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Thank you uni
Wrote

Updated. 83 functions (see log.txt in the plugin folder).


I tried it first and could see that mwbesselx() functions do not work. Then I checked the log.txt file.
This is the end of it

....
8/25/2013 12:35:58 PM [INFO ] [Plugin.Initialize()] Successfully. 83 functions loaded.
8/25/2013 12:39:34 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:39:34 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:39:51 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:39:51 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:39:56 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:39:56 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:41:32 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:41:32 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:41:50 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
8/25/2013 12:41:50 PM [ERROR] [Plugin.NumericEvaluation()] mwbesseli(2) Exception has been thrown by the target of an invocation.
....

No success with mwbetainc() yet as well. I suppose you know all this, just wanted to confirm.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#31 Опубликовано: 25.08.2013 07:35:46
Вячеслав Мезенцев

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

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

Группа: Moderator

Show me log.txt from the \bin\win32\ directory.

[albumimg]286[/albumimg]
Russia ☭ forever, Viacheslav N. Mezentsev
#32 Опубликовано: 25.08.2013 08:29:05
Martin Kraska

Martin Kraska

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

Группа: Moderator

I confirm the problem. The log in bin/win32 says

25.08.2013 14:18:54 [ERROR] [mwbesseli] Failed to load MEX-File : besselmx.
25.08.2013 14:19:00 [ERROR] [mwbesseli] Failed to load MEX-File : besselmx.
25.08.2013 14:19:09 [ERROR] [mwbesselj] Failed to load MEX-File : besselmx.
25.08.2013 14:19:16 [ERROR] [mwbesselj] Failed to load MEX-File : besselmx.
25.08.2013 14:19:20 [ERROR] [mwbesselj] Failed to load MEX-File : besselmx.
25.08.2013 14:20:55 [ERROR] [mwbesseli] Failed to load MEX-File : besselmx.

and I get an error message from SMath (translated)

The program cannot be launched because DFORMD.dll is missing on your computer. Re-install the program to solve the problem.

such a dll is present on my system as part of the ANSYS finite element package.
bessel.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
#33 Опубликовано: 25.08.2013 09:00:05
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

I checked the log.txt file. There is only one message repeating when I call any of the bessel functions

8/25/2013 2:22:55 PM [ERROR] [mwbesseli] Failed to load MEX-File : besselmx.

when I try to use mwbetainc() there is only one message about the first argument

8/25/2013 2:45:00 PM [ERROR] [mwbetainc] X must be in the interval [0,1].

although I used something like this

[MATH=eng]z:range(0,10)[/MATH]

[MATH=eng]mwbetainc(0.5,z,3)=#@#[/MATH]

with the usual error message ...-function is not defined

Regards,
Radovan

[EDIT] I do not have a message about missing dll like Martin
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
#34 Опубликовано: 25.08.2013 09:13:29
Вячеслав Мезенцев

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

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

Группа: Moderator

Updated. Try now. As for mwbetainc(), I don't know yet what's going on.
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Radovan Omorjan 25.08.2013 09:20:00
#35 Опубликовано: 25.08.2013 09:21:39
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Wrote

Updated. Try now. As for mwbetainc(), I don't know yet what's going on.


I can confirm that mwbesselx() functions are working for me . Thank you.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
#36 Опубликовано: 26.08.2013 05:37:51
Вячеслав Мезенцев

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

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

Группа: Moderator

Updated. 112 functions.

Added: mwrand(), mwrandn(), mwsize(), mwconv(), mwconv2(), mwnnz(), mwnonzeos(), mwtrace(), mwconj(), mwxor(), mwtril(), mwtriu(), mwcorrcoef(), mweye(), mwones(), mwzeros(), mwroots(), mwrot90(), mwsum().
Russia ☭ forever, Viacheslav N. Mezentsev
2 пользователям понравился этот пост
Martin Kraska 26.08.2013 09:04:00, Radovan Omorjan 26.08.2013 09:13:00
#37 Опубликовано: 26.08.2013 09:45:32
Martin Kraska

Martin Kraska

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

Группа: Moderator

I am trying to keep up... ;-)

When you assign a matrix generating function to a variable, then this is done symbolically by default in your plugin. Thus, a random matrix looks differently every time it is used. This behaviour is different from Davide's Statistical tools, where numeric evaluation seems to be default.

I guess that symbols with changing contents at every use are somewhat unexpected for the user. Therefore, I would therefore recommend to set evaluation to numeric by default, unless there is something to gain from symbolic evaluation (which I do not see so far, bit I may be wrong).

Edit: There are multiple implications of that SMath symbolics is unaware of scalar or vector properties of operands. Therefore I urgently recommend to suppress symbolic evaluation for (possibly) matrix valued functions. In the second example, replacing mwones() by Ones() solves the problem (mismatch between symbolic and numeric evaluation)

Edit2: To internally apply eval() in every function should help.
ones.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
#38 Опубликовано: 26.08.2013 17:57:17
Martin Kraska

Martin Kraska

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

Группа: Moderator

some functions do not work...

Error message in log file: Argument to xxx must not be complex.
Error message in SMath: function is not defined.

I can't see any complex argument.
Section math boolean matlab.sm (25 КиБ) скачан 104 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
#39 Опубликовано: 27.08.2013 01:00:14
Radovan Omorjan

Radovan Omorjan

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

Группа: Moderator

Confirmed

log.txt from the plugin folder

the last part

....
8/27/2013 6:50:53 AM [INFO ] [Plugin.Initialize()] Successfully. 112 functions loaded.
8/27/2013 6:52:42 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:52:42 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:52:55 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:52:55 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:08 AM [ERROR] [Plugin.NumericEvaluation()] mwand(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:08 AM [ERROR] [Plugin.NumericEvaluation()] mwand(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:13 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:13 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:13 AM [ERROR] [Plugin.NumericEvaluation()] mwand(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:13 AM [ERROR] [Plugin.NumericEvaluation()] mwand(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:19 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:19 AM [ERROR] [Plugin.NumericEvaluation()] mwxor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:48 AM [ERROR] [Plugin.NumericEvaluation()] mwor(2) Exception has been thrown by the target of an invocation.
8/27/2013 6:53:48 AM [ERROR] [Plugin.NumericEvaluation()] mwor(2) Exception has been thrown by the target of an invocation.


log.txt from win32 folder

8/27/2013 6:52:42 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:52:42 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:52:55 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:52:55 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:53:08 AM [ERROR] [mwand] Operands to AND must not be complex.
8/27/2013 6:53:08 AM [ERROR] [mwand] Operands to AND must not be complex.
8/27/2013 6:53:13 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:53:13 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:53:13 AM [ERROR] [mwand] Operands to AND must not be complex.
8/27/2013 6:53:13 AM [ERROR] [mwand] Operands to AND must not be complex.
8/27/2013 6:53:19 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:53:19 AM [ERROR] [mwxor] Operands to AND must not be complex.
8/27/2013 6:53:48 AM [ERROR] [mwor] Operands to OR must not be complex.
8/27/2013 6:53:48 AM [ERROR] [mwor] Operands to OR must not be complex.



Regards,
Radovan



When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
#40 Опубликовано: 27.08.2013 05:09:24
Вячеслав Мезенцев

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

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

Группа: Moderator

Updated. 136 functions.

mwrand(), mvrandn(), mwand(), mwor(), mwnot(), mwxor() - bugs fixed;

[albumimg]287[/albumimg]

As for symbolic simplifications when dealing with matrices, I think that in this case it's a bug. The multiplication operator believes that the second operand returns a scalar, but this is not true.
symbolic simplifications.png
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Davide Carpi 27.08.2013 11:55:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений