Message Boards Message Boards


Avoid a syntax error while calculating jet velocities?

Posted 5 months ago
3 Replies
0 Total Likes

I keep receiving this syntax error. Anyone have an idea as to why?


3 Replies

WolframLanguage has a units framework! Try e.g.:

c = EntityValue[Entity["PhysicalConstant", "SpeedOfLight"], "Value"];
speedF35 = Quantity[1200, "Miles"/"Hours"];

Maybe there are some more problems with your code, but I cannot try, because you posted just a picture of code.

gamma[beta_] := 1/Sqrt[1 - beta^2]
c = 299792458 ; (*speed of light, m/s*)
Mile = 1600 ;(*Meter*)
Hour = 3600 ;(*Second*)
speedF35 = 1200.*Mile/Hour;
betaF35 = speedF35/c;
gammaF35 = gamma[betaF35];
SetOptions[SelectedNotebook[], PrintPrecision -> 30]
Print["Speed of F35 = ", speedF35, " m/s"]
Print["beta of F35 = ", betaF35]
Print["Lorentz factor of F35 = ", gammaF35]

Speed of F35 = 533.3333333333333 m/s

beta of F35 = 1.7790085077234774*10^-6

Lorentz factor of F35 = 1.0000000000015825

Please post actual code rather than images thereof (can use the image to show the error message). Also indicate what you have tried in order to debug the problem.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract