Hi All, How to solve this Error .........."Error using horzcat Dimensions of matrices being concatenated are not consistent."

1 Ansicht (letzte 30 Tage)
I'm trying to do a boxplot from a structure data, each cell of the structure have different size row. I want to draw 26 boxplots in the same figure using the structure data. My code is the following:
for k=1:col boxplot(dataPBL.Smooth{:,k}) end
But does not work, help me, please. Thank you.
  2 Kommentare
Jonnathan  Cespedes
Jonnathan Cespedes am 19 Okt. 2018
Bearbeitet: Guillaume am 19 Okt. 2018
clear; close all; clc;
[FileName,DirName] = uigetfile('*.*','Select the PBL Files','MultiSelect','on');
M = zeros(size(FileName));
for k=length(FileName):-1:1
fid = fopen(FileName{k},'r');
[filepath, Name, ext] = fileparts(FileName{k});
Name = strcat(Name,ext);
dataPBL.FileName{:,k} = FileName{:,k};
dataPBL.Ptop{:,k} = dlmread(fullfile(DirName,FileName{:,k}));
% [dataPBL.Envelope{1,k}, dataPBL.Envelope{2,k}]= envelope(dataPBL.Ptop{:,k}(:,2));
dataPBL.Smooth{1,k} = smooth(dataPBL.Ptop{:,k}(:,1),dataPBL.Ptop{:,k}(:,2),0.03,'rloess');
end
clearvars -except dataPB
I'm using this code, and i attached two files of data.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by