HDL Code generation does not support 2D-matrices as function inputs.

2 views (last 30 days)
function [mean_out,sd] = MyMean2(A)
sum_A = 0;
for i=1:20
sum_A = sum_A+A(i);
%disp(A(i));
end
%sd = std(A);
mean_out = sum_A/20;
sum = 0;
for i=1:20
c = (A(i)- mean_out).^2;
sum = sum+c;
%disp(A(i));
end
len = length(A)-1;
%s = sum((A-mean_out).^2);
a = sum/len;
sd = sqrt(a);
end

Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!