Assign unit to a matrix element within a foor loop

Assign unit to a matrix element within a foor loop - Assign unit to a matrix element within a foor loop - Сообщения

#1 Опубликовано: 10.06.2022 10:52:21
kratikus

kratikus

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

Группа: User

Hi all,

This is my first post in here.
I was wondering whether it is possible to change the unit of a matrix element within a for loop.
Here is a small example:
Example

I would like to change for example the Current and Power unity to mA and mW respectively.

Thanks in advance
#2 Опубликовано: 10.06.2022 11:51:27
sergio

sergio

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

Группа: User

Watch this discussion (Razonar provided good suggestions)

https://en.smath.com/forum/yaf_postst18903_Units-not-simplified-in-Matrices.aspx

sergio
#3 Опубликовано: 10.06.2022 18:44:50
overlord

overlord

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

Группа: Moderator

Subjectively better looking version for Razonar's example.
Not very practical though, need to re-write for every new units.
I think this should be a feature, using a matrix units for matrix output.

This is how I wrote a pseudo 'matrix looking like' variable.

'\005B\ohm\0020\mA\0020\μV\005D\

Rest is copy paste to place holders.

Regards

matrixunits.sm (3 КиБ) скачан 33 раз(а).

2022-06-11_00-42.png
2 пользователям понравился этот пост
Martin Kraska 11.06.2022 04:18:00, sergio 11.06.2022 05:22:00
#4 Опубликовано: 11.06.2022 04:18:53
Martin Kraska

Martin Kraska

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

Группа: Moderator

Very smart use of multiplicative split of result display!
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#5 Опубликовано: 11.06.2022 07:55:17
overlord

overlord

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

Группа: Moderator

I don't know if example below is posted before.
You can create multiline named variables too.
Same logic with post I wrote matrixed units.
Copy text below and paste into smath.

This\0020\is\0020\a\000A\multiline\000A\variable:10^3

2022-06-11_13-54.png
1 пользователям понравился этот пост
sergio 11.06.2022 15:02:00
#6 Опубликовано: 11.06.2022 09:34:30
Jean Giraud

Jean Giraud

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

Группа: User

You can make it algo style for in-situ command line.

Electric(V,R).PNG
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений