Example: A=(0,1,2) now by using rotate keyword Result = rotate(A,180); Result = (2,1,0). But how to do this without keyword ?
"rotate" is used to rotate a picture(matrix) by a given angle in degree with some sort of antialiasing.
Why would you like to program that function yourself and not use the built-in one?
Yes i'm aware of that keyword but how to do without keyword ? or is it possible to see how that "rotate" function program has written in mathcad ?
Yes i'm aware of that keyword but how to do without keyword ?
You haven't answered my question which simply was: WHY?
or is it possible to see how that "rotate" function program has written in mathcad ?
No, not that I would be aware of. The algorithms used in Mathcad are not a secret but are hard coded and so can't not be inspected unless you have access to the source code of the program.
As far as I am aware many algorithms implemented in Mathcad followed the "Numerical Recipes" and the four volumes of "Knuth - The Art of Computer Programming" but I am not sure if this also applies to the algorithms for manipulating bitmaps.
But if you study Books about computer graphics you sure will find various ways and algorithms how to rotate a bitmap picture and implement anti-aliasing.
Searching the net will reveal a lot of possible implementations, too. Some less, some more elaborate.
As one example you may ave a look at https://www.codeproject.com/Articles/12230/Anti-Aliased-Image-Rotation
1. yes got that as you said it's complicated (code)
2. "Yes i'm aware of that keyword but how to do without keyword ?" because it's my task which i have to complete i found it's bit difficult but i refer this post "https://community.ptc.com/t5/PTC-Mathcad/How-to-rotate-matrix-around-specific-index/td-p/29535" but still i could not make it!
The part which rotates the image/matrix is not complicated at all as you can see in my little program "Rotate" in the thread you have linked to. basically its simply a multiplication with a standard 2 x 2 rotation matrix. The routine was written to fit the data structure provided by the original poster and does not work (unchanged) on a picture matrix as the built-in "rotate" command. Furthermore no anti aliasing was implemented which could be the harder part if this is what you are looking for.
ok understand! is it possible to do without "anti aliasing" just can we rotate the image?
Sure. I showed in the thread you linked to how this could be done.