How to plot the following function? I need x range of [0; 1].
syms y(x)
y(x) = dsolve(diff(y,x) == tan(x), y(0) == 1);
plot(y, [0 1]);
How to plot the following function? I need x range of [0; 1].
syms y(x)
y(x) = dsolve(diff(y,x) == tan(x), y(0) == 1);
plot(y, [0 1]);
Copyright © 2021 Jogjafile Inc.
The error message that you get is:
This exactly tells what the problem is.
yis not numeric data here. Rather it is a symbolic function. You need to evaluateyat the required points and then plot it.Fixed Code:
Output: