Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline kratikus  
#1 Posted : 10 June 2022 16:52:21(UTC)
kratikus

Rank: Newbie

Groups: Registered
Joined: 10/06/2022(UTC)
Posts: 1

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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline PompelmoTell  
#2 Posted : 10 June 2022 17:51:27(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 318
Man
Italy
Location: italy

Was thanked: 109 time(s) in 93 post(s)
Watch this discussion (Razonar provided good suggestions)

https://en.smath.com/forum/yaf_p...plified-in-Matrices.aspx

sergio
Offline overlord  
#3 Posted : 11 June 2022 00:44:50(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,125
Turkey

Was thanked: 506 time(s) in 337 post(s)
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 (4kb) downloaded 11 time(s).

2022-06-11_00-42.png
thanks 2 users thanked overlord for this useful post.
on 11/06/2022(UTC),  on 11/06/2022(UTC)
Offline mkraska  
#4 Posted : 11 June 2022 10:18:53(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Very smart use of multiplicative split of result display!
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline overlord  
#5 Posted : 11 June 2022 13:55:17(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,125
Turkey

Was thanked: 506 time(s) in 337 post(s)
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
thanks 1 user thanked overlord for this useful post.
on 11/06/2022(UTC)
Offline Jean Giraud  
#6 Posted : 11 June 2022 15:34:30(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
You can make it algo style for in-situ command line.

Electric(V,R).PNG
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.