MATLAB: How to delete specific text from multiple cell in a column cellcolumneraseMATLABtext; Hi! I have the following column : 21.15 (cd) 42.12 (cd) 24.45 (cd) ………….. It must show like this, without brackets and text : 21.15 42.12 24.45 ………….. Thanks in advance guys ! Best Answer c = {'21.15 (cd)';... '42.12 (cd)';... '24.45 (cd)'};func = @(x) sscanf(c{x},'%f');Wanted = arrayfun(func,1:numel(c)).' Related SolutionsMATLAB: How to display specific number string Try thisM = [ 25.12 45.13 21 22 23 65.55 45.44 42.66 78.56 45.88 42.66 89.78 88.55 45.55 79.65 45.66 123.45 259.45 21.56 42.53 12.49 21 22 23 25.12 45.13 89.78 88.55 45.55 79.65 45.66 45.44 42.66 78.56 45.88 45.55 79.65 45.66 45.44 42.66 78.56 45.88];tf = ismember(M, [21; 22; 23]);idx = find(diff(tf)>0)+1+(0:12);vals = reshape(M(idx).', [], 1);Result>> valsvals = 21.0000 22.0000 23.0000 65.5500 45.4400 42.6600 78.5600 45.8800 42.6600 89.7800 88.5500 45.5500 79.6500 21.0000 22.0000 23.0000 25.1200 45.1300 89.7800 88.5500 45.5500 79.6500 45.6600 45.4400 42.6600 78.5600 MATLAB: How to generate second order best fit polynomial curve using MATLAB Dan,You can do this using poly2x=[100 200 300 400 500]';y=[200 500 900 1400 2000]';ft = fittype( 'poly2' ); % Set up fittype and options.[fitresult, gof] = fit( x, y, ft ); % Fit model to data.f=@(x) fitresult.p1*x.^2+fitresult.p2*x+fitresult.p3;plot(x,y,x,f(x),'o') Related QuestionDimensions of matrices being concatenated are not consistentHow to only select the last x number of columns when trying to concatenating a matrix using a for loopSystem of Second order order differential Equations referencing the 0th derivativeMean of columns in a cell
Best Answer