Drastic Sum algorithm to fuzzy logic set

3 ビュー (過去 30 日間)
Hugo Mata
Hugo Mata 2021 年 8 月 1 日
回答済み: Hugo Mata 2021 年 8 月 3 日
I need to implement an algorithm to the fuzzy logic set of a drastic sum between two signals.
Signal a:
a= trimf(x,[2,5,8]);
Signal b:
b=gaussmf(x,[2,3]);
My output s1 would be like:
if min(A,B) = 0 -> max(A,B)
else = 1
Something like:

採用された回答

Hugo Mata
Hugo Mata 2021 年 8 月 3 日
close all
clear all
clc
x=(0:0.01:10)';
a= trimf(x,[2,5,8]);
b=gaussmf(x,[2,3]);
% Drastic Sum
s1=zeros(1001)';
for y=1:length(x)
if min(a(y),b(y))==0
s1(y)=max(a(y),b(y));
else s1(y)=1;
end
end
z = plot(x,a,x,b,x,s1,'o-');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Clustering についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by