i need help please with the uitable function
Show older comments
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)
Accepted Answer
More Answers (1)
Image Analyst
on 17 Mar 2017
0 votes
Create a blank table, then just let the users type into it.
2 Comments
Ahmed Ashraf
on 17 Mar 2017
Image Analyst
on 18 Mar 2017
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.
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!