how do i use values obtained from table function to create another function and graph in matlab app designer

I am working on the birthday paradox and the final assignment is to create a GUI. I have completed most parts until generating random numbers in a table. I now need to plot the probability graph based on the values geenrated from my randi() function. However, I am not sure how to incorporate those. I have to use this function for the probability testing:
function bmatch = findmatch(data)
bmatch = 0;
for a=1:length(data)-1
for b=a+1:length(data)
if data(a) == data(b)
bmatch =1;
break;
end
end
if bmatch == 1
break;
end
end
end

Answers (0)

Asked:

on 6 May 2022

Community Treasure Hunt

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

Start Hunting!