How to compare 2 Boolean Stairs graph
조회 수: 6(최근 30일)
표시 이전 댓글
Victor Marjot 2021년 3월 18일
댓글: Victor Marjot 2021년 4월 13일
I'm working on functions returning boolean values.
Using a script I would like to compare to stairs graph :
Here is how I create the stairs graphs, with t1 and t2 the time, stored in vectors. v1 and v2 the values at the given times, also in vector format :
f1 = stairs(t1,v1)
f2 = stairs(t2,v2)
My goal is to plot a new stair graph where the value is equal to :
- 1 when both stairs graph are equal at the same time,
- 0 when the graph are different.
Thank you in advance.
댓글 수: 0
ANKUR KUMAR 2021년 3월 19일
A = randi([0 1], 1,10);
B = randi([0 1], 1,10);
댓글 수: 1
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!