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

1 次查看(过去 30 天)
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 个评论
Jonnathan  Cespedes
Jonnathan Cespedes 2018-10-19
编辑:Guillaume 2018-10-19
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by