clear;
clc;
Get rid of these. As written your file is a script file with local functions, and the only code that is executed when you run this script are these two lines. If you start your file with the "function calculate" line, it becomes a function file and calling it will call the calculate function.
function calculate
If you want your calculate function to return anything you need to define it to return something. As written calculate takes no input arguments and returns no output arguments. See this documentation page for how to define a function to return one or more output arguments.
k=1007.564; %stiffness (N/m)
m=98.668; %mass (kg)
F_0=108.764; %applied force magnitude (N)
x_0=-0.02; %initial displacement (m)
v_0=0.1; %initial velocity (m/s)
t=4.54; %time (s)
x_1=0.0386; %displacement (m)
om_n=sqrt(k/m);
f_0=F_0/m;
x=0; %omega
%calling function
bisection(@f);
bisection accepts one input argument and returns no output arguments. You need to define it to return an output then call it to assign that output to something in order to get it to work the way you described wanting it to work.
I snipped the rest of the code because I didn't see anything at a quick glance that needed modification. [There was at least one typo in the comments, but that doesn't affect the results of the code.]
