Pluma Gaussiana
Publicado por Beto (4 intervenciones) el 02/02/2018 22:33:19
saludos! alguien podría ayudarme AL CORRER ESTE PROGRAMA EN LA MATRIZ TT DE ONES, ME GENERA UN ERROR, lo he cambiado pero no me da el resultado deseado, en el matlab 2014 en adelante
que se puede hacer?
gracias!
Error using ones
Size inputs must be scalar.
Error in PLUMA_GAUSSIANA_2018 (line 17)
tt=ones(1,x1);
que se puede hacer?
gracias!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
%Pluma Gaussiana Básica
clc
clear all
Dx=0.000625; %Coeficiente de difusion
V=0.1; %Velocidad de Viento
M=1; %Masa del Contaminante
xmin=-0.05;
xmax=0.2;
ymin=0; ymax=100;
t=0.1:0.005:1; %tiempo
x=linspace(xmin,xmax,size(t,2));
x1=size(x);
tt=ones(1,x1);
y=t; %para que y considere el contorno de t
C=[]; %Matriz
for i=1:size(t,2)
xx=x-V*t(i);
C=[C:[M/sqrt(4*pi*Dx*t(i))*tt.*exp(-(xx.*xx)./(4*Dx*t(i)))]];
end
figure
plot(C');
hold on
title('Pluma Gaussiana Puff 1D')
xlabel('Espacio')
ylabel('Concentracion')
hold on
[A B]=meshgrid(x,y);
figure
contourf(A,B,C,10);
colorbar;
xlabel('Eje X')
ylabel('Tiempo')
Error using ones
Size inputs must be scalar.
Error in PLUMA_GAUSSIANA_2018 (line 17)
tt=ones(1,x1);
Valora esta pregunta


0