Post Reply 
Apply Elementwise on Matrix
06-07-2024, 08:25 PM
Post: #1
Apply Elementwise on Matrix
Hi Everybody,

before I ask my silly question: a short introduction to myself since this is my first post in this forum. I'm a theoretical physicist by profession and do calculations on compute clusters in my job where fortran, c++ and octave are my workhorses. I'm new to HP Calculators and now a proud owner of an HP Prime G2. My other (old friends) calculators are a TI NSpire and a TI-84.

Now comes the silly question: is there a shortcut to apply a function elementwise on a matrix/vector? Imagine you have a 10D real vector in M1 and want the vector of sines of each entry.

MAKEMAT(SIN(M1(J)),10) //ugly thing solves my problem

What is the shortest form to obtain "SIN(M1)".

Best wishes,
David
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Apply Elementwise on Matrix - NumericDavid - 06-07-2024 08:25 PM
RE: Apply Elementwise on Matrix - komame - 06-08-2024, 05:27 AM



User(s) browsing this thread: 2 Guest(s)