How do I solve an ode and plot a graph of two terms within the ode
Show older comments

I have to plot gamma dot vs tau
where gamma dot can be defined in the range logspace(-3,3,100)
my attempt at this is as follows:
clc, clearvars, close all
eta0 = 8080;
lambda = 1.109;
gamma = logspace(-3, 3, 100);
f = @(t,tau)(-(tau+eta0*gamma)/lambda);
[t, tau] = ode45(@f,[0.001 1000], 0);
loglog(gammaint,tau,'.')
and ive recieved the error messages as follows:
Undefined function 'f' for input arguments of type 'double'.
Error in odearguments (line 92)
f0 = ode(t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45 (line 104)
odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode,
tspan, y0, options, varargin);
Error in maxwell5 (line 9)
[t, tau] = ode45(@f,[0.001 1000], 0);
What can i do to fix this,
Thanks
1 Comment
Sam Chak
on 17 Nov 2023
Hi @Namit Dayal
What does the differential equation describe in the real world, and what exactly is the shear rate?
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!