i need help please with the uitable function
显示 更早的评论
how can i put the outputted data in a uitable i tried this but it didn't work out for me
%
clc
clear
input('welcome to the mud selection software 2.0, press (enter) to continue');
Ko=input('please enter the permeability of the formation in units of md: ');
dw=input('please enter the wellbore diameter in units of inch: ');
rw=(dw/(12*2));
fprintf('the wellbore radius is %2.4f ft \n',rw);
n=input('please input the number of mud types you have : ')
x = cell(1, n)
y = zeros(1, n)
z = zeros(1, n)
for i=1:n
x{i}=input('please enter the name of the mud type you have: ','s')
end
for j=1:n
y(j)=input ('please enter the permeability of the damaged zone corrisponding to each mud type in md: ')
end
for l=1:n
z(l)=input('please enter the depth of invasion corresponding to each mud type in units of ft: ')
end
[zSorted, index]=sort(z, 'ascend');
xSorted=x(index);
ySorted=y(index);
figure
rnames={'Mud type','Permeability of damaged zone','Depth of penetration'}
t=uitable('Data',[{zSorted};xSorted;ySorted],'RowName',rnames)
This is the error i keep getting
%
Error using vertcat
Dimensions of matrices being concatenated are not consistent.
Error in tryxxxxx (line 27)
t=uitable('Data',[{zSorted};xSorted;ySorted],'RowName',rnames)
采纳的回答
更多回答(1 个)
Image Analyst
2017-3-17
0 个投票
Create a blank table, then just let the users type into it.
2 个评论
Ahmed Ashraf
2017-3-17
Image Analyst
2017-3-18
You've accepted an answer so I guess you figured it out. For others who may be reading:
data = t.Data; % where t is the handle to your uitable.
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!