Laser ablation–induced synthesis and nonlinear optical characterization of titanium and cobalt nanoparticles