Skip to content

Commit ee21d10

Browse files
HanSur94claude
andcommitted
fix: replace corr() with corrcoef() in example_widget_scatter
corr() requires the Statistics Toolbox which isn't available in the MATLAB CI runner. corrcoef() is a built-in that works without toolboxes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 074b575 commit ee21d10

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

examples/example_widget_scatter.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@
101101
%% 3. Render
102102
d.render();
103103
fprintf('Dashboard rendered with %d scatter widgets.\n', numel(d.Widgets));
104-
fprintf('Correlation T-P: %.2f T-F: %.2f P-F: %.2f\n', ...
105-
corr(sTemp.Y(:), sPress.Y(:)), ...
106-
corr(sTemp.Y(:), sFlow.Y(:)), ...
107-
corr(sPress.Y(:), sFlow.Y(:)));
104+
% Pearson correlation (toolbox-free)
105+
r_tp = corrcoef(sTemp.Y(:), sPress.Y(:)); r_tp = r_tp(1,2);
106+
r_tf = corrcoef(sTemp.Y(:), sFlow.Y(:)); r_tf = r_tf(1,2);
107+
r_pf = corrcoef(sPress.Y(:), sFlow.Y(:)); r_pf = r_pf(1,2);
108+
fprintf('Correlation T-P: %.2f T-F: %.2f P-F: %.2f\n', r_tp, r_tf, r_pf);

0 commit comments

Comments
 (0)