Advertisement
STANAANDREY

func to apply func mat

Feb 24th, 2023
1,113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.09 KB | None | 0 0
  1. cb=@(x)(x^3);
  2. r = applyfn(5, cb);
  3. disp(r)
  4.  
  5. function r = applyfn(x, f)
  6.     r = f(x);
  7. end
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement