image thumbnail

Create Venn Diagrams from Set Expressions

version 12.0.0 (2.41 KB) by seb
Takes in a logically valid expression on 3 sets and outputs a Venn diagram with the appropriate region colored

275 Downloads

Updated 29 Jan 2020

View License

Given a logical expression consisting of three sets: A, B and C and the usual operators & (AND), | (OR), ~(NOT) and - (SUBTRACTION), this code will output a Venn diagram with the appropriate region colored.

The venn diagram shown in the image corresponds to this expression: "((~A&B)|~(B|~C))&(A|C)"

Cite As

seb (2021). Create Venn Diagrams from Set Expressions (https://www.mathworks.com/matlabcentral/fileexchange/74064-create-venn-diagrams-from-set-expressions), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!