# Result from NDSolve will not plot [closed]

Greg1[tmax_, k_, R_, J_, m_, θ0_, ω0_] :=
NDSolveValue[
{\!$$TraditionalForm\$$ (J + m*R)*θ''[t] == -(1/4)*k*R*θ[t],
θ[0] == θ0, θ'[0] == ω0},
θ, {t, 0, tmax}]
sol1 = Greg1[10, 800, 0.5, 20, 100, π/16, 0];
Plot[sol[t], {t, 0, 10},
AxesLabel -> {"t", "θ(t)"},
PlotStyle -> Thick,
PlotRange -> All]


I tried to plot NDSolveValue, but it said there is no numerical value at t == 0. How can I fix it?

## closed as off-topic by m_goldberg, Chris K, xzczd, Henrik Schumacher, LCarvalhoDec 3 '17 at 17:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – m_goldberg, Chris K, xzczd, Henrik Schumacher, LCarvalho
If this question can be reworded to fit the rules in the help center, please edit the question.

• welcome. Please post code in copyable form so folks can run it to see whats going on. – george2079 Dec 2 '17 at 1:51
• How can I post in copyable form? – Gregory Han Dec 2 '17 at 1:52
• just copy paste from mathematica to the browser. – george2079 Dec 2 '17 at 1:54
• Do Clear["Global*"] and try again. You have lingering definitions. – Carl Woll Dec 2 '17 at 2:00
• Where do I have to clear? – Gregory Han Dec 2 '17 at 2:03

You have the bad formatting wrapper TradionalForm in your definition of Greg1. Get rid of it by converting the cell to Raw Input Form and deleting the Null you see there. Then it will work.
Greg1[tmax_, k_, R_, J_, m_, θ0_, ω0_] :=