How to plot the function f(x)=x^3 - 4x^2 +1 for x∈[0,25]
How to format scientific notation to use "... x 10^..." instead of "...e..."
f(x) = e^x-3x matlab code
I need help. How do I write this function in MatLab?
Does e stand for euler's number? But it still says that my y1 value is incorrect...
Hello, for my second semester of uni we are required to learn some basics of MATLAB and utilize it in calculus and other applied mathematics.
I have been trying for the past hours to understand how plot, fplot and plotting functions in general work. I need to plot these 2 functions:
y1 = (2*(x.^2)+x)./(x+3).^4;
y2 = (3*x-x.^3)./(x-5).^4;
I have been struggling hard to understand how to have both functions in the same plot, it keeps either not working at all, looking weird, or I can only get one function to show up. I have looked at the guide my school gives me, online resources and other stuff and I can not for my life figure this simple thing out. Heres my code if anyone interested, its a mix of things I found in guides that I was praying would work for me
x = linspace(-20, 20);
x(x == -3) = []; % Exclude x = -3
y1 = (2*(x.^2)+x)./(x+3).^4;
y2 = (3*x-x.^3)./(x-5).^4;
fplot(y1);
hold on
fplot(y2);
hold off
axis on;
grid on;
ylim([-10, 10]) %