PPL: element-wise operations on Vector - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: PPL: element-wise operations on Vector (/thread-6140.html) PPL: element-wise operations on Vector - Martin Hepperle - 04-25-2016 10:31 AM In the previous firmware I was able to write Code: ``` x := [1, 2, 3, 4, 5]; y := x.^2 * 9.8765;``` which set y to a Vector with the square of each individual element in x. This "dot-operator" Syntax was identical what I use in Matlab or Octave - very compact and convenient. In the April 2016 release this is now flagged as a syntax error and I have to resort to a loop or other relatively ugly means to perform the same type of calculations (e.g. using the Matrix initialization function). Is it correct that this feature was removed? Probably not to recover 8MB of RAM ;-) Martin RE: PPL: element-wise operations on Vector - DrD - 04-25-2016 10:50 AM Which mode [Home] or [CAS]? As shown it works in [CAS], but you need to add a space after the x (before the ".^" ) in [HOME]" x := [1, 2, 3, 4, 5]; y := x .^2 * 9.8765; // x [space] .^2 in [HOME] -Dale- RE: PPL: element-wise operations on Vector - primer - 04-25-2016 12:27 PM (04-25-2016 10:31 AM)Martin Hepperle Wrote:  Is it correct that this feature was removed? Probably not to recover 8MB of RAM ;-) From what I know, 8MB of RAM have been recovered without removing any feature. RE: PPL: element-wise operations on Vector - Tim Wessman - 04-25-2016 03:41 PM (04-25-2016 10:31 AM)Martin Hepperle Wrote:  Is it correct that this feature was removed? Probably not to recover 8MB of RAM ;-) I think it is the space as stated. We will investigate if this is now being flagged on purpose (think 123.*2 - that is rather ambiguous). However, we will investigate it to figure out if this was unintentional. RE: PPL: element-wise operations on Vector - Martin Hepperle - 04-26-2016 07:35 AM (04-25-2016 10:50 AM)DrD Wrote:  Which mode [Home] or [CAS]? As shown it works in [CAS], but you need to add a space after the x (before the ".^" ) in [HOME]" x := [1, 2, 3, 4, 5]; y := x .^2 * 9.8765; // x [space] .^2 in [HOME] -Dale- Thank you for pointing this out, Dale, I have this problem inside a program. Not directly in HOME or CAS expressions. I had simply saved and restored my program which worked in the previous release without the space. I do not think that I was in CAS mode when I ran the program before. At least the behavior should be consistent and documented. I also found that many programs had some gibberish (far east) characters (thanks to Unicode) attached behind the end of the programs after restoring. Of course the programs then failed the "Check". Obviously the length of the file read back was longer than the original length and the content of some read buffer was appended. I used drag and drop in the connectivity toolkit to copy these files from the emulator to the hardware. I had to remove the (one to three) lines manually after restoring the programs. Martin