hello>>I want to use (from workspace ) to be as disturbance input in a simulink model ,but when I wrote the below code ,its generating error( The last dimension of each 'signals.values' field must be the same as the number of rows in the 'time' field

3 visualizaciones (últimos 30 días)
if true
% code
endM = 1;
xf = 1;
A = 10;
B = 21;
T = 10;
p = 0.1;
dx = xf/A;
xn = [0:A]'*dx;
dt = (T/B);
if true
% code
end
v = (T*dt^2)/(M*dx);
s = dt^2/M;
r = 0.8*((dt^2*T)/(dx^2*p));
tn = [0:B]*dt;
%o = tn';
f = zeros(length(xn),length(tn));
k=xn*tn;
for m = 2:length(tn)-1
for n = 2:length(xn)-1
f(n,m) = (3+sin(pi*xn(n)'*tn(m))+sin(2*pi*xn(n)'*tn(m))+sin(3*pi*xn(n)'*tn(m)))*(xn(n)'/1000);
end
end
data11.time= tn';
data11.signals.values = f;
data11.signals.dimensions=size(k);

Respuestas (0)

Categorías

Más información sobre Modeling 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