New things I’ve learned recently
New things I’ve learned recently
I would like to share some things I learned recently.
Ctrl+Shift+Enter
Ctrl+Shift+Enter
I recently learned the keyboard shortcut Ctrl+Shift+Enter. This is an extremely helpful shortcut. Instead of separately evaluating an entity and them clicking to select it and then pressing Ctrl+C to copy it and paste it in an expression with the special formatting, I can just press Ctrl+. to select the entity or entity class or entity property and then press Ctrl+Shift+Enter.
Here are some examples comparing the FullForm to the formatted form:
Entity
Entity
EntityClass
EntityClass
EntityProperty
EntityProperty
Graph
Graph
Image
Image
Quantity
Quantity
QuantityVariable
QuantityVariable
delete missing on multiple levels
delete missing on multiple levels
FormulaData
FormulaData
How to set the background to vector by default
How to set the background to vector by default
FormulaLookup with classes
FormulaLookup with classes
Formula
Formula
Find all formulas that require speed and time:
In[]:=
FormulaLookup[All,All,RequiredPhysicalQuantities->{"Speed","Time"}]
Out[]=
{DrivingDistanceSpeedTime,Projectile,RunningInTheRain,TimeDilationRelativistic,WaterHammerSlow,{AverageSpeed,Positions},{AverageSpeed,Speeds},{AverageSpeed,TotalDistance},{Bicycling,Speed},{CrossCountrySkiing,Speed},{DistanceSpeedTime,ConstantSpeed},{DistanceSpeedTime,InitialPosition},{EllipticalMachine,Speed},{RowingMachine,Speed},{Running,Speed},{SpeedAccelerationTime,DeltaSpeed},{SpeedAccelerationTime,InitialSpeed},{SpeedAccelerationTime,NoInitialSpeed},{StoppingDistance,FixedFrictionCoefficient},{StoppingDistance,FrictionCoefficient},{Swimming,Speed},{Walking,Speed},{AverageSpeed,Speeds,Positions},{DistanceSpeedTime,Acceleration,InitialSpeed},{DistanceSpeedTime,Acceleration,InitialSpeed,InitialPosition},{InclinedPlaneRolling,PureRolling,Slope,MomentOfInertia,SpeedDistance},{InclinedPlaneRolling,PureRolling,Slope,ShapeFactor,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,MomentOfInertia,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,ShapeFactor,SpeedDistance},{InclinedPlaneRolling,PureRolling,Slope,MomentOfInertia,GravitationalAcceleration,SpeedDistance},{InclinedPlaneRolling,PureRolling,Slope,ShapeFactor,GravitationalAcceleration,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,MomentOfInertia,GravitationalAcceleration,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,ShapeFactor,GravitationalAcceleration,SpeedDistance}}
Find all formulas that require distance time and acceleration:
In[]:=
FormulaLookup[All,All,RequiredPhysicalQuantities->{"Acceleration","Time","Distance"}]
Out[]=
{{DistanceSpeedTime,Acceleration},{DistanceSpeedTime,Acceleration,InitialSpeed},{InclinedPlaneRolling,PureRolling,Slope,MomentOfInertia,SpeedDistance},{InclinedPlaneRolling,PureRolling,Slope,ShapeFactor,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,MomentOfInertia,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,ShapeFactor,SpeedDistance},{InclinedPlaneRolling,PureRolling,Slope,MomentOfInertia,GravitationalAcceleration,SpeedDistance},{InclinedPlaneRolling,PureRolling,Slope,ShapeFactor,GravitationalAcceleration,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,MomentOfInertia,GravitationalAcceleration,SpeedDistance},{InclinedPlaneRolling,PureRolling,SlopeAngle,ShapeFactor,GravitationalAcceleration,SpeedDistance}}
Make a dataset of the formulas:
In[]:=
Dataset[AssociationMap[FormulaData][FormulaLookup[All,All,RequiredPhysicalQuantities->{"Acceleration","Time","Distance"}]],DatasetTheme->"Scientific"]
Out[]=
I think it would be neat if you could specify the variables by dimension because you might accidentally miss the name of a physical quantity. For example, there are multiple quantities with the dimension of length ( or or or ) , including height, length, distance, and radius. The following doesn’t work:
0
T
1
L
0
M
0
θ
0
I
0
N
0
J
11×1×1×1×1
1
L
1
L
L
In[]:=
FormulaLookup[All,All,RequiredPhysicalQuantities->{{"LengthUnit",1},{"TimeUnit",1}}]
Out[]=
FormulaLookup[All,All,RequiredPhysicalQuantities{{LengthUnit,1},{TimeUnit,1}}]