Greetings
when i run this comman
plot(t_010_tbc_r_002,stress_010_01,'-o','MarkerIndices',1:10:length(stress_010_01))
it gives me this error
Error using plot
There is no MarkerIndices property on the Line class.
Error in Results (line 194)
plot(t_010_tbc_r_002,stress_010_01,'--o','MarkerIndices',1:10:length(stress_010_01))
reasons???

댓글 수: 2

It does not seems to be wrong.
Run the following code and see if it works fine:
x = linspace(0,10);
y = sin(x);
plot(x,y,'-o','MarkerIndices',1:5:length(y))
Tahir Afareen
Tahir Afareen 2019년 11월 18일
same error
Error using plot
There is no MarkerIndices property on the Line class.
Error in New_Curve_02 (line 3)
plot(x,y,'-o','MarkerIndices',1:5:length(y))

댓글을 달려면 로그인하십시오.

 채택된 답변

Star Strider
Star Strider 2019년 11월 18일

1 개 추천

The MarkerIndices name-value pair is relatively new.
If you do not have it, it is straightforward to do that with a second plot call:
figure
plot(t_010_tbc_r_002,stress_010_01,'-b')
hold on
plot(t_010_tbc_r_002(idx),stress_010_01(idx),'ob')
hold off
Experiment to get different results.

댓글 수: 2

Thank you very much Star Strider. It works.
figure
plot(t_010_tbc_r_002,stress_010_01,'-b')
hold on
plot(t_010_tbc_r_002(1:10:length(t_010_tbc_r_002)),stress_010_01(1:10:length(stress_010_01)),'ob')
hold off
Star Strider
Star Strider 2019년 11월 18일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

the cyclist
the cyclist 2019년 11월 18일
편집: Steven Lord 2023년 10월 25일

1 개 추천

The marker indices functionality was introduced in version R2016b. If you have an older version, then you'll get an error.
You can find a suggested work-around in this question.
[SL: fixed typo in version number]

댓글 수: 1

Tahir Afareen
Tahir Afareen 2019년 11월 18일
Thankyou for pointing that out.
Found the reason, I am using R2016a

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

제품

릴리스

R2016a

질문:

2019년 11월 18일

편집:

2023년 10월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by