Weibull does not seem to work gives error”Error using makedist Distribution name ‘Weibull’ is unrecognized.”
c = 8.1; % Scale factor
k = 2.03; % Shape factor
N = 1000; % Number of plot data points
pd = makedist(‘Weibull’,’a’,c,’b’,k) %Selection of Weibull
x = linspace(0,25,N);
y = pdf(pd,x); % Weibull output function
cd = 1 – exp(-(x/c).^k); % Cumulative distribution
yyaxis left
plot(x,100*y, ‘k’,’LineWidth’,2)
title({[‘Weibull and Cumulative Probability Distributions’], …
[‘k = ‘, num2str(k), ‘ and c = ‘, num2str(c)]});
xlabel(‘Wind Velocity (m/s)’);
ylabel(‘Probability (%)’, ‘Color’,’k’);
hold on
yyaxis right
plot(x,100*cd, ‘r’,’LineWidth’,2)
ylabel(‘Probability (%)’);
legend(‘Weibull’, ‘Cumulative’)
axis([0 25 0 120]);
grid on
grid minor
It gives the following error:
Error using makedist
Distribution name ‘Weibull’ is unrecognized.c = 8.1; % Scale factor
k = 2.03; % Shape factor
N = 1000; % Number of plot data points
pd = makedist(‘Weibull’,’a’,c,’b’,k) %Selection of Weibull
x = linspace(0,25,N);
y = pdf(pd,x); % Weibull output function
cd = 1 – exp(-(x/c).^k); % Cumulative distribution
yyaxis left
plot(x,100*y, ‘k’,’LineWidth’,2)
title({[‘Weibull and Cumulative Probability Distributions’], …
[‘k = ‘, num2str(k), ‘ and c = ‘, num2str(c)]});
xlabel(‘Wind Velocity (m/s)’);
ylabel(‘Probability (%)’, ‘Color’,’k’);
hold on
yyaxis right
plot(x,100*cd, ‘r’,’LineWidth’,2)
ylabel(‘Probability (%)’);
legend(‘Weibull’, ‘Cumulative’)
axis([0 25 0 120]);
grid on
grid minor
It gives the following error:
Error using makedist
Distribution name ‘Weibull’ is unrecognized. c = 8.1; % Scale factor
k = 2.03; % Shape factor
N = 1000; % Number of plot data points
pd = makedist(‘Weibull’,’a’,c,’b’,k) %Selection of Weibull
x = linspace(0,25,N);
y = pdf(pd,x); % Weibull output function
cd = 1 – exp(-(x/c).^k); % Cumulative distribution
yyaxis left
plot(x,100*y, ‘k’,’LineWidth’,2)
title({[‘Weibull and Cumulative Probability Distributions’], …
[‘k = ‘, num2str(k), ‘ and c = ‘, num2str(c)]});
xlabel(‘Wind Velocity (m/s)’);
ylabel(‘Probability (%)’, ‘Color’,’k’);
hold on
yyaxis right
plot(x,100*cd, ‘r’,’LineWidth’,2)
ylabel(‘Probability (%)’);
legend(‘Weibull’, ‘Cumulative’)
axis([0 25 0 120]);
grid on
grid minor
It gives the following error:
Error using makedist
Distribution name ‘Weibull’ is unrecognized. matlab MATLAB Answers — New Questions