Vectorize Issue: How to Get 2D Matrix Output?

Vectorize Issue: How to Get 2D Matrix Output? - Сообщения

#1 Опубликовано: 14.04.2022 00:02:44
Mark R Harris

Mark R Harris

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

Группа: User

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 (52 КиБ) скачан 39 раз(а).

How can this be best done?
#2 Опубликовано: 14.04.2022 05:36:58
overlord

overlord

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

Группа: Moderator

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 (89 КиБ) скачан 54 раз(а).

2022-04-14_11-31.png

2022-04-14_11-46.png

2022-04-14_11-47.png
1 пользователям понравился этот пост
Mark R Harris 14.04.2022 05:48:00
#3 Опубликовано: 14.04.2022 05:49:21
Mark R Harris

Mark R Harris

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

Группа: User

Thank you so much overlord.

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

#4 Опубликовано: 14.04.2022 05:55:13
overlord

overlord

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

Группа: Moderator

Wrote

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
1 пользователям понравился этот пост
Mark R Harris 14.04.2022 06:18:00
#5 Опубликовано: 14.04.2022 06:09:48
Mark R Harris

Mark R Harris

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

Группа: User

Wrote

Wrote

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.
#6 Опубликовано: 14.04.2022 06:13:39
overlord

overlord

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

Группа: Moderator

Wrote

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
1 пользователям понравился этот пост
Mark R Harris 14.04.2022 06:15:00
#7 Опубликовано: 14.04.2022 06:27:52
Mark R Harris

Mark R Harris

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

Группа: User

I'm liking the consistent description position too, thank you. Much better than free floating text.
#8 Опубликовано: 14.04.2022 09:37:49
overlord

overlord

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

Группа: Moderator

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
#9 Опубликовано: 14.04.2022 16:33:31
Mark R Harris

Mark R Harris

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

Группа: User

Wrote

Wrote

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.
#10 Опубликовано: 15.04.2022 12:05:52
overlord

overlord

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

Группа: Moderator

Wrote

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.
#11 Опубликовано: 16.04.2022 00:29:15
Mark R Harris

Mark R Harris

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

Группа: User

Wrote

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')).
#12 Опубликовано: 16.04.2022 02:50:44
Mark R Harris

Mark R Harris

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

Группа: User

Wrote

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.
#13 Опубликовано: 16.04.2022 16:37:40
Mark R Harris

Mark R Harris

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

Группа: User

Wrote

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?
#14 Опубликовано: 18.04.2022 08:25:51
Jean Giraud

Jean Giraud

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

Группа: User

... What could possibly go wrong ? More, like cockpit calibration.

NASA_cockpit.PNG
#15 Опубликовано: 18.04.2022 10:19:56
overlord

overlord

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

Группа: Moderator

Wrote

... 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.
#16 Опубликовано: 18.04.2022 13:22:45
Alvaro Diaz Falconi

Alvaro Diaz Falconi

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

Группа: User

Wrote

... 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.
#17 Опубликовано: 18.04.2022 15:26:39
Jean Giraud

Jean Giraud

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

Группа: User

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.
#18 Опубликовано: 18.04.2022 19:04:12
overlord

overlord

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

Группа: Moderator

Wrote

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.
#19 Опубликовано: 19.04.2022 11:20:10
Laurent Fournier

Laurent Fournier

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

Группа: User

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.
#20 Опубликовано: 19.04.2022 11:38:35
Laurent Fournier

Laurent Fournier

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

Группа: User

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!
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений