SMath Studio Forum
»
SMath Studio
»
Questions
»
Vectorize Issue: How to Get 2D Matrix Output?
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 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. 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...
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 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).Edited by user 14 April 2022 11:49:33(UTC)
| Reason: Not specified
|
1 user thanked overlord for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 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).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: marks2c 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.
|
1 user thanked overlord for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 Location: Wellington Was thanked: 4 time(s) in 3 post(s)
|
Originally Posted by: overlord Originally Posted by: marks2c 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. 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: marks2c 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)
|
1 user thanked overlord for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 Location: Wellington Was thanked: 4 time(s) in 3 post(s)
|
Originally Posted by: Jean Giraud Originally Posted by: marks2c 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: marks2c 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 Location: Wellington Was thanked: 4 time(s) in 3 post(s)
|
Originally Posted by: Jean Giraud 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' ). Edited by user 16 April 2022 11:17:17(UTC)
| Reason: Brackets, standards and units.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 Location: Wellington Was thanked: 4 time(s) in 3 post(s)
|
Originally Posted by: overlord 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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 01/04/2020(UTC) Posts: 85 Location: Wellington Was thanked: 4 time(s) in 3 post(s)
|
Originally Posted by: Jean Giraud I understand nautical knot The world standard for aircraft speed is SI units: 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
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... What could possibly go wrong ? More, like cockpit calibration.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: Jean Giraud ... 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,359 Was thanked: 818 time(s) in 518 post(s)
|
Originally Posted by: Jean Giraud ... 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.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 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.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,128 Was thanked: 509 time(s) in 339 post(s)
|
Originally Posted by: Jean Giraud 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.
|
|
|
|
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.
|
|
|
|
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!
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Vectorize Issue: How to Get 2D Matrix Output?
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.