MATLAB: How to display in one variable the max of each one of two arrays arrayMATLAB a=[5 10 15]b=[20 25 30]c= ? Best Answer c = [max(a) max(b)]; Related SolutionsMATLAB: Display contents of cell array and a vector together cell_array = {'A' 'B' 'C'};value = [ 10 20 30];arrayfun(@(x,y) fprintf('%s = %d\n', x{:}, y), cell_array, value);ResultA = 10B = 20C = 30 MATLAB: How to apply for loop for cell arrays a =(1000-0).*rand(10,2)+0[r,c] = size(a)mina = [1 7] ;maxa = [6 10] ;b = cell(numel(mina),1) ;for o = 1:numel(mina) b{o} = a(mina(o): maxa(o),:);endfor k=1:numel(b) bb=b{k}; [r,c]=size(bb); max_a= zeros(r,c); for i = 1:r for j = 1:c max_a(i,j) = max(a(1:i,j)) ; end end max_b{k}=max_aend Related QuestionHow can I get successive maximum value from this codeHow to manipulate arraysSumming up rows of a cell containing 3D matricesHow can prelocate arraysUnfold cell
Best Answer