Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
First you would determine the position where f(x) intersects with the horizontal.
And then you would just do the same twice using different theta limits..
Changed the approach slightly in the picture as I have added units. It looks like Prime insists on NaN's having attached the appropriate unit, too - not really understandable.
As we use the same procedure now twice for Filla and Fillb, it sure would be a good idea to implement one of the hatch or fill functions from the other thread and using them twice or more.
Currently there are two recent threads here with a quite similar question:
You will find some ideas there and useful functions to shade in different ways.
Here is a very simple and basic method to fill your plot:
Attached the Prime 9 file and it will be the last file I look at with the name "untitled"!
Thank you for your solution, and as you said i did found several similar posts but a bit hard to get into solution.
Also can you suggest any way to give different color to a and b.
First you would determine the position where f(x) intersects with the horizontal.
And then you would just do the same twice using different theta limits..
Changed the approach slightly in the picture as I have added units. It looks like Prime insists on NaN's having attached the appropriate unit, too - not really understandable.
As we use the same procedure now twice for Filla and Fillb, it sure would be a good idea to implement one of the hatch or fill functions from the other thread and using them twice or more.
One last remark:
Maybe a sine approximation is more appropriate than a spline interpolation!?