how to draw signal using different colour

조회 수: 1 (최근 30일)
neamah al-naffakh
neamah al-naffakh 2017년 10월 4일
답변: Katalin 2017년 10월 4일
Hi Guys
Please I have plot the follwing graph.
The graph includes three different signals (i.e. 1, 2, and 3) .
by the way this signal represent the data of the first column of the attached file (Plot_Data.csv)
I’m wondering if we can draw each signal part in different colour!!
For example, black colour for part 1, red colour for part 2, etc.
I have attached the data
Kind Regards.

답변 (1개)

Katalin
Katalin 2017년 10월 4일
Hi,
A simple solution would be to plot the data always partially.
plot(Data(1:N1,1),Data(1:N1,2),Data(N1+1:N2,1),Data(N1+1:N2,2),Data(N2+1:end,1),Data(N2+1:end,2))
Assuming N1 and N2 are your breakpoints and Data first column is X data, and second column is Y data, you can fill in the rest.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by