Complex plotting question

04012018, 10:22 PM
Post: #1




Complex plotting question
When plotting the real and imaginary parts of a complexvalued function, the Prime draws one plot first, then the other. For example, in the Function app:
Code:
This results in the function being evaluated twice for the same input values. Is there a way to plot both parts with one function or otherwise avoid the repetitive calculation? Thanks, John 

04022018, 03:18 AM
Post: #2




RE: Complex plotting question
I don't know if you meant plotting the real values on the x axis and imaginary parts on the y axis?
If so, I would suggest using the Parametric App: X1(T) = RE(function) Y1(T) = IM(function) Let T vary. I am not sure how we can prevent two calculations when there are two calculations. Eddie 

04022018, 03:03 PM
Post: #3




RE: Complex plotting question
No, I meant plotting both parts on the X axis, like this graph . The same equations in the Parametric app produce this other graph, both from the Riemann Zeta Function page on Wikipedia.
In the former case, the Function app has to recompute the same values twice, which is what I'm trying to avoid. 

04022018, 04:42 PM
Post: #4




RE: Complex plotting question
Recomputing twice isn't particularly a concern here, since it is actually going to be evaluated thousands or possibly tens of thousands of times.
I don't think there is a way to avoid it. There is no "caching" of intermediate results like this across different defined functions because the complexity basically costs more then just calculating it. You'd have to lookup that the intermediate results matched, and do quite a bit of checking to make sure nothing funny was going on. I suspect it might end up being slower then just recalculating it. Until we get some sort of a complex support in the plotter, you'll need to split it like this to do what you want I believe. TW Although I work for the HP calculator group, the views and opinions I post here are my own. 

04022018, 08:52 PM
Post: #5




RE: Complex plotting question  
« Next Oldest  Next Newest »

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