Calculating data points on a graph

AI Thread Summary
To adjust the height of a graph while preserving its shape, one approach is to calculate new data points based on a desired peak value. Users discussed the need for a program that can automatically generate these values for each millisecond interval, allowing for changes in both peak height and graph duration. Suggestions included using a scaling factor based on the maximum value of the original data points and multiplying by the ratio of the desired peak to the maximum. The discussion also touched on the use of alpha functions to model the rise and fall of the graph, though concerns were raised about the practicality of creating new functions for each adjustment. Ultimately, a method to dynamically adjust the graph based on user-defined parameters is sought.
Undernet
Messages
3
Reaction score
0
http://www.clearandblue.com/graph.GIF


I have a graph shown above however I want to adjust the height of the graph (where it reaches -70 @ 20ms) whilst still preserving the general shape of the graph. The problem is that I need to know the values of the data points at every 1ms interval (each square represents 20ms).

Does anybody have any idea of how I would calculate the values? For example if I decided that the peak would be at -80 instead of -70 @ 20ms then it would change all the other data points, but how do I calculate what the new values of the data points for each millisecond?

Is there some equation or graph program that can do this?

I hope I am making sense here, my math skills are pathetic.

Thanks
 
Last edited by a moderator:
Mathematics news on Phys.org
You could just relabel the axis, and leave the actual graph alone.
 
Yea normally you could do that but this graph is being represented in a computer program, the picture is just for illustration. The graph in the computer is stored in an array with 140 slots; each slot representing 1ms which would hold one of the data point values.
 
If you just multiply all the values by 8/7 it should work.
 
Quote>"If you just multiply all the values by 8/7 it should work."

Yes that could work but that's for one specific peak.

I need a way of simply giving my program the value of the desired peak of the graph and the program should go and generate all the data values for each ms, that would, if mapped onto a visible graph draw a graph that is the same shape as my example graph but with the peak at the specified value.

I also need to do the same sort of thing with the time too, by specifying the length of the graph to the program and the program should generate the data points that would, if mapped onto a visible graph, draw a graph that has the same shape as my example but with the length being at the specified time. On my example, the graph ends at 140ms but I would like to give the program a value and it should extend the graph to the desired value whilst still preserving the general shape of the graph.

I looked into using something called alpha functions, by having one function for the raise from the base to the peak and another from the fall from the peak to the base. However I don’t know how to modify the functions so it draws a graph that reaches the desired peak and time scale automatically just by giving the desired peak and duration. I have to create a whole new alpha function for each desired peak and duration at the moment which is not practical since the peak could be in the range of 100 different values, the same goes for duration too.

Thanks
 
Well, can this program find the maximum value out of a finite set of values (like Max(1, 4, 2, 7, 4, 2) = 7)? If so, then just find the max, and multiply each point by desiredvalue/max.
 
Thread 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Back
Top