MATLAB: How to enter a string input that will later be used in a title

inputstringtitle

Essentially, why does the follow code not work?
data = data(:, 1:2); %Condenses matrix by removing unused columns
Savedata = data; %Saves data before manipulation.
data = data*25.4; %Converts to millimeters
data(1:11, :) = []; %Removes datum set up measurements
N = length(data(:, 1)); %Assigns to N the number of entries in column 1
%If the data is formatted incorrectly (a wrong number of rows), then this code will inform the user of this problem.
if mod(N,3) ~= 0
clc
disp('Clear variables and reload data.')
disp('There is an incorrect number of rows')
return
end
data = data(3:3:N, :); %Removes 'point' information. Now there are only distance measurements (x and y) in the matrix
dat = data;
%Inputs
diename = input('Enter the name of the die: ', 's'); %Name of die for graphical output
nom = input('Enter the nominal value for the separation distance (mm): '); %Allows the user to enter the nominal value of separation.
tol = .00254;
numstd = 5; %Number of standard deviations for outlier removal
.
.%morecode
.
postnomtable(postnomtable==0)=NaN;
figure
pcolor(postnomtable)
colormap(GColorMap); %GColorMap has already been made
colorbar;
title('Figure 2: Cell Separation Distance (mm) - Difference between Nominal and Measured for a DPF Die %s Measured on the OGP', diename)
Here's the error I'm getting:
Enter the name of the die: asdf
Enter the nominal value for the separation distance (mm): .31
Is the skin included in this measurement? n
??? Error using ==> title at 29 Incorrect number of input arguments
Error in ==> title at 23 h = title(gca,varargin{:});
Error in ==> NotRotationandSkin01 at 338 title('Figure 2: Cell Separation Distance (mm) – Difference between Nominal and Measured for a DPF Die %s Measured on the OGP', diename)
>>

Best Answer

The meaning of "Incorrect number of input arguments" seems to be clear: title accepts one string only.
title(sprintf(['Figure 2: Cell Separation Distance (mm) - ', ...
'Difference between Nominal and Measured for ', ...
'a DPF Die %s Measured on the OGP'], diename));
Related Question