Error Using Rainflow fonction
Hello everyone,
I’m not really good at Matlab, but I need to use it to process some load cycles result using the rainflow function (please see attachment)
I have written the code as below
clear all,
clc,
[filename,pathname] = uigetfile({‘*.xlsx;*.xlsm’,’Excel Worksheets (*.xlsx,*.xlsm)’},’Select File’);
[file,sheets] = xlsfinfo([pathname,filename]);
num_1 = xlsread(filename);
[num_3, txt]= xlsread(filename);
%read only row and column with number
Data_1 = num_3(4:end,:); % 4:end, –> choose all the row start from 4 % : –> choose all the column % start at row 4 and read all column
X = num_3(4:end,7); % 4,–> Choose only row 4 seread oly row 4 and all column.
Y = num_3(4:end,6);
Z = num_3(4:end,8);
figure(1)
plot3(X,Y,Z);
t = linspace(min(Y),max(Y),length(Z)/10);
d = linspace(min(Y),max(Y),length(Z)/5);
figure(2)
Z = [X Y]
rainflow(Z,t);
and unfortunately have the errors below after the code:
Error using rainflow
Expected X to be a vector.
Error in rainflow>parseInputs (line 184)
validateattributes(x,{‘single’,’double’},…
Error in rainflow (line 81)
[x,t,ext,td] = parseInputs(x,varargin{:});
Error in KW31_BMW_Load_Cycle_Ju (line 39)
rainflow(Z,t)
Can someone please tell me were I´making the mytake by using the Rainflow function?
Thank in advanceHello everyone,
I’m not really good at Matlab, but I need to use it to process some load cycles result using the rainflow function (please see attachment)
I have written the code as below
clear all,
clc,
[filename,pathname] = uigetfile({‘*.xlsx;*.xlsm’,’Excel Worksheets (*.xlsx,*.xlsm)’},’Select File’);
[file,sheets] = xlsfinfo([pathname,filename]);
num_1 = xlsread(filename);
[num_3, txt]= xlsread(filename);
%read only row and column with number
Data_1 = num_3(4:end,:); % 4:end, –> choose all the row start from 4 % : –> choose all the column % start at row 4 and read all column
X = num_3(4:end,7); % 4,–> Choose only row 4 seread oly row 4 and all column.
Y = num_3(4:end,6);
Z = num_3(4:end,8);
figure(1)
plot3(X,Y,Z);
t = linspace(min(Y),max(Y),length(Z)/10);
d = linspace(min(Y),max(Y),length(Z)/5);
figure(2)
Z = [X Y]
rainflow(Z,t);
and unfortunately have the errors below after the code:
Error using rainflow
Expected X to be a vector.
Error in rainflow>parseInputs (line 184)
validateattributes(x,{‘single’,’double’},…
Error in rainflow (line 81)
[x,t,ext,td] = parseInputs(x,varargin{:});
Error in KW31_BMW_Load_Cycle_Ju (line 39)
rainflow(Z,t)
Can someone please tell me were I´making the mytake by using the Rainflow function?
Thank in advance Hello everyone,
I’m not really good at Matlab, but I need to use it to process some load cycles result using the rainflow function (please see attachment)
I have written the code as below
clear all,
clc,
[filename,pathname] = uigetfile({‘*.xlsx;*.xlsm’,’Excel Worksheets (*.xlsx,*.xlsm)’},’Select File’);
[file,sheets] = xlsfinfo([pathname,filename]);
num_1 = xlsread(filename);
[num_3, txt]= xlsread(filename);
%read only row and column with number
Data_1 = num_3(4:end,:); % 4:end, –> choose all the row start from 4 % : –> choose all the column % start at row 4 and read all column
X = num_3(4:end,7); % 4,–> Choose only row 4 seread oly row 4 and all column.
Y = num_3(4:end,6);
Z = num_3(4:end,8);
figure(1)
plot3(X,Y,Z);
t = linspace(min(Y),max(Y),length(Z)/10);
d = linspace(min(Y),max(Y),length(Z)/5);
figure(2)
Z = [X Y]
rainflow(Z,t);
and unfortunately have the errors below after the code:
Error using rainflow
Expected X to be a vector.
Error in rainflow>parseInputs (line 184)
validateattributes(x,{‘single’,’double’},…
Error in rainflow (line 81)
[x,t,ext,td] = parseInputs(x,varargin{:});
Error in KW31_BMW_Load_Cycle_Ju (line 39)
rainflow(Z,t)
Can someone please tell me were I´making the mytake by using the Rainflow function?
Thank in advance hello togheter i´m trying to plot a rainflow MATLAB Answers — New Questions