Nov-11-2017, 07:41 AM
I have an equation I need to plot which generates correctly in another program but not in Python. The equation used in the other program is
And My Code in python is
syms u; %logarithmic variable V1 = %Equation xaxis = logspace(0,4); %makes logarithmic points, until 10E4 yaxis = double(subs(V1,u,xaxis)); %changes values by substituting(((((Not Actually in Python))))
And My Code in python is
import numpy as np import matplotlib.pyplot as plt plt.clf() w = np.linspace(0, 10E4, 10E4) f1=#eqn plt.plot(w, f1) axes = plt.gca() axes.set_xscale('log') axes.set_yscale('log') axes.set_xlim([0, 10E4]) axes.set_ylim([0, 10E4]) plt.show()The problem I am having is the substitution, in the first program it does a substitution in the equation but my python program does not do so and is generating a wrong graph.