replace in a cell array every " with a # in matlab
Here is a sample code that replaces every " with a # in a cell array in MATLAB:
main.m
% define a sample cell arrayinputArray = {'a"b"c', 'd"e"f', 'g"h"i'};
% iterate through each cell in the arrayfori = 1:numel(inputArray)
% get the current cell as a string currentString = inputArray{i};
% replace all " with # currentString = strrep(currentString, '"', '#');
% write the updated string back to the cell array inputArray{i} = currentString;
end% display the modified cell arraydisp(inputArray);