|
1 | 1 | function speeds = setSpeedTargets(cfg) |
2 | | - % If selected as task, it omputes the matrix with the speeds set in |
| 2 | + % |
| 3 | + % USAGE:: |
| 4 | + % |
| 5 | + % speeds = setSpeedTargets(cfg) |
| 6 | + % |
| 7 | + % If selected as task, it computes the matrix with the speeds set in |
3 | 8 | % ``cfg.dot.speed`` (computed in pixels per frame) and the target ones (higher = faster, |
4 | 9 | % lower = slower). |
5 | 10 | % |
6 | | - % If this task is not requeste, the output will be a matrix where the values correspond to the |
| 11 | + % If this task is not requested, the output will be a matrix where the values correspond to the |
7 | 12 | % set speed in ``cfg.dot.speed`` (computed in pixels per frame). |
8 | 13 | % |
9 | | - % This function is in * * W I P * *, the output is the same if the task is selected or not. |
10 | 14 | % |
11 | 15 | % (C) Copyright 2021 CPP visual motion localizer developpers |
12 | 16 |
|
13 | | - if ismember('speed', cfg.target.type) |
14 | | - [~, nbEventsPerBlock, ~, nbBlocks] = getDesignInput(cfg); |
15 | | - speeds = ones(nbBlocks, nbEventsPerBlock) * cfg.dot.speedPixPerFrame; |
16 | | - |
17 | | - % Outputs an "empty" matrix in case no speed task is required |
18 | | - else |
19 | | - [~, nbEventsPerBlock, ~, nbBlocks] = getDesignInput(cfg); |
20 | | - speeds = ones(nbBlocks, nbEventsPerBlock); |
| 17 | + [~, nbEventsPerBlock, ~, nbBlocks] = getDesignInput(cfg); |
| 18 | + speeds = ones(nbBlocks, nbEventsPerBlock) * cfg.dot.speedPixPerFrame; |
21 | 19 |
|
22 | | - end |
| 20 | + % TODO: make the output different whether the task is selected or not. |
| 21 | + % if ismember('speed', cfg.target.type) |
| 22 | + % else % Outputs an "empty" matrix in case no speed task is required |
| 23 | + % end |
23 | 24 |
|
24 | 25 | end |
0 commit comments