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

Notification

Icon
Error

Login


3 Pages123>
Options
Go to last post Go to first unread
Offline marks2c  
#1 Posted : 14 April 2022 06:02:44(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
I've another noobie question. I'm hoping to get a 2D matrix/table output for two 1D vector inputs.

Vectorize Question.jpg
20220414 Vectorize Question.sm (53kb) downloaded 13 time(s).

How can this be best done?

Edited by user 14 April 2022 06:09:43(UTC)  | Reason: Cut-n-paste errors...

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

Offline overlord  
#2 Posted : 14 April 2022 11:36:58(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 509 time(s) in 339 post(s)
It can be done by dyadic product or piecewise algorithm calculation.
Notice the transpose symbol in your formula. Needed if both vectors are vertical or horizontal.
I have included both calculations, disabled algorithm calculation in collapsed area.
And since you asked, I have formatted the output with table region.
Check the file and pictures below.

Edit: I screwed up the product and table, corrected it now.

Regards

20220414 Vectorize Question_answer.sm (90kb) downloaded 26 time(s).

2022-04-14_11-31.png

2022-04-14_11-46.png

2022-04-14_11-47.png

Edited by user 14 April 2022 11:49:33(UTC)  | Reason: Not specified

thanks 1 user thanked overlord for this useful post.
on 14/04/2022(UTC)
Offline marks2c  
#3 Posted : 14 April 2022 11:49:21(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
Thank you so much overlord.

BTW: did you spot my evil(ish) dB:=1 declaration? (no SI units were harmed).

Offline overlord  
#4 Posted : 14 April 2022 11:55:13(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: marks2c Go to Quoted Post
Thank you so much overlord.

BTW: did you spot my evil(ish) dB:=1 declaration? (no SI units were harmed).


I did and I didn't bother to correct it.
If you won't propagate "units are evil" I won't object it.
It is your choice. I have corrected the calculation.

It could be done by this way though, with using SI units.

2022-04-14_11-53.png
thanks 1 user thanked overlord for this useful post.
on 14/04/2022(UTC)
Offline marks2c  
#5 Posted : 14 April 2022 12:09:48(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
Originally Posted by: overlord Go to Quoted Post
Originally Posted by: marks2c Go to Quoted Post
Thank you so much overlord.

BTW: did you spot my evil(ish) dB:=1 declaration? (no SI units were harmed).


I did and I didn't bother to correct it.
If you won't propagate "units are evil" I won't object it.
It is your choice. I have corrected the calculation.

It could be done by this way though, with using SI units.

2022-04-14_11-53.png


I certainly am wanting to stick to SI units for all the good reasons.

I will work through this to understand it better. My memory of this is that dB really is unitless, so the 'dB' is likely just a placeholder rather than something referencing the base mks units. I'm keen to know if this assumption I've had for a few decades is incorrect.
Offline overlord  
#6 Posted : 14 April 2022 12:13:39(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: marks2c Go to Quoted Post
I certainly am wanting to stick to SI units for all the good reasons.

I will work through this to understand it better. My memory of this is that dB really is unitless, so the 'dB' is likely just a placeholder rather than something referencing the base mks units. I'm keen to know if this assumption I've had for a few decades is incorrect.

Yeap, dB is unitless. Use what you want.
But embedded units are better to stick with.
Actually, your formula can be reduced to this.
Power of SI units. (swh)

2022-04-14_12-12.png
thanks 1 user thanked overlord for this useful post.
on 14/04/2022(UTC)
Offline marks2c  
#7 Posted : 14 April 2022 12:27:52(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
I'm liking the consistent description position too, thank you. Much better than free floating text.
Offline overlord  
#8 Posted : 14 April 2022 15:37:49(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 509 time(s) in 339 post(s)
Your sample assumes 100V input according to picture.
For that, number of 5000 bothered me and maybe my assumption is wrong.
Is this a possible correct formula with voltage input added?
100V can be changed with a variable by this way.

Regards

2022-04-14_12-52.png
Offline marks2c  
#9 Posted : 14 April 2022 22:33:31(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: marks2c Go to Quoted Post
I've another noobie question. I'm hoping to get a 2D matrix/table output for two 1D vector inputs.

...
At this point, if you have such standard table ... validate.
From standard table, easy to interpolate.
...

Thanks Jean,
An important topic on its own: validation and review. So central to good engineering & metrology. Already done too.

One of the reasons I like SMath is measurement units. The continuous units consistency checking is great.

Without it (units ignored or overridden), it is possible to get the correct (or close to it) numeric answer and be fooled.
Offline overlord  
#10 Posted : 15 April 2022 18:05:52(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: marks2c Go to Quoted Post
One of the reasons I like SMath is measurement units. The continuous units consistency checking is great.

Without it (units ignored or overridden), it is possible to get the correct (or close to it) numeric answer and be fooled.

Of course smath has plotting capabilites, solvers, etc.
But people use smath or mathcad mainly because of units.
And paper-like writing instead of command enviroment.
Otherwise maple, mathematica, matlab or excel would be enough.
Offline marks2c  
#11 Posted : 16 April 2022 06:29:15(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Would you dare telling Control room Operators
super heated steam in °K instead °C from source design ?


Part of being a PE is working out what the question actually is, before working out the answer and how the answer is framed.

Units matter, and can't be ignored, or done wrong.

