Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:b2ba9cfb5a94023904766f7ff171b9f69fd79a2a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
% Figure_2_Generate.m
% Script used to generate Figure 2 -- Supplemental Figure 1 from 
% Barendregt et al., 2022.

% Define plotting domain and Gaussian generating function:
x = linspace(-10,10,1000);
f = @(x,mu,sigma) exp(-0.5*((x-mu)/sigma).^2)/(sigma*sqrt(2*pi));

% Plot low evidence quality distributions (Fig. 2 -- Supplement 1 A):
mu = 1; sigma = 1;
figure
plot(x,f(x,mu,sigma),'b','linewidth',15)
hold on
plot(x,f(x,-mu,sigma),'r','linewidth',15)
plot([0 0],[0 0.4],'k--','linewidth',5)

% Define simulation parameters for belief trajectories:
T = 1; dt = 0.005; N_trial = 5;

% Calculate scaled SNR m:
m = 2*mu^2/(sigma^2);

% Generate belief trajectories:
y = RDMD_trial_generate(2,T,dt,0,N_trial);

% Plot low evidence quality belief trajectories (Fig. 2 -- Supplement 1 B):
figure
plot(0:dt:T,y,'linewidth',5)
hold on
plot([0 T],[0 0],'k--','linewidth',5)

% Plot high evidence quality distributions (Fig. 2 -- Supplement 1 C):
mu = 5; sigma = 1;
figure
plot(x,f(x,mu,sigma),'b','linewidth',15)
hold on
plot(x,f(x,-mu,sigma),'r','linewidth',15)
plot([0 0],[0 0.4],'k--','linewidth',5)

% Generate and plot high evidence quality belief 
% trajectories (Fig. 2 -- Supplement 1 B):
m = 2*mu^2/(sigma^2);
y = RDMD_trial_generate(2,T,dt,0,N_trial);

figure
plot(0:dt:T,y,'linewidth',5)
hold on
plot([0 T],[0 0],'k--','linewidth',5)

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API