How to convert sequence of numbers into text and display on screen
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am using MATLAB R2020a Psychtoolbox on Mac OS. I am trying to display sequences of numbers generated from a random Gaussian distribution and have tried 'num2str' and 'char' functions but these haven't worked. These are the sequences. The 'dis' function generates the numbers.
% Define sequences
seq1 = dis(20, 10, 100, 0, 5);
seq2 = dis(10, 10, 100, 0, 5);
seq3 = dis(10, 10, 100, 0, 5);
% dis function
function x = dis(va, mu, ul, ll, nvals)
n = makedist('normal','mu',mu,'sigma',sqrt(va));
t = truncate(n,ll,ul);
x = round(random(t,nvals,1));
end
Antworten (0)
Siehe auch
Kategorien
Mehr zu Timing and presenting 2D and 3D stimuli finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!