MATLAB: How to plot the vectors having different length

doit4me

hello, Error using semilogy/plot Vectors must be the same length. how do i plot with different length?

Best Answer

Replace the line
semilogy(f,c_1)
with
semilogy(f(1:numel(c_1)),c_1)