Author: PuTI
Extract shapes from photos as graphs using MATLAB and express them as functions
I would like to extract a function by graphing the outline of the Hindenburg airship.
Here, I would like to define a function that matches the actual size of the Hindenburg.
For example, the length of the Hindenburg airship is 245.3 meters. The length of both endpoints of the function will be 245.3
I even put dots on a picture and expressed it as a graph, but I can’t define the function according to the actual scale.
I used this code
data=imread(‘project_final.png’);
imshow(data);
b=drawpolygon(‘Color’,’red’);
bx=b.Position(:,1);
by=b.Position(:,2);
f=fit(bx,by,’poly4′)I would like to extract a function by graphing the outline of the Hindenburg airship.
Here, I would like to define a function that matches the actual size of the Hindenburg.
For example, the length of the Hindenburg airship is 245.3 meters. The length of both endpoints of the function will be 245.3
I even put dots on a picture and expressed it as a graph, but I can’t define the function according to the actual scale.
I used this code
data=imread(‘project_final.png’);
imshow(data);
b=drawpolygon(‘Color’,’red’);
bx=b.Position(:,1);
by=b.Position(:,2);
f=fit(bx,by,’poly4′) I would like to extract a function by graphing the outline of the Hindenburg airship.
Here, I would like to define a function that matches the actual size of the Hindenburg.
For example, the length of the Hindenburg airship is 245.3 meters. The length of both endpoints of the function will be 245.3
I even put dots on a picture and expressed it as a graph, but I can’t define the function according to the actual scale.
I used this code
data=imread(‘project_final.png’);
imshow(data);
b=drawpolygon(‘Color’,’red’);
bx=b.Position(:,1);
by=b.Position(:,2);
f=fit(bx,by,’poly4′) data extract, graph and function conversion MATLAB Answers — New Questions
Change ‘Gain parameter’ value of Gain block in Model
Hello,
I want to change gain parameter externally.
Is there any option where we can use ‘Data memory write’ or ‘Constant’ block as input for the purpose.
Any other option is also appreciated.
Thank you.Hello,
I want to change gain parameter externally.
Is there any option where we can use ‘Data memory write’ or ‘Constant’ block as input for the purpose.
Any other option is also appreciated.
Thank you. Hello,
I want to change gain parameter externally.
Is there any option where we can use ‘Data memory write’ or ‘Constant’ block as input for the purpose.
Any other option is also appreciated.
Thank you. dynamic, blockparameter, gain MATLAB Answers — New Questions
Handling a very big difference between numbers(ratio)
Hello,
I was working on a code that demands operating with statistics of long numbers (such as 2000000) vs the errors(such as 0.0003) so different equations that demands both of the numbers are equal 0 or Inf, how can I improve my situation?
I tried to use vpa, it helps but it’s not a magic pill and the problems appers later in the code.
Is there anyway to operate with such numbers in terms of division without getting results as Inf or 0?
Thank you and a blessed week,
VadimHello,
I was working on a code that demands operating with statistics of long numbers (such as 2000000) vs the errors(such as 0.0003) so different equations that demands both of the numbers are equal 0 or Inf, how can I improve my situation?
I tried to use vpa, it helps but it’s not a magic pill and the problems appers later in the code.
Is there anyway to operate with such numbers in terms of division without getting results as Inf or 0?
Thank you and a blessed week,
Vadim Hello,
I was working on a code that demands operating with statistics of long numbers (such as 2000000) vs the errors(such as 0.0003) so different equations that demands both of the numbers are equal 0 or Inf, how can I improve my situation?
I tried to use vpa, it helps but it’s not a magic pill and the problems appers later in the code.
Is there anyway to operate with such numbers in terms of division without getting results as Inf or 0?
Thank you and a blessed week,
Vadim nan, inf, statistics, std MATLAB Answers — New Questions
EDGE function ERROR
I’m trying to perform the following operation
%Load the image into matlab
A = imread(‘before3.jpg’);
%Show the image
figure(1)
imshow(A)
I = edge(A, ‘sobel’);
Using this high pass filter I expect to find the edges of my image but I get the following error while using the edge function.
??? Function EDGE expected its first input, I, to be two-dimensional.
Error in ==> edge>parse_inputs at 564
iptcheckinput(I,{‘numeric’},{‘nonsparse’,’2d’},mfilename,’I’,1);
Error in ==> edge at 197
[a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});
Error in ==> image1 at 21
I = edge(A,’sobel’);
The image ‘before3.jpg’ has value
<1728x2304x3 uint8>
The error says to use a 2 dimensional input but I have not been able to find a way to change my image to a 2 dimensional matrix and keep at the same time the original edges.
I tried
[X, map] = rgb2ind(A,256);
I used as the map a ‘gray’ scale but it did not work.
Please if you have a different approach that you can recommend me I will be very grateful.I’m trying to perform the following operation
%Load the image into matlab
A = imread(‘before3.jpg’);
%Show the image
figure(1)
imshow(A)
I = edge(A, ‘sobel’);
Using this high pass filter I expect to find the edges of my image but I get the following error while using the edge function.
??? Function EDGE expected its first input, I, to be two-dimensional.
Error in ==> edge>parse_inputs at 564
iptcheckinput(I,{‘numeric’},{‘nonsparse’,’2d’},mfilename,’I’,1);
Error in ==> edge at 197
[a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});
Error in ==> image1 at 21
I = edge(A,’sobel’);
The image ‘before3.jpg’ has value
<1728x2304x3 uint8>
The error says to use a 2 dimensional input but I have not been able to find a way to change my image to a 2 dimensional matrix and keep at the same time the original edges.
I tried
[X, map] = rgb2ind(A,256);
I used as the map a ‘gray’ scale but it did not work.
Please if you have a different approach that you can recommend me I will be very grateful. I’m trying to perform the following operation
%Load the image into matlab
A = imread(‘before3.jpg’);
%Show the image
figure(1)
imshow(A)
I = edge(A, ‘sobel’);
Using this high pass filter I expect to find the edges of my image but I get the following error while using the edge function.
??? Function EDGE expected its first input, I, to be two-dimensional.
Error in ==> edge>parse_inputs at 564
iptcheckinput(I,{‘numeric’},{‘nonsparse’,’2d’},mfilename,’I’,1);
Error in ==> edge at 197
[a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});
Error in ==> image1 at 21
I = edge(A,’sobel’);
The image ‘before3.jpg’ has value
<1728x2304x3 uint8>
The error says to use a 2 dimensional input but I have not been able to find a way to change my image to a 2 dimensional matrix and keep at the same time the original edges.
I tried
[X, map] = rgb2ind(A,256);
I used as the map a ‘gray’ scale but it did not work.
Please if you have a different approach that you can recommend me I will be very grateful. edge detection, image proccesing toolbox MATLAB Answers — New Questions
error is not showing but plot is not generating
clear
%% %% current density equation J=dv/dx=0 at x=0 boundary condition
%% u=y(1)
%% v=y(2)
%% du/dx=dy(1)/dx=y(3)
%%d^2u/dx^2=dy(3)/dx=gamma*y(1)/(1+alpha*y(1)
%% dv/dx=dy(2)/dx=y(4)
%% d^2v/dx^2=dy(4)/dx=a*delta_v*y(4)-(2/epsilon)*gamma*y(1)/(1+alpha*y(1)
alpha = 0.1;
gamma = [1, 50, 100, 500, 1000];
epsilon = 1;
a = 1000;
fcn = @(x, y) [y(3); y(4); (gamma * y(1)) / (1 + alpha * y(1)); a * v * y(4) – (2 / epsilon) * (gamma * y(1)) / (1 + alpha * y(1))];
bc = @(ya, yb) [ya(1)-1; ya(2); yb(3); 0]; %% J=dv/dx=0 at x=0 so yb(4) is 0
guess = @(x) [1; 0; 0; 0]; %% at x=0, u=1, v=0, du/dx=0, dv/dx=0
xmesh = linspace(0, 1, 100);
solinit = bvpinit(xmesh, guess);
for i = 1:numel(gamma)
sol = bvp4c(fcn, bc, solinit);
y_plot = deval(sol, xmesh);
v = y_plot(1, :);
dv_dx = y_plot(2, :);
J = dv_dx;
delta_v_star = v;
% Plot delta_v_star versus J
figure;
plot(delta_v_star, J);
xlabel(‘ delta_v_star’);
ylabel(‘J’);
title(‘Plot of delta_v_star verses current density (J)’);
legend(‘gamma = 1’, ‘gamma = 50’, ‘gamma = 100’, ‘gamma = 500’, ‘gamma = 1000’);
xlim([1e-4, 1e2]);
ylim([0, 70]);
end
i defined all the parameters but plot is not generating any mistakes in the codeclear
%% %% current density equation J=dv/dx=0 at x=0 boundary condition
%% u=y(1)
%% v=y(2)
%% du/dx=dy(1)/dx=y(3)
%%d^2u/dx^2=dy(3)/dx=gamma*y(1)/(1+alpha*y(1)
%% dv/dx=dy(2)/dx=y(4)
%% d^2v/dx^2=dy(4)/dx=a*delta_v*y(4)-(2/epsilon)*gamma*y(1)/(1+alpha*y(1)
alpha = 0.1;
gamma = [1, 50, 100, 500, 1000];
epsilon = 1;
a = 1000;
fcn = @(x, y) [y(3); y(4); (gamma * y(1)) / (1 + alpha * y(1)); a * v * y(4) – (2 / epsilon) * (gamma * y(1)) / (1 + alpha * y(1))];
bc = @(ya, yb) [ya(1)-1; ya(2); yb(3); 0]; %% J=dv/dx=0 at x=0 so yb(4) is 0
guess = @(x) [1; 0; 0; 0]; %% at x=0, u=1, v=0, du/dx=0, dv/dx=0
xmesh = linspace(0, 1, 100);
solinit = bvpinit(xmesh, guess);
for i = 1:numel(gamma)
sol = bvp4c(fcn, bc, solinit);
y_plot = deval(sol, xmesh);
v = y_plot(1, :);
dv_dx = y_plot(2, :);
J = dv_dx;
delta_v_star = v;
% Plot delta_v_star versus J
figure;
plot(delta_v_star, J);
xlabel(‘ delta_v_star’);
ylabel(‘J’);
title(‘Plot of delta_v_star verses current density (J)’);
legend(‘gamma = 1’, ‘gamma = 50’, ‘gamma = 100’, ‘gamma = 500’, ‘gamma = 1000’);
xlim([1e-4, 1e2]);
ylim([0, 70]);
end
i defined all the parameters but plot is not generating any mistakes in the code clear
%% %% current density equation J=dv/dx=0 at x=0 boundary condition
%% u=y(1)
%% v=y(2)
%% du/dx=dy(1)/dx=y(3)
%%d^2u/dx^2=dy(3)/dx=gamma*y(1)/(1+alpha*y(1)
%% dv/dx=dy(2)/dx=y(4)
%% d^2v/dx^2=dy(4)/dx=a*delta_v*y(4)-(2/epsilon)*gamma*y(1)/(1+alpha*y(1)
alpha = 0.1;
gamma = [1, 50, 100, 500, 1000];
epsilon = 1;
a = 1000;
fcn = @(x, y) [y(3); y(4); (gamma * y(1)) / (1 + alpha * y(1)); a * v * y(4) – (2 / epsilon) * (gamma * y(1)) / (1 + alpha * y(1))];
bc = @(ya, yb) [ya(1)-1; ya(2); yb(3); 0]; %% J=dv/dx=0 at x=0 so yb(4) is 0
guess = @(x) [1; 0; 0; 0]; %% at x=0, u=1, v=0, du/dx=0, dv/dx=0
xmesh = linspace(0, 1, 100);
solinit = bvpinit(xmesh, guess);
for i = 1:numel(gamma)
sol = bvp4c(fcn, bc, solinit);
y_plot = deval(sol, xmesh);
v = y_plot(1, :);
dv_dx = y_plot(2, :);
J = dv_dx;
delta_v_star = v;
% Plot delta_v_star versus J
figure;
plot(delta_v_star, J);
xlabel(‘ delta_v_star’);
ylabel(‘J’);
title(‘Plot of delta_v_star verses current density (J)’);
legend(‘gamma = 1’, ‘gamma = 50’, ‘gamma = 100’, ‘gamma = 500’, ‘gamma = 1000’);
xlim([1e-4, 1e2]);
ylim([0, 70]);
end
i defined all the parameters but plot is not generating any mistakes in the code boundary value problem MATLAB Answers — New Questions
Dot and Brace indexing is not supported for variables of this type in the Lifting wavelet transform artifact removal method .How can I solve this problem ?
% Plot the approximation coefficients at each level
for i = 1:level
subplot(level+1, 1, i+1);
plot(ca{i});
title([‘Approximation Coefficients at Level ‘ num2str(i)]);
end
% Plot the detail coefficients at each level
for i = 1:level
figure;
subplot(level, 1, i);
plot(cd{i});
title([‘Detail Coefficients at Level ‘ num2str(i)]);
end% Plot the approximation coefficients at each level
for i = 1:level
subplot(level+1, 1, i+1);
plot(ca{i});
title([‘Approximation Coefficients at Level ‘ num2str(i)]);
end
% Plot the detail coefficients at each level
for i = 1:level
figure;
subplot(level, 1, i);
plot(cd{i});
title([‘Detail Coefficients at Level ‘ num2str(i)]);
end % Plot the approximation coefficients at each level
for i = 1:level
subplot(level+1, 1, i+1);
plot(ca{i});
title([‘Approximation Coefficients at Level ‘ num2str(i)]);
end
% Plot the detail coefficients at each level
for i = 1:level
figure;
subplot(level, 1, i);
plot(cd{i});
title([‘Detail Coefficients at Level ‘ num2str(i)]);
end lwt, eeg signal processing, artifact MATLAB Answers — New Questions
How to port S-function across different architectures?
Hello,
I am dealing with the following problem. I am developing a custom Simulink block, based on C/C++ code in an S-Function. The code itself does not depend on libraries, or better, it depends on system libraries that are included with #ifdefs brackets in order to have a cross-platform implementation of the S-function.
However, I’m figuring out how to make the S-function portable, since the files that Simulink calls are pre-compiled depending on which host run the "Build" command in the S-function builder.
I am willing to make the source code available for the user to compile, but I still cannot figure which is the best way to make the user experience smooth. With libraries, I could just save the Simulink library and send the .slx file. With S-function, I could send the .c code but then the user has to load it into the S-function builder, run build, etc… it’s a bit cumbersome.
I found out that if I export a library with an S-function builder block, the code inside the block is retained when I send the library to other users. Morover, running the system automatically builds the S-function according to the architecture that is running the simulation. Is this the proper way to handle this issue? Should I send out Simulink libraries with S-function builder blocks with the portable C/C++ code inside? Or there’s a better alternative?
I also don’t particularly like the fact that the S-function build files are located in the current directory; is there any way to make the S-function builder output the files in a custom directory and automatically load the compile .mexXXX file from there without the user needing to tweak with the settings?Hello,
I am dealing with the following problem. I am developing a custom Simulink block, based on C/C++ code in an S-Function. The code itself does not depend on libraries, or better, it depends on system libraries that are included with #ifdefs brackets in order to have a cross-platform implementation of the S-function.
However, I’m figuring out how to make the S-function portable, since the files that Simulink calls are pre-compiled depending on which host run the "Build" command in the S-function builder.
I am willing to make the source code available for the user to compile, but I still cannot figure which is the best way to make the user experience smooth. With libraries, I could just save the Simulink library and send the .slx file. With S-function, I could send the .c code but then the user has to load it into the S-function builder, run build, etc… it’s a bit cumbersome.
I found out that if I export a library with an S-function builder block, the code inside the block is retained when I send the library to other users. Morover, running the system automatically builds the S-function according to the architecture that is running the simulation. Is this the proper way to handle this issue? Should I send out Simulink libraries with S-function builder blocks with the portable C/C++ code inside? Or there’s a better alternative?
I also don’t particularly like the fact that the S-function build files are located in the current directory; is there any way to make the S-function builder output the files in a custom directory and automatically load the compile .mexXXX file from there without the user needing to tweak with the settings? Hello,
I am dealing with the following problem. I am developing a custom Simulink block, based on C/C++ code in an S-Function. The code itself does not depend on libraries, or better, it depends on system libraries that are included with #ifdefs brackets in order to have a cross-platform implementation of the S-function.
However, I’m figuring out how to make the S-function portable, since the files that Simulink calls are pre-compiled depending on which host run the "Build" command in the S-function builder.
I am willing to make the source code available for the user to compile, but I still cannot figure which is the best way to make the user experience smooth. With libraries, I could just save the Simulink library and send the .slx file. With S-function, I could send the .c code but then the user has to load it into the S-function builder, run build, etc… it’s a bit cumbersome.
I found out that if I export a library with an S-function builder block, the code inside the block is retained when I send the library to other users. Morover, running the system automatically builds the S-function according to the architecture that is running the simulation. Is this the proper way to handle this issue? Should I send out Simulink libraries with S-function builder blocks with the portable C/C++ code inside? Or there’s a better alternative?
I also don’t particularly like the fact that the S-function build files are located in the current directory; is there any way to make the S-function builder output the files in a custom directory and automatically load the compile .mexXXX file from there without the user needing to tweak with the settings? simulink, s-function, export MATLAB Answers — New Questions
Why am I receiving the error?
Hello,
I’m receiving an error in my code when run. It shows
Error using pdepe
Unexpected output of PDEFUN. For this problem PDEFUN must return three column vectors of length 4.
I tried a lot to debug the error but is unsuccessful.
Hence, I request your generous help in this regard.
My code is slightly lengthy. Thus I’m not sure if I should insert it here or attach it along with this.
function pde2fshear_v4Perturbed_randomWalk
global chi0; % declare global variables
global D0;
global chi1;
global D1;
global alpha_chi;
global alpha_D;
global H0;
global S0;
global H;
global S;
global data;
global track;
global xstep;
global tstep;
global count;
global chi_growth;
global lambda_suppress;
global v_e;
global chi_ano;
global D_ano;
global sigma_turb;
global gamma_nonlin;
global alpha_nonlin;
global group_vel;
global drift_vel;
global intensity_diff;
global drift_velFluct;
%define values for constants
data.constant.critgradpressure = 1.2;
data.constant.critgraddensity = 1.0;
count = 1;
chi0 = 0.5;
D0 = 0.5;
chi1 = 5.0;
D1 = 5.0;
alpha_chi = 0.1;
alpha_D = 0.1;
H0 = 27;
S0 = 21;
track = 1;
chi_growth=20;
lambda_suppress=0.5 ;
sigma_turb=0.5;
chi_ano=10;
D_ano=10;
% For random walk model
gamma_nonlin = 5;
alpha_nonlin = 1;
%position and time grids information
xstep = 100;
tstep = 100;
xmin = 0;
xmax = 1;
tmin = 0;
tmax = 10;
%tmax = 1;
m = 0; %define type of equation to solve
%Preallocate vectors for speed improvement
grad_u1 = zeros(tstep,xstep);
grad_u2 = zeros(tstep,xstep);
grad_u3 = zeros(tstep,xstep);
grad_u4 = zeros(tstep,xstep);
curve_u1 = zeros(tstep,xstep);
curve_u2 = zeros(tstep,xstep);
curve_u3 = zeros(tstep,xstep);
curve_u4 = zeros(tstep,xstep);
flowshear_p = zeros(tstep,xstep);
flowshear_n = zeros(tstep,xstep);
Q = zeros(tstep,xstep);
Q0 = zeros(tstep,xstep);
Q1 = zeros(tstep,xstep);
neo_p = zeros(tstep,xstep);
ano_p = zeros(tstep,xstep);
Gam = zeros(tstep,xstep);
Gam0 = zeros(tstep,xstep);
Gam1 = zeros(tstep,xstep);
neo_n = zeros(tstep,xstep);
ano_n = zeros(tstep,xstep);
%x = linspace(xmin,xmax/2,xstep/5);
x = linspace(xmin,xmax,xstep);
t = linspace(tmin,tmax,tstep);
data.variable.x = x;
sol = pdepe(m,@pdex2pde,@pdex2ic,@pdex2bc,x,t);
% Extract the first solution component as u1 = pressure
% second solution component as u2 = density
% third solution component as u3 = turbulence intensity
% fourth solution component as u4 = intensity_diff
u1 = sol(:,:,1);
u2 = sol(:,:,2);
u3 = sol(:,:,3);
u4 = sol(:,:,4);
%grad_u = gradient(u,(x(2)-x(1)));
for j=1:tstep
for i = 1:xstep/5
if i == 1
grad_u1(j,i) = (u1(j,2)-u1(j,1))/(x(2)-x(1));
grad_u2(j,i) = (u2(j,2)-u2(j,1))/(x(2)-x(1));
grad_u3(j,i) = (u3(j,2)-u3(j,1))/(x(2)-x(1));
grad_u4(j,i) = (u4(j,2)-u4(j,1))/(x(2)-x(1));
elseif i == xstep/5
grad_u1(j,i) = (u1(j,i)-u1(j,i-1))/(x(i)-x(i-1));
grad_u2(j,i) = (u2(j,i)-u2(j,i-1))/(x(i)-x(i-1));
grad_u3(j,i) = (u3(j,i)-u3(j,i-1))/(x(i)-x(i-1));
grad_u4(j,i) = (u4(j,i)-u4(j,i-1))/(x(i)-x(i-1));
else
grad_u1(j,i) = (u1(j,i+1)-u1(j,i-1))/(x(i+1)-x(i-1));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i-1))/(x(i+1)-x(i-1));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i-1))/(x(i+1)-x(i-1));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i-1))/(x(i+1)-x(i-1));
end
end
for i=(xstep/5)+1:xstep
if i == xstep/5+1
grad_u1(j,i) = (u1(j,i+1)-u1(j,i))/(x(i+1)-x(i));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i))/(x(i+1)-x(i));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i))/(x(i+1)-x(i));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i))/(x(i+1)-x(i));
elseif i == xstep
grad_u1(j,i) = (u1(j,i)-u1(j,i-1))/(x(i)-x(i-1));
grad_u2(j,i) = (u2(j,i)-u2(j,i-1))/(x(i)-x(i-1));
grad_u3(j,i) = (u3(j,i)-u3(j,i-1))/(x(i)-x(i-1));
grad_u4(j,i) = (u4(j,i)-u4(j,i-1))/(x(i)-x(i-1));
else
grad_u1(j,i) = (u1(j,i+1)-u1(j,i-1))/(x(i+1)-x(i-1));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i-1))/(x(i+1)-x(i-1));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i-1))/(x(i+1)-x(i-1));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i-1))/(x(i+1)-x(i-1));
end
end
end
for i=1:tstep
for j=1:xstep
v_e = -grad_u1(i,j)*grad_u2(i,j)/u2(i,j)^2; % -g_p*g_n/n^2
flowshear_p(i,j) = 1+ alpha_chi*v_e^2;
flowshear_n(i,j) = 1+ alpha_D*v_e^2;
if abs(grad_u1(i,j)) < abs(data.constant.critgradpressure) %&& abs(grad_u2(i,j)) < abs(data.constant.critgraddensity)
Q(i,j) = -grad_u1(i,j)*chi0;
Q0(i,j) = Q(i,j);
Q1(i,j) = 0;
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = 0;
Gam(i,j) = -grad_u2(i,j)*D0;
Gam0(i,j) = Gam(i,j);
Gam1(i,j) = 0;
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = 0;
elseif abs(grad_u1(i,j)) >= abs(data.constant.critgradpressure) %&& abs(grad_u2(i,j)) < abs(data.constant.critgraddensity)
Q(i,j) = (chi0*(-grad_u1(i,j)) + chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
Q0(i,j) = -grad_u1(i,j)*chi0;
Q1(i,j) = (chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = chi_ano*(abs(grad_u1(i,j))+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j)*(-grad_u1(i,j));
Gam(i,j) = -grad_u2(i,j)*D0;
Gam0(i,j) = Gam(i,j);
Gam1(i,j) = 0;
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = 0;
else
Q(i,j) = (chi0*(-grad_u1(i,j)) + chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
Q0(i,j) = -grad_u1(i,j)*chi0;
Q1(i,j) = (chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = chi_ano*(abs(grad_u1(i,j))+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j)*(-grad_u1(i,j));
Gam(i,j) = -grad_u2(i,j)*(D0 + D_ano*(-grad_u2(i,j)+data.constant.critgraddensity)*u3(i,j)/flowshear_n(i,j));
Gam0(i,j) = -grad_u2(i,j)*D0;
Gam1(i,j) = -grad_u2(i,j)*D_ano*(-grad_u2(i,j)+data.constant.critgraddensity)*u3(i,j)/flowshear_n(i,j);
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = D_ano*(abs(grad_u2(i,j))+data.constant.critgraddensity)/flowshear_n(i,j);
end
end
end
%curve_u = gradient(grad_u,(x(2)-x(1)));
for j=1:tstep
for i = 1:xstep/5
if i == 1
curve_u1(j,i) = (grad_u1(j,2)-grad_u1(j,1))/(x(2)-x(1));
curve_u2(j,i) = (grad_u2(j,2)-grad_u2(j,1))/(x(2)-x(1));
curve_u3(j,i) = (grad_u3(j,2)-grad_u3(j,1))/(x(2)-x(1));
curve_u4(j,i) = (grad_u4(j,2)-grad_u4(j,1))/(x(2)-x(1));
elseif i == xstep/5
curve_u1(j,i) = (grad_u1(j,i)-grad_u1(j,i-1))/(x(i)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i)-grad_u2(j,i-1))/(x(i)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i)-grad_u3(j,i-1))/(x(i)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i)-grad_u4(j,i-1))/(x(i)-x(i-1));
else
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i-1))/(x(i+1)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i-1))/(x(i+1)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i-1))/(x(i+1)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i-1))/(x(i+1)-x(i-1));
end
end
for i=(xstep/5)+1:xstep
if i == xstep/5+1
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i))/(x(i+1)-x(i));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i))/(x(i+1)-x(i));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i))/(x(i+1)-x(i));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i))/(x(i+1)-x(i));
elseif i == xstep
curve_u1(j,i) = (grad_u1(j,i)-grad_u1(j,i-1))/(x(i)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i)-grad_u2(j,i-1))/(x(i)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i)-grad_u3(j,i-1))/(x(i)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i)-grad_u4(j,i-1))/(x(i)-x(i-1));
else
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i-1))/(x(i+1)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i-1))/(x(i+1)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i-1))/(x(i+1)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i-1))/(x(i+1)-x(i-1));
end
end
end
%to save parameters and variables
data.constant.chi0 = chi0;
data.constant.D0 = D0;
data.constant.chi1 = chi1;
data.constant.D1 = D1;
data.constant.alphachi = alpha_chi;
data.constant.alphaD = alpha_D;
data.constant.H0 = H0;
data.constant.S0 = S0;
data.variable.pressure = u1;
data.variable.density = u2;
data.variable.turbulence = u3;
data.variable.intensity_diff = u4;
data.variable.drift_velFluct = drift_velFluct;
data.variable.gradpressure = grad_u1;
data.variable.graddensity = grad_u2;
data.variable.gradintensity = grad_u3;
data.variable.curvepressure = curve_u1;
data.variable.curvedensity = curve_u2;
data.variable.curveturbulence = curve_u3;
data.variable.x = x;
data.variable.t = t;
data.variable.Q = Q;
data.variable.Gamma = Gam;
data.variable.Q0 = Q0;
data.variable.Gamma0 = Gam0;
data.variable.neo_P = neo_p;
data.variable.neo_n = neo_n;
data.variable.Q1 = Q1;
data.variable.Gam1 = Gam1;
data.variable.ano_p = ano_p;
data.variable.ano_n = ano_n;
data.variable.heatsource = H;
data.variable.particlesource = S;
data.variable.wexb_p = flowshear_p;
data.variable.wexb_n = flowshear_n;
data.control.xgrid = xstep;
data.control.tgrid = tstep;
data.control.xmin = xmin;
data.control.xmax = xmax;
data.control.tmin = tmin;
data.control.tmax = tmax;
% ————————————————————–
function [c,f,s] = pdex2pde(x,t,u,DuDx)
global chi0;
global D0;
global chi1;
global D1;
global H0;
global S0;
global data;
global track;
global xstep;
global alpha_chi;
global alpha_D;
global chi_growth; % total growth rate
global length;
global theta_heaviside1;
global lambda_suppress;
global v_e;
global gamma_nonlin;
global alpha_nonlin;
global group_vel;
global drift_vel;
global intensity_diff;
global drift_velFluct;
%lf FFf F Fb vfDdength = 0.01 or 1
length=1;
group_vel = 1;
D_0 = 1;
c = [1;1;1;1];
v_e = -DuDx(1)*DuDx(2)/u(2)^2; % -g_p*g_n/n^2
flowshear_p = 1+ alpha_chi*v_e^2;
flowshear_n = 1+ alpha_D*v_e^2;
term1 = abs(DuDx(1))-data.constant.critgradpressure;
intensity_diff = D_0*u(3)^alpha_nonlin;
drift_velFluct = DuDx(4);
drift_vel = group_vel + drift_velFluct;
% Implementing Heaviside function for H-mode in p, n and I equations
if term1 > 0
theta_heaviside1=1;
else
theta_heaviside1=0;
end
%Turbulence intensity Equation for random walk
s3 = (chi_growth*(term1*theta_heaviside1-lambda_suppress*v_e^2)-gamma_nonlin*u(3)^alpha_nonlin)*u(3)-drift_vel*DuDx ;
s = [(H0)*exp(-100*x^2/length)+H0/2; (S0)*exp(-100*(x-0.9)^2/length)+S0/2; s3;0];
f = [chi0+chi1*u(3)/flowshear_p ; D0+D1*u(3)/flowshear_n ;intensity_diff*u(3); intensity_diff].*DuDx; % flux term for random walk model
disp(f);
disp(s);
% ————————————————————–
function u0 = pdex2ic(x)
%u0 = [eps; eps; eps];
%u0 = [0.01; 0.01; 0.1*exp(-100*(x-1)^2)];
u0 = [0.4*(1-x^2); 0.4*(1-x^2); 0.4*(1-x^2);0.5*exp(-100*(x-1)^2)];
% ————————————————————–
function [pl,ql,pr,qr] = pdex2bc(xl,ul,xr,ur,t)
pl = [0; 0; 0;0];
ql = [1; 1; 1;1];
pr = [ur(1); ur(2);0; ur(4)];
qr = [eps; 0.1; 1;1];
% qr = [0; 0.1; 1];
%qr = [0; eps; 1];
%—————————————————————Hello,
I’m receiving an error in my code when run. It shows
Error using pdepe
Unexpected output of PDEFUN. For this problem PDEFUN must return three column vectors of length 4.
I tried a lot to debug the error but is unsuccessful.
Hence, I request your generous help in this regard.
My code is slightly lengthy. Thus I’m not sure if I should insert it here or attach it along with this.
function pde2fshear_v4Perturbed_randomWalk
global chi0; % declare global variables
global D0;
global chi1;
global D1;
global alpha_chi;
global alpha_D;
global H0;
global S0;
global H;
global S;
global data;
global track;
global xstep;
global tstep;
global count;
global chi_growth;
global lambda_suppress;
global v_e;
global chi_ano;
global D_ano;
global sigma_turb;
global gamma_nonlin;
global alpha_nonlin;
global group_vel;
global drift_vel;
global intensity_diff;
global drift_velFluct;
%define values for constants
data.constant.critgradpressure = 1.2;
data.constant.critgraddensity = 1.0;
count = 1;
chi0 = 0.5;
D0 = 0.5;
chi1 = 5.0;
D1 = 5.0;
alpha_chi = 0.1;
alpha_D = 0.1;
H0 = 27;
S0 = 21;
track = 1;
chi_growth=20;
lambda_suppress=0.5 ;
sigma_turb=0.5;
chi_ano=10;
D_ano=10;
% For random walk model
gamma_nonlin = 5;
alpha_nonlin = 1;
%position and time grids information
xstep = 100;
tstep = 100;
xmin = 0;
xmax = 1;
tmin = 0;
tmax = 10;
%tmax = 1;
m = 0; %define type of equation to solve
%Preallocate vectors for speed improvement
grad_u1 = zeros(tstep,xstep);
grad_u2 = zeros(tstep,xstep);
grad_u3 = zeros(tstep,xstep);
grad_u4 = zeros(tstep,xstep);
curve_u1 = zeros(tstep,xstep);
curve_u2 = zeros(tstep,xstep);
curve_u3 = zeros(tstep,xstep);
curve_u4 = zeros(tstep,xstep);
flowshear_p = zeros(tstep,xstep);
flowshear_n = zeros(tstep,xstep);
Q = zeros(tstep,xstep);
Q0 = zeros(tstep,xstep);
Q1 = zeros(tstep,xstep);
neo_p = zeros(tstep,xstep);
ano_p = zeros(tstep,xstep);
Gam = zeros(tstep,xstep);
Gam0 = zeros(tstep,xstep);
Gam1 = zeros(tstep,xstep);
neo_n = zeros(tstep,xstep);
ano_n = zeros(tstep,xstep);
%x = linspace(xmin,xmax/2,xstep/5);
x = linspace(xmin,xmax,xstep);
t = linspace(tmin,tmax,tstep);
data.variable.x = x;
sol = pdepe(m,@pdex2pde,@pdex2ic,@pdex2bc,x,t);
% Extract the first solution component as u1 = pressure
% second solution component as u2 = density
% third solution component as u3 = turbulence intensity
% fourth solution component as u4 = intensity_diff
u1 = sol(:,:,1);
u2 = sol(:,:,2);
u3 = sol(:,:,3);
u4 = sol(:,:,4);
%grad_u = gradient(u,(x(2)-x(1)));
for j=1:tstep
for i = 1:xstep/5
if i == 1
grad_u1(j,i) = (u1(j,2)-u1(j,1))/(x(2)-x(1));
grad_u2(j,i) = (u2(j,2)-u2(j,1))/(x(2)-x(1));
grad_u3(j,i) = (u3(j,2)-u3(j,1))/(x(2)-x(1));
grad_u4(j,i) = (u4(j,2)-u4(j,1))/(x(2)-x(1));
elseif i == xstep/5
grad_u1(j,i) = (u1(j,i)-u1(j,i-1))/(x(i)-x(i-1));
grad_u2(j,i) = (u2(j,i)-u2(j,i-1))/(x(i)-x(i-1));
grad_u3(j,i) = (u3(j,i)-u3(j,i-1))/(x(i)-x(i-1));
grad_u4(j,i) = (u4(j,i)-u4(j,i-1))/(x(i)-x(i-1));
else
grad_u1(j,i) = (u1(j,i+1)-u1(j,i-1))/(x(i+1)-x(i-1));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i-1))/(x(i+1)-x(i-1));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i-1))/(x(i+1)-x(i-1));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i-1))/(x(i+1)-x(i-1));
end
end
for i=(xstep/5)+1:xstep
if i == xstep/5+1
grad_u1(j,i) = (u1(j,i+1)-u1(j,i))/(x(i+1)-x(i));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i))/(x(i+1)-x(i));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i))/(x(i+1)-x(i));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i))/(x(i+1)-x(i));
elseif i == xstep
grad_u1(j,i) = (u1(j,i)-u1(j,i-1))/(x(i)-x(i-1));
grad_u2(j,i) = (u2(j,i)-u2(j,i-1))/(x(i)-x(i-1));
grad_u3(j,i) = (u3(j,i)-u3(j,i-1))/(x(i)-x(i-1));
grad_u4(j,i) = (u4(j,i)-u4(j,i-1))/(x(i)-x(i-1));
else
grad_u1(j,i) = (u1(j,i+1)-u1(j,i-1))/(x(i+1)-x(i-1));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i-1))/(x(i+1)-x(i-1));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i-1))/(x(i+1)-x(i-1));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i-1))/(x(i+1)-x(i-1));
end
end
end
for i=1:tstep
for j=1:xstep
v_e = -grad_u1(i,j)*grad_u2(i,j)/u2(i,j)^2; % -g_p*g_n/n^2
flowshear_p(i,j) = 1+ alpha_chi*v_e^2;
flowshear_n(i,j) = 1+ alpha_D*v_e^2;
if abs(grad_u1(i,j)) < abs(data.constant.critgradpressure) %&& abs(grad_u2(i,j)) < abs(data.constant.critgraddensity)
Q(i,j) = -grad_u1(i,j)*chi0;
Q0(i,j) = Q(i,j);
Q1(i,j) = 0;
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = 0;
Gam(i,j) = -grad_u2(i,j)*D0;
Gam0(i,j) = Gam(i,j);
Gam1(i,j) = 0;
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = 0;
elseif abs(grad_u1(i,j)) >= abs(data.constant.critgradpressure) %&& abs(grad_u2(i,j)) < abs(data.constant.critgraddensity)
Q(i,j) = (chi0*(-grad_u1(i,j)) + chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
Q0(i,j) = -grad_u1(i,j)*chi0;
Q1(i,j) = (chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = chi_ano*(abs(grad_u1(i,j))+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j)*(-grad_u1(i,j));
Gam(i,j) = -grad_u2(i,j)*D0;
Gam0(i,j) = Gam(i,j);
Gam1(i,j) = 0;
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = 0;
else
Q(i,j) = (chi0*(-grad_u1(i,j)) + chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
Q0(i,j) = -grad_u1(i,j)*chi0;
Q1(i,j) = (chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = chi_ano*(abs(grad_u1(i,j))+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j)*(-grad_u1(i,j));
Gam(i,j) = -grad_u2(i,j)*(D0 + D_ano*(-grad_u2(i,j)+data.constant.critgraddensity)*u3(i,j)/flowshear_n(i,j));
Gam0(i,j) = -grad_u2(i,j)*D0;
Gam1(i,j) = -grad_u2(i,j)*D_ano*(-grad_u2(i,j)+data.constant.critgraddensity)*u3(i,j)/flowshear_n(i,j);
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = D_ano*(abs(grad_u2(i,j))+data.constant.critgraddensity)/flowshear_n(i,j);
end
end
end
%curve_u = gradient(grad_u,(x(2)-x(1)));
for j=1:tstep
for i = 1:xstep/5
if i == 1
curve_u1(j,i) = (grad_u1(j,2)-grad_u1(j,1))/(x(2)-x(1));
curve_u2(j,i) = (grad_u2(j,2)-grad_u2(j,1))/(x(2)-x(1));
curve_u3(j,i) = (grad_u3(j,2)-grad_u3(j,1))/(x(2)-x(1));
curve_u4(j,i) = (grad_u4(j,2)-grad_u4(j,1))/(x(2)-x(1));
elseif i == xstep/5
curve_u1(j,i) = (grad_u1(j,i)-grad_u1(j,i-1))/(x(i)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i)-grad_u2(j,i-1))/(x(i)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i)-grad_u3(j,i-1))/(x(i)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i)-grad_u4(j,i-1))/(x(i)-x(i-1));
else
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i-1))/(x(i+1)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i-1))/(x(i+1)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i-1))/(x(i+1)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i-1))/(x(i+1)-x(i-1));
end
end
for i=(xstep/5)+1:xstep
if i == xstep/5+1
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i))/(x(i+1)-x(i));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i))/(x(i+1)-x(i));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i))/(x(i+1)-x(i));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i))/(x(i+1)-x(i));
elseif i == xstep
curve_u1(j,i) = (grad_u1(j,i)-grad_u1(j,i-1))/(x(i)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i)-grad_u2(j,i-1))/(x(i)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i)-grad_u3(j,i-1))/(x(i)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i)-grad_u4(j,i-1))/(x(i)-x(i-1));
else
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i-1))/(x(i+1)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i-1))/(x(i+1)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i-1))/(x(i+1)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i-1))/(x(i+1)-x(i-1));
end
end
end
%to save parameters and variables
data.constant.chi0 = chi0;
data.constant.D0 = D0;
data.constant.chi1 = chi1;
data.constant.D1 = D1;
data.constant.alphachi = alpha_chi;
data.constant.alphaD = alpha_D;
data.constant.H0 = H0;
data.constant.S0 = S0;
data.variable.pressure = u1;
data.variable.density = u2;
data.variable.turbulence = u3;
data.variable.intensity_diff = u4;
data.variable.drift_velFluct = drift_velFluct;
data.variable.gradpressure = grad_u1;
data.variable.graddensity = grad_u2;
data.variable.gradintensity = grad_u3;
data.variable.curvepressure = curve_u1;
data.variable.curvedensity = curve_u2;
data.variable.curveturbulence = curve_u3;
data.variable.x = x;
data.variable.t = t;
data.variable.Q = Q;
data.variable.Gamma = Gam;
data.variable.Q0 = Q0;
data.variable.Gamma0 = Gam0;
data.variable.neo_P = neo_p;
data.variable.neo_n = neo_n;
data.variable.Q1 = Q1;
data.variable.Gam1 = Gam1;
data.variable.ano_p = ano_p;
data.variable.ano_n = ano_n;
data.variable.heatsource = H;
data.variable.particlesource = S;
data.variable.wexb_p = flowshear_p;
data.variable.wexb_n = flowshear_n;
data.control.xgrid = xstep;
data.control.tgrid = tstep;
data.control.xmin = xmin;
data.control.xmax = xmax;
data.control.tmin = tmin;
data.control.tmax = tmax;
% ————————————————————–
function [c,f,s] = pdex2pde(x,t,u,DuDx)
global chi0;
global D0;
global chi1;
global D1;
global H0;
global S0;
global data;
global track;
global xstep;
global alpha_chi;
global alpha_D;
global chi_growth; % total growth rate
global length;
global theta_heaviside1;
global lambda_suppress;
global v_e;
global gamma_nonlin;
global alpha_nonlin;
global group_vel;
global drift_vel;
global intensity_diff;
global drift_velFluct;
%lf FFf F Fb vfDdength = 0.01 or 1
length=1;
group_vel = 1;
D_0 = 1;
c = [1;1;1;1];
v_e = -DuDx(1)*DuDx(2)/u(2)^2; % -g_p*g_n/n^2
flowshear_p = 1+ alpha_chi*v_e^2;
flowshear_n = 1+ alpha_D*v_e^2;
term1 = abs(DuDx(1))-data.constant.critgradpressure;
intensity_diff = D_0*u(3)^alpha_nonlin;
drift_velFluct = DuDx(4);
drift_vel = group_vel + drift_velFluct;
% Implementing Heaviside function for H-mode in p, n and I equations
if term1 > 0
theta_heaviside1=1;
else
theta_heaviside1=0;
end
%Turbulence intensity Equation for random walk
s3 = (chi_growth*(term1*theta_heaviside1-lambda_suppress*v_e^2)-gamma_nonlin*u(3)^alpha_nonlin)*u(3)-drift_vel*DuDx ;
s = [(H0)*exp(-100*x^2/length)+H0/2; (S0)*exp(-100*(x-0.9)^2/length)+S0/2; s3;0];
f = [chi0+chi1*u(3)/flowshear_p ; D0+D1*u(3)/flowshear_n ;intensity_diff*u(3); intensity_diff].*DuDx; % flux term for random walk model
disp(f);
disp(s);
% ————————————————————–
function u0 = pdex2ic(x)
%u0 = [eps; eps; eps];
%u0 = [0.01; 0.01; 0.1*exp(-100*(x-1)^2)];
u0 = [0.4*(1-x^2); 0.4*(1-x^2); 0.4*(1-x^2);0.5*exp(-100*(x-1)^2)];
% ————————————————————–
function [pl,ql,pr,qr] = pdex2bc(xl,ul,xr,ur,t)
pl = [0; 0; 0;0];
ql = [1; 1; 1;1];
pr = [ur(1); ur(2);0; ur(4)];
qr = [eps; 0.1; 1;1];
% qr = [0; 0.1; 1];
%qr = [0; eps; 1];
%————————————————————— Hello,
I’m receiving an error in my code when run. It shows
Error using pdepe
Unexpected output of PDEFUN. For this problem PDEFUN must return three column vectors of length 4.
I tried a lot to debug the error but is unsuccessful.
Hence, I request your generous help in this regard.
My code is slightly lengthy. Thus I’m not sure if I should insert it here or attach it along with this.
function pde2fshear_v4Perturbed_randomWalk
global chi0; % declare global variables
global D0;
global chi1;
global D1;
global alpha_chi;
global alpha_D;
global H0;
global S0;
global H;
global S;
global data;
global track;
global xstep;
global tstep;
global count;
global chi_growth;
global lambda_suppress;
global v_e;
global chi_ano;
global D_ano;
global sigma_turb;
global gamma_nonlin;
global alpha_nonlin;
global group_vel;
global drift_vel;
global intensity_diff;
global drift_velFluct;
%define values for constants
data.constant.critgradpressure = 1.2;
data.constant.critgraddensity = 1.0;
count = 1;
chi0 = 0.5;
D0 = 0.5;
chi1 = 5.0;
D1 = 5.0;
alpha_chi = 0.1;
alpha_D = 0.1;
H0 = 27;
S0 = 21;
track = 1;
chi_growth=20;
lambda_suppress=0.5 ;
sigma_turb=0.5;
chi_ano=10;
D_ano=10;
% For random walk model
gamma_nonlin = 5;
alpha_nonlin = 1;
%position and time grids information
xstep = 100;
tstep = 100;
xmin = 0;
xmax = 1;
tmin = 0;
tmax = 10;
%tmax = 1;
m = 0; %define type of equation to solve
%Preallocate vectors for speed improvement
grad_u1 = zeros(tstep,xstep);
grad_u2 = zeros(tstep,xstep);
grad_u3 = zeros(tstep,xstep);
grad_u4 = zeros(tstep,xstep);
curve_u1 = zeros(tstep,xstep);
curve_u2 = zeros(tstep,xstep);
curve_u3 = zeros(tstep,xstep);
curve_u4 = zeros(tstep,xstep);
flowshear_p = zeros(tstep,xstep);
flowshear_n = zeros(tstep,xstep);
Q = zeros(tstep,xstep);
Q0 = zeros(tstep,xstep);
Q1 = zeros(tstep,xstep);
neo_p = zeros(tstep,xstep);
ano_p = zeros(tstep,xstep);
Gam = zeros(tstep,xstep);
Gam0 = zeros(tstep,xstep);
Gam1 = zeros(tstep,xstep);
neo_n = zeros(tstep,xstep);
ano_n = zeros(tstep,xstep);
%x = linspace(xmin,xmax/2,xstep/5);
x = linspace(xmin,xmax,xstep);
t = linspace(tmin,tmax,tstep);
data.variable.x = x;
sol = pdepe(m,@pdex2pde,@pdex2ic,@pdex2bc,x,t);
% Extract the first solution component as u1 = pressure
% second solution component as u2 = density
% third solution component as u3 = turbulence intensity
% fourth solution component as u4 = intensity_diff
u1 = sol(:,:,1);
u2 = sol(:,:,2);
u3 = sol(:,:,3);
u4 = sol(:,:,4);
%grad_u = gradient(u,(x(2)-x(1)));
for j=1:tstep
for i = 1:xstep/5
if i == 1
grad_u1(j,i) = (u1(j,2)-u1(j,1))/(x(2)-x(1));
grad_u2(j,i) = (u2(j,2)-u2(j,1))/(x(2)-x(1));
grad_u3(j,i) = (u3(j,2)-u3(j,1))/(x(2)-x(1));
grad_u4(j,i) = (u4(j,2)-u4(j,1))/(x(2)-x(1));
elseif i == xstep/5
grad_u1(j,i) = (u1(j,i)-u1(j,i-1))/(x(i)-x(i-1));
grad_u2(j,i) = (u2(j,i)-u2(j,i-1))/(x(i)-x(i-1));
grad_u3(j,i) = (u3(j,i)-u3(j,i-1))/(x(i)-x(i-1));
grad_u4(j,i) = (u4(j,i)-u4(j,i-1))/(x(i)-x(i-1));
else
grad_u1(j,i) = (u1(j,i+1)-u1(j,i-1))/(x(i+1)-x(i-1));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i-1))/(x(i+1)-x(i-1));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i-1))/(x(i+1)-x(i-1));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i-1))/(x(i+1)-x(i-1));
end
end
for i=(xstep/5)+1:xstep
if i == xstep/5+1
grad_u1(j,i) = (u1(j,i+1)-u1(j,i))/(x(i+1)-x(i));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i))/(x(i+1)-x(i));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i))/(x(i+1)-x(i));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i))/(x(i+1)-x(i));
elseif i == xstep
grad_u1(j,i) = (u1(j,i)-u1(j,i-1))/(x(i)-x(i-1));
grad_u2(j,i) = (u2(j,i)-u2(j,i-1))/(x(i)-x(i-1));
grad_u3(j,i) = (u3(j,i)-u3(j,i-1))/(x(i)-x(i-1));
grad_u4(j,i) = (u4(j,i)-u4(j,i-1))/(x(i)-x(i-1));
else
grad_u1(j,i) = (u1(j,i+1)-u1(j,i-1))/(x(i+1)-x(i-1));
grad_u2(j,i) = (u2(j,i+1)-u2(j,i-1))/(x(i+1)-x(i-1));
grad_u3(j,i) = (u3(j,i+1)-u3(j,i-1))/(x(i+1)-x(i-1));
grad_u4(j,i) = (u4(j,i+1)-u4(j,i-1))/(x(i+1)-x(i-1));
end
end
end
for i=1:tstep
for j=1:xstep
v_e = -grad_u1(i,j)*grad_u2(i,j)/u2(i,j)^2; % -g_p*g_n/n^2
flowshear_p(i,j) = 1+ alpha_chi*v_e^2;
flowshear_n(i,j) = 1+ alpha_D*v_e^2;
if abs(grad_u1(i,j)) < abs(data.constant.critgradpressure) %&& abs(grad_u2(i,j)) < abs(data.constant.critgraddensity)
Q(i,j) = -grad_u1(i,j)*chi0;
Q0(i,j) = Q(i,j);
Q1(i,j) = 0;
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = 0;
Gam(i,j) = -grad_u2(i,j)*D0;
Gam0(i,j) = Gam(i,j);
Gam1(i,j) = 0;
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = 0;
elseif abs(grad_u1(i,j)) >= abs(data.constant.critgradpressure) %&& abs(grad_u2(i,j)) < abs(data.constant.critgraddensity)
Q(i,j) = (chi0*(-grad_u1(i,j)) + chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
Q0(i,j) = -grad_u1(i,j)*chi0;
Q1(i,j) = (chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = chi_ano*(abs(grad_u1(i,j))+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j)*(-grad_u1(i,j));
Gam(i,j) = -grad_u2(i,j)*D0;
Gam0(i,j) = Gam(i,j);
Gam1(i,j) = 0;
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = 0;
else
Q(i,j) = (chi0*(-grad_u1(i,j)) + chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
Q0(i,j) = -grad_u1(i,j)*chi0;
Q1(i,j) = (chi_ano*(-grad_u1(i,j)+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j))*(-grad_u1(i,j));
neo_p(i,j) = chi0*(1+grad_u1(i,j))/(1+grad_u1(i,j));
ano_p(i,j) = chi_ano*(abs(grad_u1(i,j))+data.constant.critgradpressure)*u3(i,j)/flowshear_p(i,j)*(-grad_u1(i,j));
Gam(i,j) = -grad_u2(i,j)*(D0 + D_ano*(-grad_u2(i,j)+data.constant.critgraddensity)*u3(i,j)/flowshear_n(i,j));
Gam0(i,j) = -grad_u2(i,j)*D0;
Gam1(i,j) = -grad_u2(i,j)*D_ano*(-grad_u2(i,j)+data.constant.critgraddensity)*u3(i,j)/flowshear_n(i,j);
neo_n(i,j) = D0*(1+grad_u2(i,j))/(1+grad_u2(i,j));
ano_n(i,j) = D_ano*(abs(grad_u2(i,j))+data.constant.critgraddensity)/flowshear_n(i,j);
end
end
end
%curve_u = gradient(grad_u,(x(2)-x(1)));
for j=1:tstep
for i = 1:xstep/5
if i == 1
curve_u1(j,i) = (grad_u1(j,2)-grad_u1(j,1))/(x(2)-x(1));
curve_u2(j,i) = (grad_u2(j,2)-grad_u2(j,1))/(x(2)-x(1));
curve_u3(j,i) = (grad_u3(j,2)-grad_u3(j,1))/(x(2)-x(1));
curve_u4(j,i) = (grad_u4(j,2)-grad_u4(j,1))/(x(2)-x(1));
elseif i == xstep/5
curve_u1(j,i) = (grad_u1(j,i)-grad_u1(j,i-1))/(x(i)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i)-grad_u2(j,i-1))/(x(i)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i)-grad_u3(j,i-1))/(x(i)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i)-grad_u4(j,i-1))/(x(i)-x(i-1));
else
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i-1))/(x(i+1)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i-1))/(x(i+1)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i-1))/(x(i+1)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i-1))/(x(i+1)-x(i-1));
end
end
for i=(xstep/5)+1:xstep
if i == xstep/5+1
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i))/(x(i+1)-x(i));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i))/(x(i+1)-x(i));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i))/(x(i+1)-x(i));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i))/(x(i+1)-x(i));
elseif i == xstep
curve_u1(j,i) = (grad_u1(j,i)-grad_u1(j,i-1))/(x(i)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i)-grad_u2(j,i-1))/(x(i)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i)-grad_u3(j,i-1))/(x(i)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i)-grad_u4(j,i-1))/(x(i)-x(i-1));
else
curve_u1(j,i) = (grad_u1(j,i+1)-grad_u1(j,i-1))/(x(i+1)-x(i-1));
curve_u2(j,i) = (grad_u2(j,i+1)-grad_u2(j,i-1))/(x(i+1)-x(i-1));
curve_u3(j,i) = (grad_u3(j,i+1)-grad_u3(j,i-1))/(x(i+1)-x(i-1));
curve_u4(j,i) = (grad_u4(j,i+1)-grad_u4(j,i-1))/(x(i+1)-x(i-1));
end
end
end
%to save parameters and variables
data.constant.chi0 = chi0;
data.constant.D0 = D0;
data.constant.chi1 = chi1;
data.constant.D1 = D1;
data.constant.alphachi = alpha_chi;
data.constant.alphaD = alpha_D;
data.constant.H0 = H0;
data.constant.S0 = S0;
data.variable.pressure = u1;
data.variable.density = u2;
data.variable.turbulence = u3;
data.variable.intensity_diff = u4;
data.variable.drift_velFluct = drift_velFluct;
data.variable.gradpressure = grad_u1;
data.variable.graddensity = grad_u2;
data.variable.gradintensity = grad_u3;
data.variable.curvepressure = curve_u1;
data.variable.curvedensity = curve_u2;
data.variable.curveturbulence = curve_u3;
data.variable.x = x;
data.variable.t = t;
data.variable.Q = Q;
data.variable.Gamma = Gam;
data.variable.Q0 = Q0;
data.variable.Gamma0 = Gam0;
data.variable.neo_P = neo_p;
data.variable.neo_n = neo_n;
data.variable.Q1 = Q1;
data.variable.Gam1 = Gam1;
data.variable.ano_p = ano_p;
data.variable.ano_n = ano_n;
data.variable.heatsource = H;
data.variable.particlesource = S;
data.variable.wexb_p = flowshear_p;
data.variable.wexb_n = flowshear_n;
data.control.xgrid = xstep;
data.control.tgrid = tstep;
data.control.xmin = xmin;
data.control.xmax = xmax;
data.control.tmin = tmin;
data.control.tmax = tmax;
% ————————————————————–
function [c,f,s] = pdex2pde(x,t,u,DuDx)
global chi0;
global D0;
global chi1;
global D1;
global H0;
global S0;
global data;
global track;
global xstep;
global alpha_chi;
global alpha_D;
global chi_growth; % total growth rate
global length;
global theta_heaviside1;
global lambda_suppress;
global v_e;
global gamma_nonlin;
global alpha_nonlin;
global group_vel;
global drift_vel;
global intensity_diff;
global drift_velFluct;
%lf FFf F Fb vfDdength = 0.01 or 1
length=1;
group_vel = 1;
D_0 = 1;
c = [1;1;1;1];
v_e = -DuDx(1)*DuDx(2)/u(2)^2; % -g_p*g_n/n^2
flowshear_p = 1+ alpha_chi*v_e^2;
flowshear_n = 1+ alpha_D*v_e^2;
term1 = abs(DuDx(1))-data.constant.critgradpressure;
intensity_diff = D_0*u(3)^alpha_nonlin;
drift_velFluct = DuDx(4);
drift_vel = group_vel + drift_velFluct;
% Implementing Heaviside function for H-mode in p, n and I equations
if term1 > 0
theta_heaviside1=1;
else
theta_heaviside1=0;
end
%Turbulence intensity Equation for random walk
s3 = (chi_growth*(term1*theta_heaviside1-lambda_suppress*v_e^2)-gamma_nonlin*u(3)^alpha_nonlin)*u(3)-drift_vel*DuDx ;
s = [(H0)*exp(-100*x^2/length)+H0/2; (S0)*exp(-100*(x-0.9)^2/length)+S0/2; s3;0];
f = [chi0+chi1*u(3)/flowshear_p ; D0+D1*u(3)/flowshear_n ;intensity_diff*u(3); intensity_diff].*DuDx; % flux term for random walk model
disp(f);
disp(s);
% ————————————————————–
function u0 = pdex2ic(x)
%u0 = [eps; eps; eps];
%u0 = [0.01; 0.01; 0.1*exp(-100*(x-1)^2)];
u0 = [0.4*(1-x^2); 0.4*(1-x^2); 0.4*(1-x^2);0.5*exp(-100*(x-1)^2)];
% ————————————————————–
function [pl,ql,pr,qr] = pdex2bc(xl,ul,xr,ur,t)
pl = [0; 0; 0;0];
ql = [1; 1; 1;1];
pr = [ur(1); ur(2);0; ur(4)];
qr = [eps; 0.1; 1;1];
% qr = [0; 0.1; 1];
%qr = [0; eps; 1];
%————————————————————— pdepe MATLAB Answers — New Questions
Converting plot coordinates to normalized coordinates
I’m trying to add arrows pointing to data points (start and end of arrow found using "ginput(2)") and add a text label at the end of the arrow. Because the ginput points are in respect to the axes of the plot and the normalized points (used with the "annotation" command) are in respect to the whole figure, I can’t figure out how to convert from plot coordinates to normalized so that I can use the annotation function. Is there a property for the plot portion of the figure so that I can find out where the axes limits lie in the figure?
[x,y]=ginput(2); %start and end of arrow
Xrange=max(get(AX(1),’Xlim’))-min(get(AX(1),’Xlim’));
Yrange=max(get(AX(1),’Ylim’))-min(get(AX(1),’Ylim’));
X=(x-min(get(AX(1),’Xlim’)))/Xrange +min(get(AX(1),’Xlim’))/Xrange;
Y=(y-min(get(AX(1),’Ylim’)))/Yrange +min(get(AX(1),’Ylim’))/Yrange;
annotation(‘textarrow’, X, Y,’String’ , LegendText.Fig1{i},’Fontsize’,12);
Thanks!I’m trying to add arrows pointing to data points (start and end of arrow found using "ginput(2)") and add a text label at the end of the arrow. Because the ginput points are in respect to the axes of the plot and the normalized points (used with the "annotation" command) are in respect to the whole figure, I can’t figure out how to convert from plot coordinates to normalized so that I can use the annotation function. Is there a property for the plot portion of the figure so that I can find out where the axes limits lie in the figure?
[x,y]=ginput(2); %start and end of arrow
Xrange=max(get(AX(1),’Xlim’))-min(get(AX(1),’Xlim’));
Yrange=max(get(AX(1),’Ylim’))-min(get(AX(1),’Ylim’));
X=(x-min(get(AX(1),’Xlim’)))/Xrange +min(get(AX(1),’Xlim’))/Xrange;
Y=(y-min(get(AX(1),’Ylim’)))/Yrange +min(get(AX(1),’Ylim’))/Yrange;
annotation(‘textarrow’, X, Y,’String’ , LegendText.Fig1{i},’Fontsize’,12);
Thanks! I’m trying to add arrows pointing to data points (start and end of arrow found using "ginput(2)") and add a text label at the end of the arrow. Because the ginput points are in respect to the axes of the plot and the normalized points (used with the "annotation" command) are in respect to the whole figure, I can’t figure out how to convert from plot coordinates to normalized so that I can use the annotation function. Is there a property for the plot portion of the figure so that I can find out where the axes limits lie in the figure?
[x,y]=ginput(2); %start and end of arrow
Xrange=max(get(AX(1),’Xlim’))-min(get(AX(1),’Xlim’));
Yrange=max(get(AX(1),’Ylim’))-min(get(AX(1),’Ylim’));
X=(x-min(get(AX(1),’Xlim’)))/Xrange +min(get(AX(1),’Xlim’))/Xrange;
Y=(y-min(get(AX(1),’Ylim’)))/Yrange +min(get(AX(1),’Ylim’))/Yrange;
annotation(‘textarrow’, X, Y,’String’ , LegendText.Fig1{i},’Fontsize’,12);
Thanks! annotation, arrow, textarrow MATLAB Answers — New Questions
How to “Create new data” for a custom library block
Hello all,
I am creating a custom library block for my project which I followed mask concept as Unit delay block. However, I got some difficulties on creating New data for my state variable. Currently, I can only create a state variable which will be stored in data dictionary by default; however, I would like to create as following Unitdelay concept. But I could not find any documents which introduced how to do these stuffs for custom library block.
Or whether are there any Parameter options available for creating this on Mask Editor? Please give me some hints here. Thank you so much!Hello all,
I am creating a custom library block for my project which I followed mask concept as Unit delay block. However, I got some difficulties on creating New data for my state variable. Currently, I can only create a state variable which will be stored in data dictionary by default; however, I would like to create as following Unitdelay concept. But I could not find any documents which introduced how to do these stuffs for custom library block.
Or whether are there any Parameter options available for creating this on Mask Editor? Please give me some hints here. Thank you so much! Hello all,
I am creating a custom library block for my project which I followed mask concept as Unit delay block. However, I got some difficulties on creating New data for my state variable. Currently, I can only create a state variable which will be stored in data dictionary by default; however, I would like to create as following Unitdelay concept. But I could not find any documents which introduced how to do these stuffs for custom library block.
Or whether are there any Parameter options available for creating this on Mask Editor? Please give me some hints here. Thank you so much! matlab, simulink MATLAB Answers — New Questions
Create stunning social posts and graphics with Microsoft Designer
(Feed generated with FetchRSS)
Copilot for Microsoft 365: your everyday AI companion
(Feed generated with FetchRSS)
Make the everyday easier with Windows 11
(Feed generated with FetchRSS)
Microsoft Security Copilot
Microsoft Security Copilot is in Preview and it will be GA soon, this tools is able to empower your defenders with Generative AI infused. You may check the short demo which was presented at Microsoft Inspire 2023 event through this link: https://youtu.be/eLEO-S5ugr0. This Microsoft Security Copilot will support your Security Operations Team to detect, harden, and respond the incidents faster and because it’s infused by Generative AI so your Security Team is able to prompt using natural language to get summary of the incidents or vulnerability, the attack path, generate the incidents report automatically, etc.
In the high-level view, please find below Microsoft Security Portfolio and where is the Microsoft Security Copilot position for your references.
For more details, you may access this Microsoft Security Copilot site: Microsoft Security Copilot | Microsoft Security.
Defend at machine speed
Amplify your team’s impact and efficiency with intelligent guidance informed by 65 trillion daily signals.
Simplify the complex
During an attack, complexity can cost you. Synthesize data from multiple sources into clear, actionable insights and respond to incidents in minutes instead of hours or days.
Catch what others miss
Triage signals at machine speed, surface threats early, and get predictive guidance to help you thwart an attacker’s next move.
Address the talent gap
The demand for skilled defenders vastly exceeds the supply. Help your team make the most impact and build their skills with step-by-step instructions for mitigating risks.
integration Microsoft Teams channel on the Feeder Professional plan
Today we are introducing a new integration!
You can now create rules that post directly into a Microsoft Teams channel. And just like with our Slack integration, you can add powerful filters to make sure that only relevant posts come through. Neat? We think so ✨
The new integration is available to all users on the Feeder Professional plan. If you’re not already a subscriber you can read more and upgrade here.
Did you know?
Rules in Feeder lets you filter, star or add posts to collections – automatically. Whether you use Microsoft Teams or Slack, you can create rules that forward all posts matching certain criteria directly into a channel of your choice. It’s a fast and easy way to notify your team when something important happens. Kind of like magic! ????
We hope that this integration will empower you to do even more with Feeder and look forward to bringing you new innovations in the near future.
As always, if you have any questions or suggestions for new features, just reply to this e-mail or contact us on feeder.co.