MATLAB: How to compare a string variable with a string string comparisonsvariables Hi How to compare string variable with a string? Best Answer Read about strcmp Related SolutionsMATLAB: How to dynamically assign data to a variable Dynamic and variable should really never be in the same sentence :)http://www.mathworks.com/matlabcentral/answers/57445-faq-how-can-i-create-variables-a1-a2-a10-in-a-loop MATLAB: Issues of Sensitive in ‘dir’ function d = dir('*.m');match = strcmpi({d.name}, 'abc.m'); % [EDITED] strcmp*i*Name = d(match).name;Another implementation: FEX: FileRealCase. This adjusts the upper/lower case of the path also. Related QuestionDoes STRMATCH in MATLAB cause an error for a cell array containing a numeric valueHow to use dir in a loop to be dynamicHow to check the numbers of characters of a stringAppending variables from different mat files
Best Answer