How can i reduce the powers of all plotted functions to 0

1 Ansicht (letzte 30 Tage)
Emil Nilsson
Emil Nilsson am 19 Okt. 2019
Bearbeitet: Stephan am 19 Okt. 2019
Let's say I am calculation different functions, which converge to a certain value, depending on a Value - N that I regulate. I want to plot these function in the same graph.
My problem is that the function is based on the determinant of a Matrix, it recieves very big values if i increase my value N. That's why I want to keep the function ratio, but reduce all the powers to 0, showing the relationshow between each function in the same graph.
If I don't change the power to 0, it looks like this for all plotted functions:
N=1-7.png
For the first value I plot it looks like this:
N=1.png
and for the second value I plot, like this:
N = 2.png
and so on...
To sum it up - The problem is that my plotted functions gradially become bigger, when the value of N increases, which, when comparing all of them in the same graph, makes all but one function look like a straight line. This is why I want to change the power of the function, to 0 to match the first graph (N=0) but still keep the ratio of the function.
  2 Kommentare
Guillaume
Guillaume am 19 Okt. 2019
What do you call the power of a function?
Emil Nilsson
Emil Nilsson am 19 Okt. 2019
The power of the functions depend on the determinant value of the Function matrix I calculate. SInce the determinant value quickly rises to very high numbers, given a higher number of N, the functions are not comparable in a graph. Given that, I have not called the power of a function anything, it is simply a recieved value eg. 10^134 in the combined graph, and 10^2 in the first one.
What I want to do, is implement a code that, divides the given values, with its power, eg.
if N = 32 is 10^134, I want to divide all values in that function with 10^134, and if
N = 2 is 10^2, I want to divide all values in that function with 10^2.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Stephan
Stephan am 19 Okt. 2019
Bearbeitet: Stephan am 19 Okt. 2019
one approach using string arrays:
number = exp(100)
a = split(string(sprintf('%e',number)),"e+");
b = double("1e+" + string(a(2)));
result = number/b

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by