Imperial measurement units are now metric, but just framed wrongly (aka 'stirring bastard'Wink).

Edited by user 16 April 2022 11:17:17(UTC)  | Reason: Brackets, standards and units.

Offline marks2c  
#12 Posted : 16 April 2022 08:50:44(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
Originally Posted by: overlord Go to Quoted Post
Your sample assumes 100V input according to picture.
For that, number of 5000 bothered me and maybe my assumption is wrong.
Is this a possible correct formula with voltage input added?
100V can be changed with a variable by this way.


Yes, 100V is the standard distribution level pretty much everywhere outside the US of A.

There it is 70V.

It should indeed be variable or constant.

Edited by user 16 April 2022 10:17:38(UTC)  | Reason: Not specified

Offline marks2c  
#13 Posted : 16 April 2022 22:37:40(UTC)
marks2c


Rank: Advanced Member

Groups: Registered
Joined: 01/04/2020(UTC)
Posts: 85
New Zealand
Location: Wellington

Was thanked: 4 time(s) in 3 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
I understand nautical knot


The world standard for aircraft speed is SI units:
ICAO SI Units.png
with knots operating on a 'temporary' exemption.

Two units with the same name, but different meanings are being used by people that need to work together. Ditto for different units for the same thing (height, wind speed, pressure, fuel mass, COG mass calcs, etc). What could possibly go wrong?

Edited by user 16 April 2022 23:02:47(UTC)  | Reason: URL fix

Offline Jean Giraud  
#14 Posted : 18 April 2022 14:25:51(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 981 time(s) in 809 post(s)
... What could possibly go wrong ? More, like cockpit calibration.

NASA_cockpit.PNG
Offline overlord  
#15 Posted : 18 April 2022 16:19:56(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
... What could possibly go wrong ? More, like cockpit calibration.

If you don't know units, how to use them, don't have the capability to understand its importance, even you oppose using units, just as like Jean, everything can go wrong.
And yours is another milestone example of that idiocracy.
Offline Razonar  
#16 Posted : 18 April 2022 19:22:45(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,359
Uruguay

Was thanked: 818 time(s) in 518 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
... What could possibly go wrong ? More, like cockpit calibration.


Most. To begin it is a wrong sign in "15.04+0.11649*h", so it should be "15.04-0.11649*h"

In addition, this resource is not for technical use, it is for "K-12", which in the USA means that it is for elementary and high school children. The image page can be found here:

https://www.grc.nasa.gov/www/k-12/airplane/atmosmet.html

At the bottom in the complete image it can be seen how the author does not care in the least to follow the SI standards of units, using notations as varied and meaningless as "K-Pa" and "cu m"

Finally, if one consults the front page of the project, that is

https://www.grc.nasa.gov/www/k-12/

can be read

"Glenn Learning Technologies Project (LTP)
In 2004 the Glenn LTP was no longer funded."


That is, that project has not been updated for almost two decades.
Offline Jean Giraud  
#17 Posted : 18 April 2022 21:26:39(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 981 time(s) in 809 post(s)
Good catch Alvaro, thanks.
I use OACI instead and Ralph C. data source.
I checked the document I attached in the Forum long time ago: correct.
Cheers ... Jean.
Offline overlord  
#18 Posted : 19 April 2022 01:04:12(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Good catch Alvaro, thanks.
I use OACI instead and Ralph C. data source.
I checked the document I attached in the Forum long time ago: correct.
Cheers ... Jean.

Aaaaand, relation of this info with topic owners questions?
How come subject came to your "nobody cares" samples?
Or your idiotic unitless crusade and incorrect calculations?

Jean, stop hijacking people's topic.
This is not a request by the way, this is a demand.
I am pretty sure you are not wise enough to understand the difference.
This verdict based upon witnessing your past behavior.
Offline loha  
#19 Posted : 19 April 2022 17:20:10(UTC)
loha


Rank: Advanced Member

Groups: Registered
Joined: 13/09/2011(UTC)
Posts: 63
Location: Kolkata

Was thanked: 9 time(s) in 9 post(s)
For me units have 2 purposes:
1. Getting quickly understandable numbers
2. Checking errors (unit consistency)

But sometimes I need to combine unitless numbers with numbers with units. This is when the unit is implicit and I don't want to make the calculations look unnecessary heavy, with units all ober the place, but for some of the inputs (or outputs) I still want units, for clarity... when the standard unit would have too many or too few figures.

This is where Smath is great with the possibility to use any variable as a unit. I even sometimes define units such as "bag" or "bamboo"! And doing that without using an actual "unit" but only a variable, allows to bypass Smath's unit consistency check.

This flexibility is really great. We have "proper" units (in blue) with consistency checking, but we can also have "de facto" units which are just conversion factors (in black), and are optional so they can be used only at places when the standard unit is not convenient, without the need to rewrite everything with units.
Offline loha  
#20 Posted : 19 April 2022 17:38:35(UTC)
loha


Rank: Advanced Member

Groups: Registered
Joined: 13/09/2011(UTC)
Posts: 63
Location: Kolkata

Was thanked: 9 time(s) in 9 post(s)
I love the "kitchen recipe" aspect of Smath and its users. An incredible creativity, no dogmatism. What is fascinating is that despite all the different approaches it is so transmissible, it can be shared so easily!
Users browsing this topic
Guest
3 Pages123>
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.