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

  • 7595b7f
  • /
  • return_f.m
Raw File Download
Permalinks

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
  • directory
content badge Iframe embedding
swh:1:cnt:fd35af601984a38d773c5f1a2aa70a078a65c031
directory badge Iframe embedding
swh:1:dir:7595b7f884ea123ac63f18b52702d1440bf0baf1
Citations

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
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
return_f.m
function [fa, fb] = return_f(a_strat,b_strat,X)
Ca=X(1); Cb=X(2); Ta=X(3); Tb=X(4); N=X(5);
% fa
fa = a_strat(1);
if a_strat(2) ~= 0 % if Nutrient sensor on
    fa = fa + a_strat(2) * (N > a_strat(3));
end
if a_strat(4) ~= 0 % if comp tox sensor on
    fa = fa + a_strat(4) * (Tb > a_strat(5));
end
if a_strat(6) ~= 0 % if self tox on
    fa = fa + a_strat(6) * (Ta > a_strat(7));
end
if a_strat(8) ~= 0 % % if QS on
    fa = fa + a_strat(8) * (Ca > a_strat(9));
end
% fb
fb = b_strat(1);
if b_strat(2) ~= 0 % if Nutrient sensor on
    fb = fb + b_strat(2) * (N > b_strat(3));
end
if b_strat(4) ~= 0 % if comp tox sensor on
    fb = fb + b_strat(4) * (Ta > b_strat(5));
end
if b_strat(6) ~= 0 % if self tox on
    fb = fb + b_strat(6) * (Tb > b_strat(7));
end
if b_strat(8) ~= 0 % % if QS on
    fb = fb + b_strat(8) * (Cb > b_strat(9));
end
end

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— Contact— JavaScript license information— Web API