Ok....This is MMA 12.2 -- I've been on this for some days now. Not hardcore time spent, but I've put in quite a few hours and am making no progress now.
It's just a project for myself mostly, but I do intend to actually use it for work-related purposes.
My goal is to populate a nicely formatted 'table','grid' with all the trig functions including the hyperbolics so I can change the angle and have the 'table/grid' update with the results.
I have gone through the documentation, SE, and so on and nothing seems to be working.
One thing I did find out is using "Dataset" gives results in decimals, and "Grid" gives the exact results (as you see in this post), which I don't understand even a little bit, but I do like having both, but that's a question for another day.
I'd just like to be able to make the whole 'table nice looking and formatted well. Be able to make the text (contents of the grid) larger or smaller, change text color, and background color.
What you see is the best I've come up with. It's not horrible, but it's not great either.
Anyone have some ideas, suggestions for this, please?
Thank you....I always learn things when I come in here. There's nothing golden about how I've done the code. I was just trying to put things together to get a result.
Here's the code:
angle = 45;
convert = Pi/180;
data = {
{"\[Theta]", angle},
{"Sin[\[Theta]] ", Sin[angle*convert]},
{"Cos[\[Theta]] ", Cos[angle*convert]},
{"Tan[\[Theta]] ", Tan[angle*convert]},
{"Csc[\[Theta]] ", Csc[angle*convert]},
{"Sec[\[Theta]] ", Sec[angle*convert]},
{"Cot[\[Theta]] ", Cot[angle*convert]}
};
Grid[data, Alignment -> Center, Spacings -> {2, 2}, Dividers -> All,
ItemSize -> 12, ItemStyle -> Blue,
Background -> {{LightPink, LightGray}}]
N
? That turns exact numbers into inexact numerical values. 2) you don't need to multiply byconvert
- a constant you've defined yourself - you could writeangle Degree
instead $\endgroup$FrameStyle -> Directive[GrayLevel[.5], Thick]
. For the text size and colour, tryItemSize -> 12, ItemStyle -> Directive[Purple, FontSize -> 18, FontWeight -> Bold]
$\endgroup$Manipulate
that lets you change the angle! $\endgroup$