Cell contents assignment to a non-cell array object.
Show older comments
Hello everybody, I know that this error must be very common, but I have been trying to solve it for two days and I still can´t find the solution, I will try to explain it as fast as I can:
well at first, I had this error:
In an assignment A(I) = B, the number of elements in B and
I must be the same.
Error in ==> compic at 34
picad(i)= picaduradm(hb,vut,70,kr,dimens(11,i),dimens(11,i+3),dimens(2,i),dimens(2,i+3));
So, I was investigating it and I concluded that probably I was joining a scalar with a vector (It happened to me before), so I changed brackets () to {}, as follows:
picad{i}= picaduradm(hb,vut,70,kr,dimens(11,i),dimens(11,i+3),dimens(2,i),dimens(2,i+3));
And now I get this error:
Cell contents assignment to a non-cell array object.
Error in ==> compic at 34
picad{i}= picaduradm(hb,vut,70,kr,dimens(11,i),dimens(11,i+3),dimens(2,i),dimens(2,i+3));
If you need it, here you have the code of the function picaduradm:
function picadm = picaduradm(hb,h,revs,kr, dprim1, dprim2,z1,z2)%devuelve el esfuerzo admisible a picadura
ct=1;%factor de temperatura(no se esperan temperatures superiores a los 120ºC)
sc= ((hb*349)+34300)*0.006894759086775369;
N = revs*h*60;
if N<=10^4
cl=1.5;
elseif N>10^4 && N<=10^5
cl=1.3;
elseif N>10^5 && N<=10^6
kl=1.1;
else
cl=1;
end
if dprim1>dprim2 %este bucle comprueba si elengranaje comprobado es el más grande de la pareja para el calculo del ch.
m=z1/z2;
ch=1+(0.00069*(m-1));
else
ch=1;
end
picadm = (sc*cl*ch)/(ct*kr);
Thanks you very much.
Accepted Answer
More Answers (1)
Jaime
on 27 Apr 2013
Categories
Find more on Annotations 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!