Asked by Silpa K
on 15 Sep 2019

Hi, I have a set A that contain 200 points and a subset of the set B.I need to graph the A and I need to mark the points in the set B in A.I can't mark those points correctly.Please help me.

Answer by Walter Roberson
on 16 Sep 2019

Accepted Answer

d = xlsread('FaceFour_TRAIN.xlsx');

plot(d);

hold on

idx = find(d>0.04);

pointsize = 20;

scatter(idx, d(idx), pointsize, 'b', '*')

hold off

Silpa K
on 18 Sep 2019

I need to plot the s.In the graph of s the max need to mark.The max is from the secidx

s = d(1:1,2:end);

fa = movstd(s,20,1);

secarray = movstd(fa,20,1) ;

secidx = find(secarray>.04);

Walter Roberson
on 18 Sep 2019

s = d(1:1,2:end);

fa = movstd(s,20,1);

secarray = movstd(fa,20,1) ;

secidx = find(secarray>.04);

f = secarray(secidx);

[maxvals, maxidx] = maxk(f,10);

sidx = secidx(maxidx);

x = 1:length(s);

plot(x, s, 'b-', sidx, s(sidx), 'go')

Silpa K
on 18 Sep 2019

thank you very much sir.

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 3 Comments

## dpb (view profile)

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/480460-plotting-graph-and-mark-points#comment_746137

## dpb (view profile)

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/480460-plotting-graph-and-mark-points#comment_746151

## dpb (view profile)

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/480460-plotting-graph-and-mark-points#comment_746152

Sign in to comment.