MATLAB: Inserting Variable NAME into plot title

stringtitle

I have created a function [fluence] = fluence_calc(target, bkgrd,t). In the title, I would like to be able to display the user's selection for the target variable and the bkgrd variable. For example: Let's say target is the variable mu_fat and bkgrd is the variable mu_oil. How can I get mu_fat and mu_oil displayed in the title?
Thank you!

Best Answer

use inputname()