how do i add output of Fx and Fxd?

1 visualización (últimos 30 días)
ANIKET KADAM
ANIKET KADAM el 25 de Feb. de 2016
Comentada: ANIKET KADAM el 25 de Feb. de 2016
F(row,i)= Fx + Fxd
  1 comentario
ANIKET KADAM
ANIKET KADAM el 25 de Feb. de 2016
clc; clear all;
%%input time=0.2; K=170e6; C=15e-6; x=20e-6; y=20e-6;
%%initialize z = 13; %%z=13 H = 0.005; %%0.005m ld = 0.04; %%0.04m wc = 131; %%w=131rad/s theta = 360/z; tempphi=0; tempsi=0; row = 1; j=1; %counter for increment in defect angle
for t=0:37e-6:time %%time increment si(j)=tempsi; %%initialize defect angle
for i=1:1:z %%ball increment
phi(i)=tempphi; %%ith ball angle
disp('phi = '); phi(i)
if (phi(i) == si(j)) %%condition for ball in defect region
thetat = (wc*t) + (2*3.14/z*(z-i))
Fxd(row,i)= K* (x* cos(phi(i)*(pi/180)) + y* sin(phi(i)*(pi/180)) - (C + H * sin(3.14/(ld*(thetat-phi(i)*(pi/180)))))).^(3/2) * cos(phi(i)*(pi/180));
disp('Fxd value');
disp(Fxd(row,i));
Fyd(row,i)= K* (x* cos(phi(i)*(pi/180)) + y* sin(phi(i)*(pi/180)) - (C + H * sin(3.14/(ld*(thetat-phi(i)*(pi/180)))))).^(3/2) * sin(phi(i)*(pi/180));
disp('Fyd value');
disp(Fyd(row,i));
disp('defect ball position');
else %%condition for ball in non-defect region
Fx(row,i)= K* (x* cos(phi(i)*(pi/180)) + y* sin(phi(i)*(pi/180)) - C).^(3/2) * cos(phi(i)*(pi/180));
disp('Fx value');
disp(Fx(row,i));
Fy(row,i)= K* (x* cos(phi(i)*(pi/180)) + y* sin(phi(i)*(pi/180)) - C).^(3/2) * sin(phi(i)*(pi/180));
disp('Fy value');
disp(Fy(row,i));
disp('other balls position');
end
tempphi = phi(i) + theta;
end
tempphi = 0;
tempsi = si(j) + 45;
if(tempsi >= 360)
tempsi = 0
end
j = j + 1;
row = row + 1;
end

Iniciar sesión para comentar.

Respuestas (1)

Jos (10584)
Jos (10584) el 25 de Feb. de 2016
What do these 5 variables in the statement " F(row,i)= Fx + Fxd" hold?
To be added like this, Fx and Fxd should have of the same size. The sum (Fx + Dxd) has that size as well. This should fit in the position in F indicated by row and i. So, F(row,i) should have that size as well. If F does not exist, you might want to omit the indices (row,i)
You can check all this by looking at these individual elements of the statement.
  1 comentario
ANIKET KADAM
ANIKET KADAM el 25 de Feb. de 2016
thankyou for answer. there was an attached file along with question which displayed the variables meaning.

Iniciar sesión para comentar.

Categorías

Más información sobre Surfaces, Volumes, and Polygons en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by