Post Reply 
plotting functions but not for return values outside specified range
02-02-2017, 04:56 PM (This post was last modified: 02-07-2017 12:13 PM by n3mmr.)
Post: #1
plotting functions but not for return values outside specified range
I'd like to do a polar plot of the logarithm of expressions, when the logarithm can attain values down to -infinity.

I want to plot only for those values that do not reach too large negative values.

And I want to use the included polar plot app.

A typical example is

R = 40 + 20*log(0.5+0.5*cos(theta))

where I'd like to plot only those values of R that are greater than 0, I e for thetas that keeps the logarithm part above -30 or so.

(The expression shown is the polar plot of an idealised cardioid microphone, plotted in dB relative to the response at 0 degrees, and is a typical example of the plots I want to do)

Is there any way to specify limits for what values to plot, w/o writing a rather complex function encapsulation?
Find all posts by this user
Quote this message in a reply
02-04-2017, 12:55 PM
Post: #2
RE: plotting functions but not for return values outside specified range
try this:

   

-road
Find all posts by this user
Quote this message in a reply
02-04-2017, 05:15 PM
Post: #3
RE: plotting functions but not for return values outside specified range
OK, that is a form of encapsulation, but of an acceptable simplicity.

Can one change plot color dependent on some calculation or plotted value?
Find all posts by this user
Quote this message in a reply
02-05-2017, 12:18 PM
Post: #4
RE: plotting functions but not for return values outside specified range
I don't know of any settings that will allow you to change the plot color based on a calculated value, but you can do that thru programming.

-road
Find all posts by this user
Quote this message in a reply
02-05-2017, 06:23 PM (This post was last modified: 02-05-2017 06:24 PM by Fortin.)
Post: #5
RE: plotting functions but not for return values outside specified range
Sometimes using "" for the undefined value has caused me to have 'unexpected results'. I prefer to use 0/0 or to just remove the default in the piecewise template by using backspace on the last filled square. (a comma at the end of the line will bring the next line back)

Either solution works well, but I think that the one line piecewise template is easier to read.

{R1(Theta) if R1(Theta)>-30
Find all posts by this user
Quote this message in a reply
02-06-2017, 06:27 AM
Post: #6
RE: plotting functions but not for return values outside specified range
Hello,

>Can one change plot color dependent on some calculation or plotted value?

I have no clue if it would work or not, but has someone tried to use a user program for the function calculation and to change the function color programmatically in said program? I would give it a 30% chance of working, but worth a try...

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
02-07-2017, 12:10 PM
Post: #7
RE: plotting functions but not for return values outside specified range
The encapsulation in a call to ifte() works very well.
Find all posts by this user
Quote this message in a reply
Post Reply 




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