Month: June 2024
Does cummax works in a sde solver?
I want to model a 2-dimension SDE where the drift and the diffusion are:
% solve the system
F = @(t, X) [mu*pi(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2))-c(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2)); muz*X(2)];
G = @(t, X) [sigma*pi(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2)) 0; 0 sigmaz*X(2)];
X = sde(F, G, "StartState", x);
[X, T] = simByEuler(X, n, ‘DeltaTime’, dt);
Here, pi is some function that I have defined before in the code. My question is: does here cummax works on all previous values of X(2)-X(1), or it takes it as a scalar at every iteration? In particular
max(y, cummax(X(2)-X(1)))
should represent the process .
Thank you so much for your attention, I hope I made myself clear.I want to model a 2-dimension SDE where the drift and the diffusion are:
% solve the system
F = @(t, X) [mu*pi(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2))-c(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2)); muz*X(2)];
G = @(t, X) [sigma*pi(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2)) 0; 0 sigmaz*X(2)];
X = sde(F, G, "StartState", x);
[X, T] = simByEuler(X, n, ‘DeltaTime’, dt);
Here, pi is some function that I have defined before in the code. My question is: does here cummax works on all previous values of X(2)-X(1), or it takes it as a scalar at every iteration? In particular
max(y, cummax(X(2)-X(1)))
should represent the process .
Thank you so much for your attention, I hope I made myself clear. I want to model a 2-dimension SDE where the drift and the diffusion are:
% solve the system
F = @(t, X) [mu*pi(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2))-c(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2)); muz*X(2)];
G = @(t, X) [sigma*pi(y-(X(2)-z)+(X(1)-v)+max(y, cummax(X(2)-X(1)))-y, X(2)) 0; 0 sigmaz*X(2)];
X = sde(F, G, "StartState", x);
[X, T] = simByEuler(X, n, ‘DeltaTime’, dt);
Here, pi is some function that I have defined before in the code. My question is: does here cummax works on all previous values of X(2)-X(1), or it takes it as a scalar at every iteration? In particular
max(y, cummax(X(2)-X(1)))
should represent the process .
Thank you so much for your attention, I hope I made myself clear. sde, simbyeuler, cummax, drift, diffusion MATLAB Answers — New Questions
Attapoll Referral Code {CNUCL} Get $10.00 Sign up Bonus & 15% Referral Commission
Use the latest Attapoll referral code “CNUCL” to unlock a free box worth up to $25. And you can also share your referral code to earn 15% what your referred earns. As of 2024 the latest Attapoll bonus code is [CNUCL] that give users up to $25 cash bonus on sign up and extra commission reward.
Use the latest Attapoll referral code “CNUCL” to unlock a free box worth up to $25. And you can also share your referral code to earn 15% what your referred earns. As of 2024 the latest Attapoll bonus code is [CNUCL] that give users up to $25 cash bonus on sign up and extra commission reward. Read More
MS Word CV Template.
I want a word template document as shown in the uploaded image ‘CV.jpg’. I have actually created it on a website Zety.com for resume template however the download is not free hence I took the screenshot. Can anyone create the exact template as seen in the uploaded image? Just create the exact format and I will fill the details myself. Thanks.
I want a word template document as shown in the uploaded image ‘CV.jpg’. I have actually created it on a website Zety.com for resume template however the download is not free hence I took the screenshot. Can anyone create the exact template as seen in the uploaded image? Just create the exact format and I will fill the details myself. Thanks. Read More
i need a BER SNR code of OCDM modulation
i don’t get to find a code of BER SNR of OCDM modution … CAN i get a hep !i don’t get to find a code of BER SNR of OCDM modution … CAN i get a hep ! i don’t get to find a code of BER SNR of OCDM modution … CAN i get a hep ! ocdm, modultion, demodulation MATLAB Answers — New Questions
Error:Index in position 1 exceeds array bounds.
Code:
sum_parity=[];
llr=2;
check_node=cell(size(H,1),1);
for(i=1:size(H,1))
for(j=1:size(H,2))
if(H(i,j)==1)
check_node{i}=[check_node{i} j];
else
;
end;
end;
end;
Q=[];
for(i=1:size(H,1))
Q=[Q llr];
end;
for(interation=1:1000)
[ processed_llr ] = check_node_processing(Q, check_node);
Processed_llr_in_varibale_form=cell(size(H,2),1);
for(i=1:length(processed_llr))
temp=processed_llr{i};
for(j=1:size(temp,2))
Processed_llr_in_varibale_form{round(temp(2,j))}=[Processed_llr_in_varibale_form{round(temp(2,j))} [temp(1,j);i]];
end;
end;
for(i=1:length(Processed_llr_in_varibale_form))
temp=Processed_llr_in_varibale_form{i};
for(j=1:size(temp,2))
Q(i,temp(2,j))=sum(setdiff(temp(1,:), temp(1,j)));
end;
end;
for(i=1:size(Q,1))
for(j=1:size(Q,2))
Q(i,j)=Q(i,j)+llr(i);
end;
end;
P=[ ];
for(i=1:length(Processed_llr_in_varibale_form))
temp=Processed_llr_in_varibale_form{i};
P(i)=sum(temp(1,:));
end;
P=P+llr;
for(jj=1:length(P))
if(P(jj)>=0)
estimated_output(jj)=0;
else
estimated_output(jj)=1;
end;
end;
parity_mat=H*estimated_output’;
sum_parity=[sum_parity sum(parity_mat) ];
if(sum(parity_mat)==0)
break;
break;
end;
end;
Error:
Error in ldpc_decoder (line 57)
P(i)=sum(temp(1,:));Code:
sum_parity=[];
llr=2;
check_node=cell(size(H,1),1);
for(i=1:size(H,1))
for(j=1:size(H,2))
if(H(i,j)==1)
check_node{i}=[check_node{i} j];
else
;
end;
end;
end;
Q=[];
for(i=1:size(H,1))
Q=[Q llr];
end;
for(interation=1:1000)
[ processed_llr ] = check_node_processing(Q, check_node);
Processed_llr_in_varibale_form=cell(size(H,2),1);
for(i=1:length(processed_llr))
temp=processed_llr{i};
for(j=1:size(temp,2))
Processed_llr_in_varibale_form{round(temp(2,j))}=[Processed_llr_in_varibale_form{round(temp(2,j))} [temp(1,j);i]];
end;
end;
for(i=1:length(Processed_llr_in_varibale_form))
temp=Processed_llr_in_varibale_form{i};
for(j=1:size(temp,2))
Q(i,temp(2,j))=sum(setdiff(temp(1,:), temp(1,j)));
end;
end;
for(i=1:size(Q,1))
for(j=1:size(Q,2))
Q(i,j)=Q(i,j)+llr(i);
end;
end;
P=[ ];
for(i=1:length(Processed_llr_in_varibale_form))
temp=Processed_llr_in_varibale_form{i};
P(i)=sum(temp(1,:));
end;
P=P+llr;
for(jj=1:length(P))
if(P(jj)>=0)
estimated_output(jj)=0;
else
estimated_output(jj)=1;
end;
end;
parity_mat=H*estimated_output’;
sum_parity=[sum_parity sum(parity_mat) ];
if(sum(parity_mat)==0)
break;
break;
end;
end;
Error:
Error in ldpc_decoder (line 57)
P(i)=sum(temp(1,:)); Code:
sum_parity=[];
llr=2;
check_node=cell(size(H,1),1);
for(i=1:size(H,1))
for(j=1:size(H,2))
if(H(i,j)==1)
check_node{i}=[check_node{i} j];
else
;
end;
end;
end;
Q=[];
for(i=1:size(H,1))
Q=[Q llr];
end;
for(interation=1:1000)
[ processed_llr ] = check_node_processing(Q, check_node);
Processed_llr_in_varibale_form=cell(size(H,2),1);
for(i=1:length(processed_llr))
temp=processed_llr{i};
for(j=1:size(temp,2))
Processed_llr_in_varibale_form{round(temp(2,j))}=[Processed_llr_in_varibale_form{round(temp(2,j))} [temp(1,j);i]];
end;
end;
for(i=1:length(Processed_llr_in_varibale_form))
temp=Processed_llr_in_varibale_form{i};
for(j=1:size(temp,2))
Q(i,temp(2,j))=sum(setdiff(temp(1,:), temp(1,j)));
end;
end;
for(i=1:size(Q,1))
for(j=1:size(Q,2))
Q(i,j)=Q(i,j)+llr(i);
end;
end;
P=[ ];
for(i=1:length(Processed_llr_in_varibale_form))
temp=Processed_llr_in_varibale_form{i};
P(i)=sum(temp(1,:));
end;
P=P+llr;
for(jj=1:length(P))
if(P(jj)>=0)
estimated_output(jj)=0;
else
estimated_output(jj)=1;
end;
end;
parity_mat=H*estimated_output’;
sum_parity=[sum_parity sum(parity_mat) ];
if(sum(parity_mat)==0)
break;
break;
end;
end;
Error:
Error in ldpc_decoder (line 57)
P(i)=sum(temp(1,:)); error MATLAB Answers — New Questions
Issue with Date Calculation Logic in ADF Pipeline
Hello ADF Community,
I am currently facing an issue with a piece of code in my ADF pipeline that has been functioning correctly for like 2 years until recently. The code is designed to handle date calculations for incremental loads based on historical depth parameters. The parameters are always negative and stored in string type. Below is the original code that was working before:
@IF(
greater(activity(‘Get table properties’).output.count,0),
IF(
not(equals(activity(‘Get table properties’).output.value[0].Start_Time,’null’)),
activity(‘Get table properties’).output.value[0].Start_Time,
IF(
not(equals(activity(‘Get table properties’).output.value[0].Start_Time,’null’)),
activity(‘Get table properties’).output.value[0].Start_Time,
IF(
greater(activity(‘Get table properties’).output.value[0].Depth_History_In_Days_start_time,’0′),
formatDateTime(adddays(utcnow(),int(pipeline().parameters.Depth_History_In_Days_start)),’yyyy-MM-dd’),
formatDateTime(utcnow(),’yyyy-MM-dd’)
)
)
),
formatDateTime(adddays(utcnow(),0),’yyyy-MM-dd’)
)
Issue Description
Until recently, this logic correctly loaded data based on the historical depth parameters. However, it now seems to be malfunctioning, leading to incorrect date calculations and always selecting today dates. (utcnow)
My Investigation and Changes
To address this issue, I simplified the logic, assuming the problem might be due to redundant checks and over-complication. Here’s the updated version of the code:
@IF(
greater(activity(‘Get table properties’).output.count, 0),
IF(
not(equals(activity(‘Get table properties’).output.value[0].Start_Time, ‘null’)),
activity(‘Get table properties’).output.value[0].Start_Time,
formatDateTime(adddays(utcnow(), int(pipeline().parameters.Depth_History_In_Days_start)), ‘yyyy-MM-dd’)
),
formatDateTime(adddays(utcnow(), int(pipeline().parameters.Depth_History_In_Days_start)), ‘yyyy-MM-dd’)
)
Despite these changes, I am still unclear on why the original logic stopped working. The Depth_History_In_Days_start_time and Depth_History_In_Days_end_time variables are strings, and we have been using greater than 0 for comparisons, which worked previously since in string comparison, -2 is considered greater than 0.
Could anyone provide insights into why the original code might have stopped functioning correctly? Have there been any updates or changes in ADF that might affect string comparison logic? Any guidance or suggestions to ensure reliable date calculations would be greatly appreciated.
Thank you in advance for your assistance!
Hello ADF Community,I am currently facing an issue with a piece of code in my ADF pipeline that has been functioning correctly for like 2 years until recently. The code is designed to handle date calculations for incremental loads based on historical depth parameters. The parameters are always negative and stored in string type. Below is the original code that was working before: @IF(
greater(activity(‘Get table properties’).output.count,0),
IF(
not(equals(activity(‘Get table properties’).output.value[0].Start_Time,’null’)),
activity(‘Get table properties’).output.value[0].Start_Time,
IF(
not(equals(activity(‘Get table properties’).output.value[0].Start_Time,’null’)),
activity(‘Get table properties’).output.value[0].Start_Time,
IF(
greater(activity(‘Get table properties’).output.value[0].Depth_History_In_Days_start_time,’0′),
formatDateTime(adddays(utcnow(),int(pipeline().parameters.Depth_History_In_Days_start)),’yyyy-MM-dd’),
formatDateTime(utcnow(),’yyyy-MM-dd’)
)
)
),
formatDateTime(adddays(utcnow(),0),’yyyy-MM-dd’)
) Issue DescriptionUntil recently, this logic correctly loaded data based on the historical depth parameters. However, it now seems to be malfunctioning, leading to incorrect date calculations and always selecting today dates. (utcnow)My Investigation and ChangesTo address this issue, I simplified the logic, assuming the problem might be due to redundant checks and over-complication. Here’s the updated version of the code: @IF(
greater(activity(‘Get table properties’).output.count, 0),
IF(
not(equals(activity(‘Get table properties’).output.value[0].Start_Time, ‘null’)),
activity(‘Get table properties’).output.value[0].Start_Time,
formatDateTime(adddays(utcnow(), int(pipeline().parameters.Depth_History_In_Days_start)), ‘yyyy-MM-dd’)
),
formatDateTime(adddays(utcnow(), int(pipeline().parameters.Depth_History_In_Days_start)), ‘yyyy-MM-dd’)
) Despite these changes, I am still unclear on why the original logic stopped working. The Depth_History_In_Days_start_time and Depth_History_In_Days_end_time variables are strings, and we have been using greater than 0 for comparisons, which worked previously since in string comparison, -2 is considered greater than 0. Could anyone provide insights into why the original code might have stopped functioning correctly? Have there been any updates or changes in ADF that might affect string comparison logic? Any guidance or suggestions to ensure reliable date calculations would be greatly appreciated.Thank you in advance for your assistance! Read More
Seeking a Microsoft 365 CoPilot Experienced Specialist / Expert
We are a small organisation that is actively working towards the full implementation of Microsoft CoPilot within our operations here.
We are looking for a CoPilot specialist and an all-round reliable set of hands to assist with this in-person at the office in Mayfair, London. We offer an attractive hourly rate that is based on the individuals experience and references.
If this fits your current profile please reply with Interested and your email for me to get back to you on.
We are a small organisation that is actively working towards the full implementation of Microsoft CoPilot within our operations here. We are looking for a CoPilot specialist and an all-round reliable set of hands to assist with this in-person at the office in Mayfair, London. We offer an attractive hourly rate that is based on the individuals experience and references. If this fits your current profile please reply with Interested and your email for me to get back to you on. Read More
I am solving non-linear fractional model using spectral method . So At last stage to find coefficient I have large number of nonlinear system equation how to solve using fsolv
I want to solve large number of nonlinear system of equation using fsolve . I am solving by assigning in f as f =@(c,d,e) []; likewaise but in these process i have to copy the equation in commaand window after running the code and put in f the we solve using fsolve but these is lengthy process for large value of N. pleases provide some code for shortcut.
clc;
close all
clear all
syms x k l p m h y k0 r
N=7;
size=3;gamma1=1;gamma2=1;gamma3=1;gamma4=1;
for i7=1:N
syms c(i7)
end
for i8 =1:N
syms d(i8)
end
for i9 =1:N
syms e(i8)
end
for i=1:N
symsX(i,:) = c(i);
end
for i=1:N
symsY(i,:) = d(i);
end
for i=1:N
symsZ(i,:) = e(i);
end
C1 = transpose(symsX)
%sym(‘c’, [1 N]);
C2 = transpose(symsY)
C3 = transpose(symsZ)
%A=c;
equations = sym(zeros(1,N));
D = [];L=1;
G = [];
Dv1 = [];
Dv2 = [];
v1 = 1;
v2 = 1;
for i=1:N
if i==1
n(i)=2
else
n(i)=1
end
end
for i=1:N
h(i) = (n(i)*pi)/2;
end
k1=1;k2=3;k3=5;k4=7;k5=9;k6=11;k7=13;k8=15;k9=17;k10=19;k11=21;k12=23;k14=25;k15=27;k16=29;
for i=1:N
for j=1:N
if(j==i-k1)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k2)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k3)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k4)
D(i,j)=((4*(i-1))/(n(j)*L)) ;
elseif(j==i-k5)
D(i,j)= ((4*(i-1))/(n(j)*L)) ;
elseif(j==i-k6)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k7)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k8)
D(i,j)= ((4*(i-1))/(n(j)*L))
elseif(j==i-k9)
D(i,j)= ((4*(i-1))/(n(j)*L))
elseif(j==i-k10)
D(i,j)= ((4*(i-1))/(n(j)*L))
else
D(i,j)=0;
end
end
end
for m=1:N
symT(m,:) = chebyshevT(m-1,2*x-1)
end
H(x) = symT
%% legender operational matrix for fractional derivatives
%% d^n(symT)/dx^n = (D^n)*symT
%B = D*symT
%% Dv is the COM derivative of oder v>0 the caputo sense
Dv1=[];
t=ceil(v1)
for i=1:N
for j=1:N
if(i<=t)
Dv=zeros(t,j);
elseif (j==1)
Dv1(i,j) = symsum(((((i-1)*(-1)^(i-1-k)*factorial(i-1+k-1)*2^(2*k)*factorial(k)*gamma(k-v1+1/2))/(L^(v1)*factorial(i-1-k)*factorial(2*k)*sqrt(pi)*(gamma(k-v1+1)^(2))))),k,t,i-1);
else
Dv1(i,j) = (i-1)*symsum(((((-1)^((i-1)-k0)*(j-1)*factorial(i-1+k0-1)*(2^(2*k0+1))*factorial(k0))/(L^(v1)*factorial((i-1)-k0)*factorial(2*k0)*sqrt(pi)*(gamma(k0-v1+1))))*symsum((((-1)^(j-1-r)*factorial(j-1+r-1)*(2^(2*r))*gamma(k0+r-v1+1/2))/(factorial(j-1-r)*factorial(2*r)*gamma(k0+r-v1+1))),r,0,j-1)),k0,t,i-1)
%Dv(i,j)= symsum(((((-1)^((i-1)-k)*(2*(i-1))*factorial((i-1)+k-1)*gamma(k-v+(1/2)))/(n(j)*L^(v)*gamma(k+(1/2))*factorial((i-1)-k)*gamma(k-v-(j-1)+1)*gamma(k+(j-1)-v+1)))),k,t,i-1)
% Dv(i,j)=symsum(((2*(j-1)+1)*symsum((((-1)^((i-1)+(j-1)+k+l)*factorial((i-1)+k)*factorial(l+(j-1)))/(factorial((i-1)-k)*factorial(k)*gamma(k-v+1)*factorial((j-1)-l)*(factorial(l))^(2)*(k+l-v+1))),l,0,j-1)),k,t,i-1);
end
end
end
Dv2=[];
t=ceil(v2)
for i=1:N
for j=1:N
if(i<=t)
Dv2=zeros(t,j);
elseif (j==1)
Dv2(i,j) = symsum(((((i-1)*(-1)^(i-1-k)*factorial(i-1+k-1)*2^(2*k)*factorial(k)*gamma(k-v2+1/2))/(L^(v2)*factorial(i-1-k)*factorial(2*k)*sqrt(pi)*(gamma(k-v2+1)^(2))))),k,t,i-1);
else
Dv2(i,j) = (i-1)*symsum(((((-1)^((i-1)-k0)*(j-1)*factorial(i-1+k0-1)*(2^(2*k0+1))*factorial(k0))/(L^(v2)*factorial((i-1)-k0)*factorial(2*k0)*sqrt(pi)*(gamma(k0-v2+1))))*symsum((((-1)^(j-1-r)*factorial(j-1+r-1)*(2^(2*r))*gamma(k0+r-v2+1/2))/(factorial(j-1-r)*factorial(2*r)*gamma(k0+r-v2+1))),r,0,j-1)),k0,t,i-1)
%Dv(i,j)= symsum(((((-1)^((i-1)-k)*(2*(i-1))*factorial((i-1)+k-1)*gamma(k-v+(1/2)))/(n(j)*L^(v)*gamma(k+(1/2))*factorial((i-1)-k)*gamma(k-v-(j-1)+1)*gamma(k+(j-1)-v+1)))),k,t,i-1)
% Dv(i,j)=symsum(((2*(j-1)+1)*symsum((((-1)^((i-1)+(j-1)+k+l)*factorial((i-1)+k)*factorial(l+(j-1)))/(factorial((i-1)-k)*factorial(k)*gamma(k-v+1)*factorial((j-1)-l)*(factorial(l))^(2)*(k+l-v+1))),l,0,j-1)),k,t,i-1);
end
end
end
y(1) = C1*H;y(2)=C2*H;y(3)=C3*H
g=zeros(N,1);a=1;b=1;c=1;d=1;
% xmin=0;xmax=1;
% for i = 1:N
% f = @(x) (1+x) .* (1 ./ sqrt(L.*x – x.^2)); % Define f(x) inside the loop
% func = @(x) f(x) .* chebyshevT(i-1, (2*x/L) – 1); % Define the function to integrate
% g(i) = (1 / h(i)) .* integral(func, xmin, xmax);
% end
%% solve system of fractional order D^(1.5)y1 = y2 $ D^(0.5) = -y2-y1+1+x
z1=1:N-1
R(z1)=vpa(solve(chebyshevT(N-1,2*x-1),x),5)
%D1 = sort(R,’descend’)
%G = transpose(g);
H1(x) = diff(H(x));
R1 = (C1*Dv1*H-gamma1*((C1*H)-(C2*H)));
R2 = (C2*Dv1*H+(4*gamma1*(C2*H))-((C1*H)*(C3*H))-(gamma2*(C1*H)^(3)));
R3 = (C3*Dv1*H+(gamma1*gamma4*(C3*H))-(((C1*H)^(3))*(C2*H))-(gamma3*(C3*H)^(2)));
% R1 = ((C1*Dv1*H)-a.*(y(1))+b.*((y(1)).*(y(2))));
% R2 = ((C2*Dv1*H)-c.*(((y(1)).*(y(2))))+d.*((y(2))));
t1=ceil(v1);t2=ceil(v2);
for i = 1:N-t1
eqn0(i) = R1(R(i))
%eqn0(i) = int((R1*chebyshevT(i-1,2*x-1)),x,0,1)
end
for i=1:N-t1
eqn1(i) = R2(R(i))
end
for i=1:N-t1
eqn2(i) = R3(R(i))
end
eqn3=(C1)*H(0)-2.6;
eqn4=(C2)*(H(0))-1.8;
eqn5 = (C3)*(H(0))-2.5;
equations1 = [eqn0,eqn1,eqn2,eqn3,eqn4,eqn5];
f =@(c,d,e) [2.7071067811865532348747365176678*c(2) – c(1) – 5.6568542494924420306571438691514*c(3) + 5.292893218813663426931852838572*c(4) + 0.99999999999963452967090203902407*c(5) – 10.707106781186253043585270572838*c(6) + 16.970562748477326091971431589745*c(7) + d(1) – 0.70710678118655323487473651766777*d(2) + 0.000000000000016151659251727809284198242756759*d(3) + 0.70710678118653039297916789513938*d(4) – 0.99999999999999999999999999947825*d(5) + 0.70710678118657607677030513945829*d(6) – 0.000000000000048454977755183427852594727351922*d(7); 1.2928932188133330782875418663025*c(2) – c(1) + 5.6568542494929976671048748761924*c(3) + 6.7071067811902418116034852470151*c(4) + 1.0000000000076414279432830892593*c(5) – 9.2928932188061013571452785519551*c(6) – 16.970562748478993001314616886895*c(7) + d(1) + 0.70710678118666692171245813369751*d(2) + 0.00000000000033770659479019338766497999870797*d(3) – 0.70710678118618933246600292636309*d(4) – 0.99999999999999999999999977190851*d(5) – 0.70710678118714451095891301846186*d(6) – 0.0000000000010131197843705801629949407484403*d(7);
2.2588190451025411675800569355488*c(2) – c(1) – 1.2045269570359118189265060549051*c(3) – 5.0994116265996025979660812602431*c(4) + 6.6726037773448918964171398156432*c(5) + 3.6454177505992816039159838845192*c(6) – 12.423314164921193664470552934672*c(7) + d(1) – 0.25881904510254116758005693554878*d(2) – 0.86602540378441752171394942948519*d(3) + 0.70710678118659233739868810642085*d(4) + 0.49999999999992682068095891830983*d(5) – 0.96592582628909562457579410802636*d(6) + 0.00000000000012675029864244296874022498106152*d(7); 1.741180954897572519257664680481*c(2) – c(1) + 2.9365777646039550649277513046591*c(3) – 3.6851980642280799640942290841422*c(4) – 7.6726037773429774645179663364753*c(5) + 1.7135660980270430271605604380751*c(6) + 12.42331416492125455483396912414*c(7) + d(1) + 0.25881904510242748074233531951904*d(2) – 0.8660254037845352189890687485068*d(3) – 0.70710678118634266377459589793939*d(4) + 0.50000000000033453600179708174969*d(5) + 0.96592582628894331309400622678268*d(6) – 0.00000000000057943335207356344385823017649482*d(7);
2.9659258262890944024547934532166*c(2) – c(1) – 8.5934320140972947697379899486242*c(3) + 17.099411626601236173895770571656*c(4) – 27.268521719614045141886628745433*c(5) + 37.579327120800789878210967353833*c(6) – 46.364439661893342936680399633656*c(7) + d(1) – 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) – 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) – 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449564958666*d(7); 1.0340741737109055975452065467834*c(2) – c(1) + 6.8613812065282156695387053028407*c(3) + 15.685198064227713028495645177746*c(4) + 26.268521719613346063068768060046*c(5) + 37.061689030594773702131939269591*c(6) + 46.364439661892132096649369596372*c(7) + d(1) + 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) + 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) + 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449492408624*d(7);
4*d(1) – 0.82842712474621293949894607067108*d(2) – 5.656854249492361272360885230105*d(3) + 8.8284271247463153918276923142689*d(4) – 4.0000000000003654703290979583672*d(5) – 7.1715728752533726597337448755461*d(6) + 16.970562748477083817082655672606*d(7) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))*(e(1) – 0.70710678118655323487473651766777*e(2) + 0.000000000000016151659251727809284198242756759*e(3) + 0.70710678118653039297916789513938*e(4) – 0.99999999999999999999999999947825*e(5) + 0.70710678118657607677030513945829*e(6) – 0.000000000000048454977755183427852594727351922*e(7)) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))^3;
4*d(1) + 4.82842712474666768684983253479*d(2) + 5.6568542494946862000788258431307*d(3) + 3.1715728752592951492734706151996*d(4) – 3.9999999999923585720567157702833*d(5) – 12.828427124741823911939843644264*d(6) – 16.97056274848405860023646978771*d(7) + (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))^3 – (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))*(0.70710678118618933246600292636309*e(4) – 0.70710678118666692171245813369751*e(2) – 0.00000000000033770659479019338766497999870797*e(3) – e(1) + 0.99999999999999999999999977190851*e(5) + 0.70710678118714451095891301846186*e(6) + 0.0000000000010131197843705801629949407484403*e(7));
4*d(1) + 0.96472381958983532967977225780487*d(2) – 5.534653975957999427496253202331*d(3) – 1.5638777206666409109726407281389*d(4) + 9.1726037773445259998219344071924*d(5) – 1.1842113808461965189629866556126*d(6) – 12.423314164920559912977340719828*d(7) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))*(e(1) – 0.25881904510254116758005693554878*e(2) – 0.86602540378441752171394942948519*e(3) + 0.70710678118659233739868810642085*e(4) + 0.49999999999992682068095891830983*e(5) – 0.96592582628909562457579410802636*e(6) + 0.00000000000012675029864244296874022498106152*e(7)) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))^3;
4*d(1) + 3.0352761804097099229693412780762*d(2) – 1.3935492543187210300175924378749*d(3) – 7.2207319701597932829672085738392*d(4) – 5.1726037773413047845089809277269*d(5) + 6.5431952294717595926305915719885*d(6) + 12.423314164918357388073601306921*d(7) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))*(e(1) + 0.25881904510242748074233531951904*e(2) – 0.8660254037845352189890687485068*e(3) – 0.70710678118634266377459589793939*e(4) + 0.50000000000033453600179708174969*e(5) + 0.96592582628894331309400622678268*e(6) – 0.00000000000057943335207356344385823017649482*e(7)) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))^3;
4*d(1) – 1.8637033051563776098191738128662*d(2) – 4.2633049951745970192397783341654*d(3) + 13.563877720667428310395457086882*d(4) – 24.768521719612297444841977031964*d(5) + 36.285231895285749438013397143228*d(6) – 46.364439661890315836602824540446*d(7) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))*(e(1) – 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) – 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) – 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449564958666*e(7)) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))^3;
4*d(1) + 5.8637033051563776098191738128662*d(2) + 11.191508225450913420036916917299*d(3) + 19.22073197016152089199595866252*d(4) + 28.768521719615093760113419773515*d(5) + 38.355784256109814142329509480196*d(6) + 46.364439661895159196726944689582*d(7) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))*(e(1) + 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) + 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) + 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449492408624*e(7)) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))^3;
e(1) + 1.2928932188134467651252634823322*e(2) – 5.6568542494924097273386404135329*e(3) + 6.7071067811867242128901886288508*e(4) – 1.0000000000003654703290979599324*e(5) – 9.292893218813100890044660293921*e(6) + 16.97056274847722918201592122289*e(7) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))^3*(d(1) – 0.70710678118655323487473651766777*d(2) + 0.000000000000016151659251727809284198242756759*d(3) + 0.70710678118653039297916789513938*d(4) – 0.99999999999999999999999999947825*d(5) + 0.70710678118657607677030513945829*d(6) – 0.000000000000048454977755183427852594727351922*d(7)) – (e(1) – 0.70710678118655323487473651766777*e(2) + 0.000000000000016151659251727809284198242756759*e(3) + 0.70710678118653039297916789513938*e(4) – 0.99999999999999999999999999947825*e(5) + 0.70710678118657607677030513945829*e(6) – 0.000000000000048454977755183427852594727351922*e(7))^2;
e(1) + 2.7071067811866669217124581336975*e(2) + 5.6568542494936730802944552629677*e(3) + 5.2928932188178631466714793942889*e(4) – 0.99999999999235857205671645455777*e(5) – 10.707106781180390379063104588879*e(6) – 16.970562748481019240883358047221*e(7) – (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))^3*(0.70710678118618933246600292636309*d(4) – 0.70710678118666692171245813369751*d(2) – 0.00000000000033770659479019338766497999870797*d(3) – d(1) + 0.99999999999999999999999977190851*d(5) + 0.70710678118714451095891301846186*d(6) + 0.0000000000010131197843705801629949407484403*d(7)) – (0.70710678118618933246600292636309*e(4) – 0.70710678118666692171245813369751*e(2) – 0.00000000000033770659479019338766497999870797*e(3) – e(1) + 0.99999999999999999999999977190851*e(5) + 0.70710678118714451095891301846186*e(6) + 0.0000000000010131197843705801629949407484403*e(7))^2;
e(1) + 1.7411809548974588324199430644512*e(2) – 2.9365777646047468623544049138754*e(3) – 3.6851980642264179231687050474014*e(4) + 7.6726037773447455377790576522629*e(5) + 1.7135660980210903547643956684664*e(6) – 12.423314164920940163873268048734*e(7) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))^3*(d(1) – 0.25881904510254116758005693554878*d(2) – 0.86602540378441752171394942948519*d(3) + 0.70710678118659233739868810642085*d(4) + 0.49999999999992682068095891830983*d(5) – 0.96592582628909562457579410802636*d(6) + 0.00000000000012675029864244296874022498106152*d(7)) – (e(1) – 0.25881904510254116758005693554878*e(2) – 0.86602540378441752171394942948519*e(3) + 0.70710678118659233739868810642085*e(4) + 0.49999999999992682068095891830983*e(5) – 0.96592582628909562457579410802636*e(6) + 0.00000000000012675029864244296874022498106152*e(7))^2;
e(1) + 2.258819045102427480742335319519*e(2) + 1.2045269570348846269496138076455*e(3) – 5.099411626600765291643420880021*e(4) – 6.6726037773423083925143721729759*e(5) + 3.6454177506049296533485728916404*e(6) + 12.423314164920095688129821997252*e(7) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))^3*(d(1) + 0.25881904510242748074233531951904*d(2) – 0.8660254037845352189890687485068*d(3) – 0.70710678118634266377459589793939*d(4) + 0.50000000000033453600179708174969*d(5) + 0.96592582628894331309400622678268*d(6) – 0.00000000000057943335207356344385823017649482*d(7)) – (e(1) + 0.25881904510242748074233531951904*e(2) – 0.8660254037845352189890687485068*e(3) – 0.70710678118634266377459589793939*e(4) + 0.50000000000033453600179708174969*e(5) + 0.96592582628894331309400622678268*e(6) – 0.00000000000057943335207356344385823017649482*e(7))^2;
e(1) + 1.0340741737109055975452065467834*e(2) – 6.8613812065282156695387053028407*e(3) + 15.685198064227713028495645177746*e(4) – 26.268521719613346063068768060046*e(5) + 37.061689030594773702131939269591*e(6) – 46.364439661892132096649369596372*e(7) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))^3*(d(1) – 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) – 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) – 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449564958666*d(7)) – (e(1) – 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) – 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) – 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449564958666*e(7))^2;
e(1) + 2.9659258262890944024547934532166*e(2) + 8.5934320140972947697379899486242*e(3) + 17.099411626601236173895770571656*e(4) + 27.268521719614045141886628745433*e(5) + 37.579327120800789878210967353833*e(6) + 46.364439661893342936680399633656*e(7) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))^3*(d(1) + 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) + 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) + 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449492408624*d(7)) – (e(1) + 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) + 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) + 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449492408624*e(7))^2;
c(1) – c(2) + c(3) – c(4) + c(5) – c(6) + c(7) – 1; d(1) – d(2) + d(3) – d(4) + d(5) – d(6) + d(7) – 1; e(1) – e(2) + e(3) – e(4) + e(5) – e(6) + e(7) – 1]
% 2*c(2) – c(1) + 1.0*c(3) – 6.0*c(4) + d(1) – 1.0*d(3);
% 2.8660254037844197227968834340572*c(2) – c(1) – 7.4282032302752922278309731279771*c(3) + 11.999999999999099801669829449778*c(4) + d(1) – 0.86602540378441972279688343405724*d(2) + 0.49999999999993444545590565551924*d(3) + 0.00000000000011354380103841645254673828148123*d(4);
% 1.133974596215466590365394949913*c(2) – c(1) + 6.4282032302759390088627633740404*c(3) + 12.000000000003370641343632950538*c(4) + d(1) + 0.86602540378453340963460505008698*d(2) + 0.50000000000032826821407702665543*d(3) + 0.00000000000056857722529136932714864072658515*d(4);
% 4*d(1) + 2*d(2) – 4.0*d(3) – 6.0*d(4) – (c(1) – 1.0*c(3))^3 – (c(1) – 1.0*c(3))*(e(1) – 1.0*e(3));
% 4*d(1) – 1.4641016151376788911875337362289*d(2) – 4.9282032302756200005514448503809*d(3) + 11.999999999999667520675021532041*d(4) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))*(e(1) – 0.86602540378441972279688343405724*e(2) + 0.49999999999993444545590565551924*e(3) + 0.00000000000011354380103841645254673828148123*e(4)) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))^3;
% 4*d(1) + 5.4641016151381336385384202003479*d(2) + 8.9282032302775803499331485073175*d(3) + 12.000000000006213527470089797174*d(4) – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))^3 – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))*(e(1) + 0.86602540378453340963460505008698*e(2) + 0.50000000000032826821407702665543*e(3) + 0.00000000000056857722529136932714864072658515*e(4));
% e(1) + 2*e(2) – 1.0*e(3) – 6.0*e(4) – (e(1) – 1.0*e(3))^2 – (c(1) – 1.0*c(3))^3*(d(1) – 1.0*d(3));
% e(1) + 1.1339745962155802772031165659428*e(2) – 6.4282032302754233369191618169386*e(3) + 11.999999999999326889271906282683*e(4) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))^3*(d(1) – 0.86602540378441972279688343405724*d(2) + 0.49999999999993444545590565551924*d(3) + 0.00000000000011354380103841645254673828148123*d(4)) – (e(1) – 0.86602540378441972279688343405724*e(2) + 0.49999999999993444545590565551924*e(3) + 0.00000000000011354380103841645254673828148123*e(4))^2;
% e(1) + 2.866025403784533409634605050087*e(2) + 7.4282032302765955452909174273512*e(3) + 12.000000000004507795794215689192*e(4) – (e(1) + 0.86602540378453340963460505008698*e(2) + 0.50000000000032826821407702665543*e(3) + 0.00000000000056857722529136932714864072658515*e(4))^2 – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))^3*(d(1) + 0.86602540378453340963460505008698*d(2) + 0.50000000000032826821407702665543*d(3) + 0.00000000000056857722529136932714864072658515*d(4));
% c(1) – c(2) + c(3) – c(4) – 1; d(1) – d(2) + d(3) – d(4) – 1; e(1) – e(2) + e(3) – e(4) – 1]
intial = zeros(1,N);
solution1 = fsolve(@(vars) f(vars(1:7),vars(8:14),vars(15:21)),[intial;intial;intial])
X1 = reshape(solution1,N,size);
approxsol1(x) = transpose(X1(:,1))*H
%approxsolA1(x) = transpose(X3(:,1))*H
approxsol2(x) = transpose(X1(:,2))*H
%approxsolA2(x) =transpose(X3(:,2))*H
approxsol3(x) = transpose(X1(:,3))*H
y0 = [1;1;1];
tspan = 0:0.1:1;
[t, y] = ode45(@myODEs, tspan, y0);
% figure(1)
% plot(t, y(:,1))
x1=0:0.1:1
figure(1)
plot(x1,approxsol2(x1))
hold on
plot(t,y(:,2),’o’ )
% figure(2)
% plot(x1,approxsol2(x1))
% figure(3)
% plot(x1I want to solve large number of nonlinear system of equation using fsolve . I am solving by assigning in f as f =@(c,d,e) []; likewaise but in these process i have to copy the equation in commaand window after running the code and put in f the we solve using fsolve but these is lengthy process for large value of N. pleases provide some code for shortcut.
clc;
close all
clear all
syms x k l p m h y k0 r
N=7;
size=3;gamma1=1;gamma2=1;gamma3=1;gamma4=1;
for i7=1:N
syms c(i7)
end
for i8 =1:N
syms d(i8)
end
for i9 =1:N
syms e(i8)
end
for i=1:N
symsX(i,:) = c(i);
end
for i=1:N
symsY(i,:) = d(i);
end
for i=1:N
symsZ(i,:) = e(i);
end
C1 = transpose(symsX)
%sym(‘c’, [1 N]);
C2 = transpose(symsY)
C3 = transpose(symsZ)
%A=c;
equations = sym(zeros(1,N));
D = [];L=1;
G = [];
Dv1 = [];
Dv2 = [];
v1 = 1;
v2 = 1;
for i=1:N
if i==1
n(i)=2
else
n(i)=1
end
end
for i=1:N
h(i) = (n(i)*pi)/2;
end
k1=1;k2=3;k3=5;k4=7;k5=9;k6=11;k7=13;k8=15;k9=17;k10=19;k11=21;k12=23;k14=25;k15=27;k16=29;
for i=1:N
for j=1:N
if(j==i-k1)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k2)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k3)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k4)
D(i,j)=((4*(i-1))/(n(j)*L)) ;
elseif(j==i-k5)
D(i,j)= ((4*(i-1))/(n(j)*L)) ;
elseif(j==i-k6)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k7)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k8)
D(i,j)= ((4*(i-1))/(n(j)*L))
elseif(j==i-k9)
D(i,j)= ((4*(i-1))/(n(j)*L))
elseif(j==i-k10)
D(i,j)= ((4*(i-1))/(n(j)*L))
else
D(i,j)=0;
end
end
end
for m=1:N
symT(m,:) = chebyshevT(m-1,2*x-1)
end
H(x) = symT
%% legender operational matrix for fractional derivatives
%% d^n(symT)/dx^n = (D^n)*symT
%B = D*symT
%% Dv is the COM derivative of oder v>0 the caputo sense
Dv1=[];
t=ceil(v1)
for i=1:N
for j=1:N
if(i<=t)
Dv=zeros(t,j);
elseif (j==1)
Dv1(i,j) = symsum(((((i-1)*(-1)^(i-1-k)*factorial(i-1+k-1)*2^(2*k)*factorial(k)*gamma(k-v1+1/2))/(L^(v1)*factorial(i-1-k)*factorial(2*k)*sqrt(pi)*(gamma(k-v1+1)^(2))))),k,t,i-1);
else
Dv1(i,j) = (i-1)*symsum(((((-1)^((i-1)-k0)*(j-1)*factorial(i-1+k0-1)*(2^(2*k0+1))*factorial(k0))/(L^(v1)*factorial((i-1)-k0)*factorial(2*k0)*sqrt(pi)*(gamma(k0-v1+1))))*symsum((((-1)^(j-1-r)*factorial(j-1+r-1)*(2^(2*r))*gamma(k0+r-v1+1/2))/(factorial(j-1-r)*factorial(2*r)*gamma(k0+r-v1+1))),r,0,j-1)),k0,t,i-1)
%Dv(i,j)= symsum(((((-1)^((i-1)-k)*(2*(i-1))*factorial((i-1)+k-1)*gamma(k-v+(1/2)))/(n(j)*L^(v)*gamma(k+(1/2))*factorial((i-1)-k)*gamma(k-v-(j-1)+1)*gamma(k+(j-1)-v+1)))),k,t,i-1)
% Dv(i,j)=symsum(((2*(j-1)+1)*symsum((((-1)^((i-1)+(j-1)+k+l)*factorial((i-1)+k)*factorial(l+(j-1)))/(factorial((i-1)-k)*factorial(k)*gamma(k-v+1)*factorial((j-1)-l)*(factorial(l))^(2)*(k+l-v+1))),l,0,j-1)),k,t,i-1);
end
end
end
Dv2=[];
t=ceil(v2)
for i=1:N
for j=1:N
if(i<=t)
Dv2=zeros(t,j);
elseif (j==1)
Dv2(i,j) = symsum(((((i-1)*(-1)^(i-1-k)*factorial(i-1+k-1)*2^(2*k)*factorial(k)*gamma(k-v2+1/2))/(L^(v2)*factorial(i-1-k)*factorial(2*k)*sqrt(pi)*(gamma(k-v2+1)^(2))))),k,t,i-1);
else
Dv2(i,j) = (i-1)*symsum(((((-1)^((i-1)-k0)*(j-1)*factorial(i-1+k0-1)*(2^(2*k0+1))*factorial(k0))/(L^(v2)*factorial((i-1)-k0)*factorial(2*k0)*sqrt(pi)*(gamma(k0-v2+1))))*symsum((((-1)^(j-1-r)*factorial(j-1+r-1)*(2^(2*r))*gamma(k0+r-v2+1/2))/(factorial(j-1-r)*factorial(2*r)*gamma(k0+r-v2+1))),r,0,j-1)),k0,t,i-1)
%Dv(i,j)= symsum(((((-1)^((i-1)-k)*(2*(i-1))*factorial((i-1)+k-1)*gamma(k-v+(1/2)))/(n(j)*L^(v)*gamma(k+(1/2))*factorial((i-1)-k)*gamma(k-v-(j-1)+1)*gamma(k+(j-1)-v+1)))),k,t,i-1)
% Dv(i,j)=symsum(((2*(j-1)+1)*symsum((((-1)^((i-1)+(j-1)+k+l)*factorial((i-1)+k)*factorial(l+(j-1)))/(factorial((i-1)-k)*factorial(k)*gamma(k-v+1)*factorial((j-1)-l)*(factorial(l))^(2)*(k+l-v+1))),l,0,j-1)),k,t,i-1);
end
end
end
y(1) = C1*H;y(2)=C2*H;y(3)=C3*H
g=zeros(N,1);a=1;b=1;c=1;d=1;
% xmin=0;xmax=1;
% for i = 1:N
% f = @(x) (1+x) .* (1 ./ sqrt(L.*x – x.^2)); % Define f(x) inside the loop
% func = @(x) f(x) .* chebyshevT(i-1, (2*x/L) – 1); % Define the function to integrate
% g(i) = (1 / h(i)) .* integral(func, xmin, xmax);
% end
%% solve system of fractional order D^(1.5)y1 = y2 $ D^(0.5) = -y2-y1+1+x
z1=1:N-1
R(z1)=vpa(solve(chebyshevT(N-1,2*x-1),x),5)
%D1 = sort(R,’descend’)
%G = transpose(g);
H1(x) = diff(H(x));
R1 = (C1*Dv1*H-gamma1*((C1*H)-(C2*H)));
R2 = (C2*Dv1*H+(4*gamma1*(C2*H))-((C1*H)*(C3*H))-(gamma2*(C1*H)^(3)));
R3 = (C3*Dv1*H+(gamma1*gamma4*(C3*H))-(((C1*H)^(3))*(C2*H))-(gamma3*(C3*H)^(2)));
% R1 = ((C1*Dv1*H)-a.*(y(1))+b.*((y(1)).*(y(2))));
% R2 = ((C2*Dv1*H)-c.*(((y(1)).*(y(2))))+d.*((y(2))));
t1=ceil(v1);t2=ceil(v2);
for i = 1:N-t1
eqn0(i) = R1(R(i))
%eqn0(i) = int((R1*chebyshevT(i-1,2*x-1)),x,0,1)
end
for i=1:N-t1
eqn1(i) = R2(R(i))
end
for i=1:N-t1
eqn2(i) = R3(R(i))
end
eqn3=(C1)*H(0)-2.6;
eqn4=(C2)*(H(0))-1.8;
eqn5 = (C3)*(H(0))-2.5;
equations1 = [eqn0,eqn1,eqn2,eqn3,eqn4,eqn5];
f =@(c,d,e) [2.7071067811865532348747365176678*c(2) – c(1) – 5.6568542494924420306571438691514*c(3) + 5.292893218813663426931852838572*c(4) + 0.99999999999963452967090203902407*c(5) – 10.707106781186253043585270572838*c(6) + 16.970562748477326091971431589745*c(7) + d(1) – 0.70710678118655323487473651766777*d(2) + 0.000000000000016151659251727809284198242756759*d(3) + 0.70710678118653039297916789513938*d(4) – 0.99999999999999999999999999947825*d(5) + 0.70710678118657607677030513945829*d(6) – 0.000000000000048454977755183427852594727351922*d(7); 1.2928932188133330782875418663025*c(2) – c(1) + 5.6568542494929976671048748761924*c(3) + 6.7071067811902418116034852470151*c(4) + 1.0000000000076414279432830892593*c(5) – 9.2928932188061013571452785519551*c(6) – 16.970562748478993001314616886895*c(7) + d(1) + 0.70710678118666692171245813369751*d(2) + 0.00000000000033770659479019338766497999870797*d(3) – 0.70710678118618933246600292636309*d(4) – 0.99999999999999999999999977190851*d(5) – 0.70710678118714451095891301846186*d(6) – 0.0000000000010131197843705801629949407484403*d(7);
2.2588190451025411675800569355488*c(2) – c(1) – 1.2045269570359118189265060549051*c(3) – 5.0994116265996025979660812602431*c(4) + 6.6726037773448918964171398156432*c(5) + 3.6454177505992816039159838845192*c(6) – 12.423314164921193664470552934672*c(7) + d(1) – 0.25881904510254116758005693554878*d(2) – 0.86602540378441752171394942948519*d(3) + 0.70710678118659233739868810642085*d(4) + 0.49999999999992682068095891830983*d(5) – 0.96592582628909562457579410802636*d(6) + 0.00000000000012675029864244296874022498106152*d(7); 1.741180954897572519257664680481*c(2) – c(1) + 2.9365777646039550649277513046591*c(3) – 3.6851980642280799640942290841422*c(4) – 7.6726037773429774645179663364753*c(5) + 1.7135660980270430271605604380751*c(6) + 12.42331416492125455483396912414*c(7) + d(1) + 0.25881904510242748074233531951904*d(2) – 0.8660254037845352189890687485068*d(3) – 0.70710678118634266377459589793939*d(4) + 0.50000000000033453600179708174969*d(5) + 0.96592582628894331309400622678268*d(6) – 0.00000000000057943335207356344385823017649482*d(7);
2.9659258262890944024547934532166*c(2) – c(1) – 8.5934320140972947697379899486242*c(3) + 17.099411626601236173895770571656*c(4) – 27.268521719614045141886628745433*c(5) + 37.579327120800789878210967353833*c(6) – 46.364439661893342936680399633656*c(7) + d(1) – 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) – 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) – 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449564958666*d(7); 1.0340741737109055975452065467834*c(2) – c(1) + 6.8613812065282156695387053028407*c(3) + 15.685198064227713028495645177746*c(4) + 26.268521719613346063068768060046*c(5) + 37.061689030594773702131939269591*c(6) + 46.364439661892132096649369596372*c(7) + d(1) + 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) + 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) + 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449492408624*d(7);
4*d(1) – 0.82842712474621293949894607067108*d(2) – 5.656854249492361272360885230105*d(3) + 8.8284271247463153918276923142689*d(4) – 4.0000000000003654703290979583672*d(5) – 7.1715728752533726597337448755461*d(6) + 16.970562748477083817082655672606*d(7) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))*(e(1) – 0.70710678118655323487473651766777*e(2) + 0.000000000000016151659251727809284198242756759*e(3) + 0.70710678118653039297916789513938*e(4) – 0.99999999999999999999999999947825*e(5) + 0.70710678118657607677030513945829*e(6) – 0.000000000000048454977755183427852594727351922*e(7)) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))^3;
4*d(1) + 4.82842712474666768684983253479*d(2) + 5.6568542494946862000788258431307*d(3) + 3.1715728752592951492734706151996*d(4) – 3.9999999999923585720567157702833*d(5) – 12.828427124741823911939843644264*d(6) – 16.97056274848405860023646978771*d(7) + (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))^3 – (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))*(0.70710678118618933246600292636309*e(4) – 0.70710678118666692171245813369751*e(2) – 0.00000000000033770659479019338766497999870797*e(3) – e(1) + 0.99999999999999999999999977190851*e(5) + 0.70710678118714451095891301846186*e(6) + 0.0000000000010131197843705801629949407484403*e(7));
4*d(1) + 0.96472381958983532967977225780487*d(2) – 5.534653975957999427496253202331*d(3) – 1.5638777206666409109726407281389*d(4) + 9.1726037773445259998219344071924*d(5) – 1.1842113808461965189629866556126*d(6) – 12.423314164920559912977340719828*d(7) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))*(e(1) – 0.25881904510254116758005693554878*e(2) – 0.86602540378441752171394942948519*e(3) + 0.70710678118659233739868810642085*e(4) + 0.49999999999992682068095891830983*e(5) – 0.96592582628909562457579410802636*e(6) + 0.00000000000012675029864244296874022498106152*e(7)) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))^3;
4*d(1) + 3.0352761804097099229693412780762*d(2) – 1.3935492543187210300175924378749*d(3) – 7.2207319701597932829672085738392*d(4) – 5.1726037773413047845089809277269*d(5) + 6.5431952294717595926305915719885*d(6) + 12.423314164918357388073601306921*d(7) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))*(e(1) + 0.25881904510242748074233531951904*e(2) – 0.8660254037845352189890687485068*e(3) – 0.70710678118634266377459589793939*e(4) + 0.50000000000033453600179708174969*e(5) + 0.96592582628894331309400622678268*e(6) – 0.00000000000057943335207356344385823017649482*e(7)) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))^3;
4*d(1) – 1.8637033051563776098191738128662*d(2) – 4.2633049951745970192397783341654*d(3) + 13.563877720667428310395457086882*d(4) – 24.768521719612297444841977031964*d(5) + 36.285231895285749438013397143228*d(6) – 46.364439661890315836602824540446*d(7) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))*(e(1) – 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) – 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) – 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449564958666*e(7)) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))^3;
4*d(1) + 5.8637033051563776098191738128662*d(2) + 11.191508225450913420036916917299*d(3) + 19.22073197016152089199595866252*d(4) + 28.768521719615093760113419773515*d(5) + 38.355784256109814142329509480196*d(6) + 46.364439661895159196726944689582*d(7) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))*(e(1) + 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) + 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) + 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449492408624*e(7)) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))^3;
e(1) + 1.2928932188134467651252634823322*e(2) – 5.6568542494924097273386404135329*e(3) + 6.7071067811867242128901886288508*e(4) – 1.0000000000003654703290979599324*e(5) – 9.292893218813100890044660293921*e(6) + 16.97056274847722918201592122289*e(7) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))^3*(d(1) – 0.70710678118655323487473651766777*d(2) + 0.000000000000016151659251727809284198242756759*d(3) + 0.70710678118653039297916789513938*d(4) – 0.99999999999999999999999999947825*d(5) + 0.70710678118657607677030513945829*d(6) – 0.000000000000048454977755183427852594727351922*d(7)) – (e(1) – 0.70710678118655323487473651766777*e(2) + 0.000000000000016151659251727809284198242756759*e(3) + 0.70710678118653039297916789513938*e(4) – 0.99999999999999999999999999947825*e(5) + 0.70710678118657607677030513945829*e(6) – 0.000000000000048454977755183427852594727351922*e(7))^2;
e(1) + 2.7071067811866669217124581336975*e(2) + 5.6568542494936730802944552629677*e(3) + 5.2928932188178631466714793942889*e(4) – 0.99999999999235857205671645455777*e(5) – 10.707106781180390379063104588879*e(6) – 16.970562748481019240883358047221*e(7) – (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))^3*(0.70710678118618933246600292636309*d(4) – 0.70710678118666692171245813369751*d(2) – 0.00000000000033770659479019338766497999870797*d(3) – d(1) + 0.99999999999999999999999977190851*d(5) + 0.70710678118714451095891301846186*d(6) + 0.0000000000010131197843705801629949407484403*d(7)) – (0.70710678118618933246600292636309*e(4) – 0.70710678118666692171245813369751*e(2) – 0.00000000000033770659479019338766497999870797*e(3) – e(1) + 0.99999999999999999999999977190851*e(5) + 0.70710678118714451095891301846186*e(6) + 0.0000000000010131197843705801629949407484403*e(7))^2;
e(1) + 1.7411809548974588324199430644512*e(2) – 2.9365777646047468623544049138754*e(3) – 3.6851980642264179231687050474014*e(4) + 7.6726037773447455377790576522629*e(5) + 1.7135660980210903547643956684664*e(6) – 12.423314164920940163873268048734*e(7) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))^3*(d(1) – 0.25881904510254116758005693554878*d(2) – 0.86602540378441752171394942948519*d(3) + 0.70710678118659233739868810642085*d(4) + 0.49999999999992682068095891830983*d(5) – 0.96592582628909562457579410802636*d(6) + 0.00000000000012675029864244296874022498106152*d(7)) – (e(1) – 0.25881904510254116758005693554878*e(2) – 0.86602540378441752171394942948519*e(3) + 0.70710678118659233739868810642085*e(4) + 0.49999999999992682068095891830983*e(5) – 0.96592582628909562457579410802636*e(6) + 0.00000000000012675029864244296874022498106152*e(7))^2;
e(1) + 2.258819045102427480742335319519*e(2) + 1.2045269570348846269496138076455*e(3) – 5.099411626600765291643420880021*e(4) – 6.6726037773423083925143721729759*e(5) + 3.6454177506049296533485728916404*e(6) + 12.423314164920095688129821997252*e(7) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))^3*(d(1) + 0.25881904510242748074233531951904*d(2) – 0.8660254037845352189890687485068*d(3) – 0.70710678118634266377459589793939*d(4) + 0.50000000000033453600179708174969*d(5) + 0.96592582628894331309400622678268*d(6) – 0.00000000000057943335207356344385823017649482*d(7)) – (e(1) + 0.25881904510242748074233531951904*e(2) – 0.8660254037845352189890687485068*e(3) – 0.70710678118634266377459589793939*e(4) + 0.50000000000033453600179708174969*e(5) + 0.96592582628894331309400622678268*e(6) – 0.00000000000057943335207356344385823017649482*e(7))^2;
e(1) + 1.0340741737109055975452065467834*e(2) – 6.8613812065282156695387053028407*e(3) + 15.685198064227713028495645177746*e(4) – 26.268521719613346063068768060046*e(5) + 37.061689030594773702131939269591*e(6) – 46.364439661892132096649369596372*e(7) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))^3*(d(1) – 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) – 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) – 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449564958666*d(7)) – (e(1) – 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) – 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) – 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449564958666*e(7))^2;
e(1) + 2.9659258262890944024547934532166*e(2) + 8.5934320140972947697379899486242*e(3) + 17.099411626601236173895770571656*e(4) + 27.268521719614045141886628745433*e(5) + 37.579327120800789878210967353833*e(6) + 46.364439661893342936680399633656*e(7) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))^3*(d(1) + 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) + 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) + 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449492408624*d(7)) – (e(1) + 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) + 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) + 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449492408624*e(7))^2;
c(1) – c(2) + c(3) – c(4) + c(5) – c(6) + c(7) – 1; d(1) – d(2) + d(3) – d(4) + d(5) – d(6) + d(7) – 1; e(1) – e(2) + e(3) – e(4) + e(5) – e(6) + e(7) – 1]
% 2*c(2) – c(1) + 1.0*c(3) – 6.0*c(4) + d(1) – 1.0*d(3);
% 2.8660254037844197227968834340572*c(2) – c(1) – 7.4282032302752922278309731279771*c(3) + 11.999999999999099801669829449778*c(4) + d(1) – 0.86602540378441972279688343405724*d(2) + 0.49999999999993444545590565551924*d(3) + 0.00000000000011354380103841645254673828148123*d(4);
% 1.133974596215466590365394949913*c(2) – c(1) + 6.4282032302759390088627633740404*c(3) + 12.000000000003370641343632950538*c(4) + d(1) + 0.86602540378453340963460505008698*d(2) + 0.50000000000032826821407702665543*d(3) + 0.00000000000056857722529136932714864072658515*d(4);
% 4*d(1) + 2*d(2) – 4.0*d(3) – 6.0*d(4) – (c(1) – 1.0*c(3))^3 – (c(1) – 1.0*c(3))*(e(1) – 1.0*e(3));
% 4*d(1) – 1.4641016151376788911875337362289*d(2) – 4.9282032302756200005514448503809*d(3) + 11.999999999999667520675021532041*d(4) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))*(e(1) – 0.86602540378441972279688343405724*e(2) + 0.49999999999993444545590565551924*e(3) + 0.00000000000011354380103841645254673828148123*e(4)) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))^3;
% 4*d(1) + 5.4641016151381336385384202003479*d(2) + 8.9282032302775803499331485073175*d(3) + 12.000000000006213527470089797174*d(4) – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))^3 – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))*(e(1) + 0.86602540378453340963460505008698*e(2) + 0.50000000000032826821407702665543*e(3) + 0.00000000000056857722529136932714864072658515*e(4));
% e(1) + 2*e(2) – 1.0*e(3) – 6.0*e(4) – (e(1) – 1.0*e(3))^2 – (c(1) – 1.0*c(3))^3*(d(1) – 1.0*d(3));
% e(1) + 1.1339745962155802772031165659428*e(2) – 6.4282032302754233369191618169386*e(3) + 11.999999999999326889271906282683*e(4) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))^3*(d(1) – 0.86602540378441972279688343405724*d(2) + 0.49999999999993444545590565551924*d(3) + 0.00000000000011354380103841645254673828148123*d(4)) – (e(1) – 0.86602540378441972279688343405724*e(2) + 0.49999999999993444545590565551924*e(3) + 0.00000000000011354380103841645254673828148123*e(4))^2;
% e(1) + 2.866025403784533409634605050087*e(2) + 7.4282032302765955452909174273512*e(3) + 12.000000000004507795794215689192*e(4) – (e(1) + 0.86602540378453340963460505008698*e(2) + 0.50000000000032826821407702665543*e(3) + 0.00000000000056857722529136932714864072658515*e(4))^2 – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))^3*(d(1) + 0.86602540378453340963460505008698*d(2) + 0.50000000000032826821407702665543*d(3) + 0.00000000000056857722529136932714864072658515*d(4));
% c(1) – c(2) + c(3) – c(4) – 1; d(1) – d(2) + d(3) – d(4) – 1; e(1) – e(2) + e(3) – e(4) – 1]
intial = zeros(1,N);
solution1 = fsolve(@(vars) f(vars(1:7),vars(8:14),vars(15:21)),[intial;intial;intial])
X1 = reshape(solution1,N,size);
approxsol1(x) = transpose(X1(:,1))*H
%approxsolA1(x) = transpose(X3(:,1))*H
approxsol2(x) = transpose(X1(:,2))*H
%approxsolA2(x) =transpose(X3(:,2))*H
approxsol3(x) = transpose(X1(:,3))*H
y0 = [1;1;1];
tspan = 0:0.1:1;
[t, y] = ode45(@myODEs, tspan, y0);
% figure(1)
% plot(t, y(:,1))
x1=0:0.1:1
figure(1)
plot(x1,approxsol2(x1))
hold on
plot(t,y(:,2),’o’ )
% figure(2)
% plot(x1,approxsol2(x1))
% figure(3)
% plot(x1 I want to solve large number of nonlinear system of equation using fsolve . I am solving by assigning in f as f =@(c,d,e) []; likewaise but in these process i have to copy the equation in commaand window after running the code and put in f the we solve using fsolve but these is lengthy process for large value of N. pleases provide some code for shortcut.
clc;
close all
clear all
syms x k l p m h y k0 r
N=7;
size=3;gamma1=1;gamma2=1;gamma3=1;gamma4=1;
for i7=1:N
syms c(i7)
end
for i8 =1:N
syms d(i8)
end
for i9 =1:N
syms e(i8)
end
for i=1:N
symsX(i,:) = c(i);
end
for i=1:N
symsY(i,:) = d(i);
end
for i=1:N
symsZ(i,:) = e(i);
end
C1 = transpose(symsX)
%sym(‘c’, [1 N]);
C2 = transpose(symsY)
C3 = transpose(symsZ)
%A=c;
equations = sym(zeros(1,N));
D = [];L=1;
G = [];
Dv1 = [];
Dv2 = [];
v1 = 1;
v2 = 1;
for i=1:N
if i==1
n(i)=2
else
n(i)=1
end
end
for i=1:N
h(i) = (n(i)*pi)/2;
end
k1=1;k2=3;k3=5;k4=7;k5=9;k6=11;k7=13;k8=15;k9=17;k10=19;k11=21;k12=23;k14=25;k15=27;k16=29;
for i=1:N
for j=1:N
if(j==i-k1)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k2)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k3)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k4)
D(i,j)=((4*(i-1))/(n(j)*L)) ;
elseif(j==i-k5)
D(i,j)= ((4*(i-1))/(n(j)*L)) ;
elseif(j==i-k6)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k7)
D(i,j)= ((4*(i-1))/(n(j)*L));
elseif(j==i-k8)
D(i,j)= ((4*(i-1))/(n(j)*L))
elseif(j==i-k9)
D(i,j)= ((4*(i-1))/(n(j)*L))
elseif(j==i-k10)
D(i,j)= ((4*(i-1))/(n(j)*L))
else
D(i,j)=0;
end
end
end
for m=1:N
symT(m,:) = chebyshevT(m-1,2*x-1)
end
H(x) = symT
%% legender operational matrix for fractional derivatives
%% d^n(symT)/dx^n = (D^n)*symT
%B = D*symT
%% Dv is the COM derivative of oder v>0 the caputo sense
Dv1=[];
t=ceil(v1)
for i=1:N
for j=1:N
if(i<=t)
Dv=zeros(t,j);
elseif (j==1)
Dv1(i,j) = symsum(((((i-1)*(-1)^(i-1-k)*factorial(i-1+k-1)*2^(2*k)*factorial(k)*gamma(k-v1+1/2))/(L^(v1)*factorial(i-1-k)*factorial(2*k)*sqrt(pi)*(gamma(k-v1+1)^(2))))),k,t,i-1);
else
Dv1(i,j) = (i-1)*symsum(((((-1)^((i-1)-k0)*(j-1)*factorial(i-1+k0-1)*(2^(2*k0+1))*factorial(k0))/(L^(v1)*factorial((i-1)-k0)*factorial(2*k0)*sqrt(pi)*(gamma(k0-v1+1))))*symsum((((-1)^(j-1-r)*factorial(j-1+r-1)*(2^(2*r))*gamma(k0+r-v1+1/2))/(factorial(j-1-r)*factorial(2*r)*gamma(k0+r-v1+1))),r,0,j-1)),k0,t,i-1)
%Dv(i,j)= symsum(((((-1)^((i-1)-k)*(2*(i-1))*factorial((i-1)+k-1)*gamma(k-v+(1/2)))/(n(j)*L^(v)*gamma(k+(1/2))*factorial((i-1)-k)*gamma(k-v-(j-1)+1)*gamma(k+(j-1)-v+1)))),k,t,i-1)
% Dv(i,j)=symsum(((2*(j-1)+1)*symsum((((-1)^((i-1)+(j-1)+k+l)*factorial((i-1)+k)*factorial(l+(j-1)))/(factorial((i-1)-k)*factorial(k)*gamma(k-v+1)*factorial((j-1)-l)*(factorial(l))^(2)*(k+l-v+1))),l,0,j-1)),k,t,i-1);
end
end
end
Dv2=[];
t=ceil(v2)
for i=1:N
for j=1:N
if(i<=t)
Dv2=zeros(t,j);
elseif (j==1)
Dv2(i,j) = symsum(((((i-1)*(-1)^(i-1-k)*factorial(i-1+k-1)*2^(2*k)*factorial(k)*gamma(k-v2+1/2))/(L^(v2)*factorial(i-1-k)*factorial(2*k)*sqrt(pi)*(gamma(k-v2+1)^(2))))),k,t,i-1);
else
Dv2(i,j) = (i-1)*symsum(((((-1)^((i-1)-k0)*(j-1)*factorial(i-1+k0-1)*(2^(2*k0+1))*factorial(k0))/(L^(v2)*factorial((i-1)-k0)*factorial(2*k0)*sqrt(pi)*(gamma(k0-v2+1))))*symsum((((-1)^(j-1-r)*factorial(j-1+r-1)*(2^(2*r))*gamma(k0+r-v2+1/2))/(factorial(j-1-r)*factorial(2*r)*gamma(k0+r-v2+1))),r,0,j-1)),k0,t,i-1)
%Dv(i,j)= symsum(((((-1)^((i-1)-k)*(2*(i-1))*factorial((i-1)+k-1)*gamma(k-v+(1/2)))/(n(j)*L^(v)*gamma(k+(1/2))*factorial((i-1)-k)*gamma(k-v-(j-1)+1)*gamma(k+(j-1)-v+1)))),k,t,i-1)
% Dv(i,j)=symsum(((2*(j-1)+1)*symsum((((-1)^((i-1)+(j-1)+k+l)*factorial((i-1)+k)*factorial(l+(j-1)))/(factorial((i-1)-k)*factorial(k)*gamma(k-v+1)*factorial((j-1)-l)*(factorial(l))^(2)*(k+l-v+1))),l,0,j-1)),k,t,i-1);
end
end
end
y(1) = C1*H;y(2)=C2*H;y(3)=C3*H
g=zeros(N,1);a=1;b=1;c=1;d=1;
% xmin=0;xmax=1;
% for i = 1:N
% f = @(x) (1+x) .* (1 ./ sqrt(L.*x – x.^2)); % Define f(x) inside the loop
% func = @(x) f(x) .* chebyshevT(i-1, (2*x/L) – 1); % Define the function to integrate
% g(i) = (1 / h(i)) .* integral(func, xmin, xmax);
% end
%% solve system of fractional order D^(1.5)y1 = y2 $ D^(0.5) = -y2-y1+1+x
z1=1:N-1
R(z1)=vpa(solve(chebyshevT(N-1,2*x-1),x),5)
%D1 = sort(R,’descend’)
%G = transpose(g);
H1(x) = diff(H(x));
R1 = (C1*Dv1*H-gamma1*((C1*H)-(C2*H)));
R2 = (C2*Dv1*H+(4*gamma1*(C2*H))-((C1*H)*(C3*H))-(gamma2*(C1*H)^(3)));
R3 = (C3*Dv1*H+(gamma1*gamma4*(C3*H))-(((C1*H)^(3))*(C2*H))-(gamma3*(C3*H)^(2)));
% R1 = ((C1*Dv1*H)-a.*(y(1))+b.*((y(1)).*(y(2))));
% R2 = ((C2*Dv1*H)-c.*(((y(1)).*(y(2))))+d.*((y(2))));
t1=ceil(v1);t2=ceil(v2);
for i = 1:N-t1
eqn0(i) = R1(R(i))
%eqn0(i) = int((R1*chebyshevT(i-1,2*x-1)),x,0,1)
end
for i=1:N-t1
eqn1(i) = R2(R(i))
end
for i=1:N-t1
eqn2(i) = R3(R(i))
end
eqn3=(C1)*H(0)-2.6;
eqn4=(C2)*(H(0))-1.8;
eqn5 = (C3)*(H(0))-2.5;
equations1 = [eqn0,eqn1,eqn2,eqn3,eqn4,eqn5];
f =@(c,d,e) [2.7071067811865532348747365176678*c(2) – c(1) – 5.6568542494924420306571438691514*c(3) + 5.292893218813663426931852838572*c(4) + 0.99999999999963452967090203902407*c(5) – 10.707106781186253043585270572838*c(6) + 16.970562748477326091971431589745*c(7) + d(1) – 0.70710678118655323487473651766777*d(2) + 0.000000000000016151659251727809284198242756759*d(3) + 0.70710678118653039297916789513938*d(4) – 0.99999999999999999999999999947825*d(5) + 0.70710678118657607677030513945829*d(6) – 0.000000000000048454977755183427852594727351922*d(7); 1.2928932188133330782875418663025*c(2) – c(1) + 5.6568542494929976671048748761924*c(3) + 6.7071067811902418116034852470151*c(4) + 1.0000000000076414279432830892593*c(5) – 9.2928932188061013571452785519551*c(6) – 16.970562748478993001314616886895*c(7) + d(1) + 0.70710678118666692171245813369751*d(2) + 0.00000000000033770659479019338766497999870797*d(3) – 0.70710678118618933246600292636309*d(4) – 0.99999999999999999999999977190851*d(5) – 0.70710678118714451095891301846186*d(6) – 0.0000000000010131197843705801629949407484403*d(7);
2.2588190451025411675800569355488*c(2) – c(1) – 1.2045269570359118189265060549051*c(3) – 5.0994116265996025979660812602431*c(4) + 6.6726037773448918964171398156432*c(5) + 3.6454177505992816039159838845192*c(6) – 12.423314164921193664470552934672*c(7) + d(1) – 0.25881904510254116758005693554878*d(2) – 0.86602540378441752171394942948519*d(3) + 0.70710678118659233739868810642085*d(4) + 0.49999999999992682068095891830983*d(5) – 0.96592582628909562457579410802636*d(6) + 0.00000000000012675029864244296874022498106152*d(7); 1.741180954897572519257664680481*c(2) – c(1) + 2.9365777646039550649277513046591*c(3) – 3.6851980642280799640942290841422*c(4) – 7.6726037773429774645179663364753*c(5) + 1.7135660980270430271605604380751*c(6) + 12.42331416492125455483396912414*c(7) + d(1) + 0.25881904510242748074233531951904*d(2) – 0.8660254037845352189890687485068*d(3) – 0.70710678118634266377459589793939*d(4) + 0.50000000000033453600179708174969*d(5) + 0.96592582628894331309400622678268*d(6) – 0.00000000000057943335207356344385823017649482*d(7);
2.9659258262890944024547934532166*c(2) – c(1) – 8.5934320140972947697379899486242*c(3) + 17.099411626601236173895770571656*c(4) – 27.268521719614045141886628745433*c(5) + 37.579327120800789878210967353833*c(6) – 46.364439661893342936680399633656*c(7) + d(1) – 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) – 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) – 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449564958666*d(7); 1.0340741737109055975452065467834*c(2) – c(1) + 6.8613812065282156695387053028407*c(3) + 15.685198064227713028495645177746*c(4) + 26.268521719613346063068768060046*c(5) + 37.061689030594773702131939269591*c(6) + 46.364439661892132096649369596372*c(7) + d(1) + 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) + 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) + 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449492408624*d(7);
4*d(1) – 0.82842712474621293949894607067108*d(2) – 5.656854249492361272360885230105*d(3) + 8.8284271247463153918276923142689*d(4) – 4.0000000000003654703290979583672*d(5) – 7.1715728752533726597337448755461*d(6) + 16.970562748477083817082655672606*d(7) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))*(e(1) – 0.70710678118655323487473651766777*e(2) + 0.000000000000016151659251727809284198242756759*e(3) + 0.70710678118653039297916789513938*e(4) – 0.99999999999999999999999999947825*e(5) + 0.70710678118657607677030513945829*e(6) – 0.000000000000048454977755183427852594727351922*e(7)) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))^3;
4*d(1) + 4.82842712474666768684983253479*d(2) + 5.6568542494946862000788258431307*d(3) + 3.1715728752592951492734706151996*d(4) – 3.9999999999923585720567157702833*d(5) – 12.828427124741823911939843644264*d(6) – 16.97056274848405860023646978771*d(7) + (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))^3 – (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))*(0.70710678118618933246600292636309*e(4) – 0.70710678118666692171245813369751*e(2) – 0.00000000000033770659479019338766497999870797*e(3) – e(1) + 0.99999999999999999999999977190851*e(5) + 0.70710678118714451095891301846186*e(6) + 0.0000000000010131197843705801629949407484403*e(7));
4*d(1) + 0.96472381958983532967977225780487*d(2) – 5.534653975957999427496253202331*d(3) – 1.5638777206666409109726407281389*d(4) + 9.1726037773445259998219344071924*d(5) – 1.1842113808461965189629866556126*d(6) – 12.423314164920559912977340719828*d(7) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))*(e(1) – 0.25881904510254116758005693554878*e(2) – 0.86602540378441752171394942948519*e(3) + 0.70710678118659233739868810642085*e(4) + 0.49999999999992682068095891830983*e(5) – 0.96592582628909562457579410802636*e(6) + 0.00000000000012675029864244296874022498106152*e(7)) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))^3;
4*d(1) + 3.0352761804097099229693412780762*d(2) – 1.3935492543187210300175924378749*d(3) – 7.2207319701597932829672085738392*d(4) – 5.1726037773413047845089809277269*d(5) + 6.5431952294717595926305915719885*d(6) + 12.423314164918357388073601306921*d(7) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))*(e(1) + 0.25881904510242748074233531951904*e(2) – 0.8660254037845352189890687485068*e(3) – 0.70710678118634266377459589793939*e(4) + 0.50000000000033453600179708174969*e(5) + 0.96592582628894331309400622678268*e(6) – 0.00000000000057943335207356344385823017649482*e(7)) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))^3;
4*d(1) – 1.8637033051563776098191738128662*d(2) – 4.2633049951745970192397783341654*d(3) + 13.563877720667428310395457086882*d(4) – 24.768521719612297444841977031964*d(5) + 36.285231895285749438013397143228*d(6) – 46.364439661890315836602824540446*d(7) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))*(e(1) – 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) – 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) – 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449564958666*e(7)) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))^3;
4*d(1) + 5.8637033051563776098191738128662*d(2) + 11.191508225450913420036916917299*d(3) + 19.22073197016152089199595866252*d(4) + 28.768521719615093760113419773515*d(5) + 38.355784256109814142329509480196*d(6) + 46.364439661895159196726944689582*d(7) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))*(e(1) + 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) + 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) + 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449492408624*e(7)) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))^3;
e(1) + 1.2928932188134467651252634823322*e(2) – 5.6568542494924097273386404135329*e(3) + 6.7071067811867242128901886288508*e(4) – 1.0000000000003654703290979599324*e(5) – 9.292893218813100890044660293921*e(6) + 16.97056274847722918201592122289*e(7) – (c(1) – 0.70710678118655323487473651766777*c(2) + 0.000000000000016151659251727809284198242756759*c(3) + 0.70710678118653039297916789513938*c(4) – 0.99999999999999999999999999947825*c(5) + 0.70710678118657607677030513945829*c(6) – 0.000000000000048454977755183427852594727351922*c(7))^3*(d(1) – 0.70710678118655323487473651766777*d(2) + 0.000000000000016151659251727809284198242756759*d(3) + 0.70710678118653039297916789513938*d(4) – 0.99999999999999999999999999947825*d(5) + 0.70710678118657607677030513945829*d(6) – 0.000000000000048454977755183427852594727351922*d(7)) – (e(1) – 0.70710678118655323487473651766777*e(2) + 0.000000000000016151659251727809284198242756759*e(3) + 0.70710678118653039297916789513938*e(4) – 0.99999999999999999999999999947825*e(5) + 0.70710678118657607677030513945829*e(6) – 0.000000000000048454977755183427852594727351922*e(7))^2;
e(1) + 2.7071067811866669217124581336975*e(2) + 5.6568542494936730802944552629677*e(3) + 5.2928932188178631466714793942889*e(4) – 0.99999999999235857205671645455777*e(5) – 10.707106781180390379063104588879*e(6) – 16.970562748481019240883358047221*e(7) – (0.70710678118618933246600292636309*c(4) – 0.70710678118666692171245813369751*c(2) – 0.00000000000033770659479019338766497999870797*c(3) – c(1) + 0.99999999999999999999999977190851*c(5) + 0.70710678118714451095891301846186*c(6) + 0.0000000000010131197843705801629949407484403*c(7))^3*(0.70710678118618933246600292636309*d(4) – 0.70710678118666692171245813369751*d(2) – 0.00000000000033770659479019338766497999870797*d(3) – d(1) + 0.99999999999999999999999977190851*d(5) + 0.70710678118714451095891301846186*d(6) + 0.0000000000010131197843705801629949407484403*d(7)) – (0.70710678118618933246600292636309*e(4) – 0.70710678118666692171245813369751*e(2) – 0.00000000000033770659479019338766497999870797*e(3) – e(1) + 0.99999999999999999999999977190851*e(5) + 0.70710678118714451095891301846186*e(6) + 0.0000000000010131197843705801629949407484403*e(7))^2;
e(1) + 1.7411809548974588324199430644512*e(2) – 2.9365777646047468623544049138754*e(3) – 3.6851980642264179231687050474014*e(4) + 7.6726037773447455377790576522629*e(5) + 1.7135660980210903547643956684664*e(6) – 12.423314164920940163873268048734*e(7) – (c(1) – 0.25881904510254116758005693554878*c(2) – 0.86602540378441752171394942948519*c(3) + 0.70710678118659233739868810642085*c(4) + 0.49999999999992682068095891830983*c(5) – 0.96592582628909562457579410802636*c(6) + 0.00000000000012675029864244296874022498106152*c(7))^3*(d(1) – 0.25881904510254116758005693554878*d(2) – 0.86602540378441752171394942948519*d(3) + 0.70710678118659233739868810642085*d(4) + 0.49999999999992682068095891830983*d(5) – 0.96592582628909562457579410802636*d(6) + 0.00000000000012675029864244296874022498106152*d(7)) – (e(1) – 0.25881904510254116758005693554878*e(2) – 0.86602540378441752171394942948519*e(3) + 0.70710678118659233739868810642085*e(4) + 0.49999999999992682068095891830983*e(5) – 0.96592582628909562457579410802636*e(6) + 0.00000000000012675029864244296874022498106152*e(7))^2;
e(1) + 2.258819045102427480742335319519*e(2) + 1.2045269570348846269496138076455*e(3) – 5.099411626600765291643420880021*e(4) – 6.6726037773423083925143721729759*e(5) + 3.6454177506049296533485728916404*e(6) + 12.423314164920095688129821997252*e(7) – (c(1) + 0.25881904510242748074233531951904*c(2) – 0.8660254037845352189890687485068*c(3) – 0.70710678118634266377459589793939*c(4) + 0.50000000000033453600179708174969*c(5) + 0.96592582628894331309400622678268*c(6) – 0.00000000000057943335207356344385823017649482*c(7))^3*(d(1) + 0.25881904510242748074233531951904*d(2) – 0.8660254037845352189890687485068*d(3) – 0.70710678118634266377459589793939*d(4) + 0.50000000000033453600179708174969*d(5) + 0.96592582628894331309400622678268*d(6) – 0.00000000000057943335207356344385823017649482*d(7)) – (e(1) + 0.25881904510242748074233531951904*e(2) – 0.8660254037845352189890687485068*e(3) – 0.70710678118634266377459589793939*e(4) + 0.50000000000033453600179708174969*e(5) + 0.96592582628894331309400622678268*e(6) – 0.00000000000057943335207356344385823017649482*e(7))^2;
e(1) + 1.0340741737109055975452065467834*e(2) – 6.8613812065282156695387053028407*e(3) + 15.685198064227713028495645177746*e(4) – 26.268521719613346063068768060046*e(5) + 37.061689030594773702131939269591*e(6) – 46.364439661892132096649369596372*e(7) – (c(1) – 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) – 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) – 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449564958666*c(7))^3*(d(1) – 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) – 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) – 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449564958666*d(7)) – (e(1) – 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) – 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) – 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449564958666*e(7))^2;
e(1) + 2.9659258262890944024547934532166*e(2) + 8.5934320140972947697379899486242*e(3) + 17.099411626601236173895770571656*e(4) + 27.268521719614045141886628745433*e(5) + 37.579327120800789878210967353833*e(6) + 46.364439661893342936680399633656*e(7) – (c(1) + 0.96592582628909440245479345321655*c(2) + 0.86602540378453955009964232289175*c(3) + 0.70710678118676157270006269695467*c(4) + 0.50000000000034953940893034269384*c(5) + 0.25881904510300808803951404212103*c(6) + 0.00000000000060542001551501864197449492408624*c(7))^3*(d(1) + 0.96592582628909440245479345321655*d(2) + 0.86602540378453955009964232289175*d(3) + 0.70710678118676157270006269695467*d(4) + 0.50000000000034953940893034269384*d(5) + 0.25881904510300808803951404212103*d(6) + 0.00000000000060542001551501864197449492408624*d(7)) – (e(1) + 0.96592582628909440245479345321655*e(2) + 0.86602540378453955009964232289175*e(3) + 0.70710678118676157270006269695467*e(4) + 0.50000000000034953940893034269384*e(5) + 0.25881904510300808803951404212103*e(6) + 0.00000000000060542001551501864197449492408624*e(7))^2;
c(1) – c(2) + c(3) – c(4) + c(5) – c(6) + c(7) – 1; d(1) – d(2) + d(3) – d(4) + d(5) – d(6) + d(7) – 1; e(1) – e(2) + e(3) – e(4) + e(5) – e(6) + e(7) – 1]
% 2*c(2) – c(1) + 1.0*c(3) – 6.0*c(4) + d(1) – 1.0*d(3);
% 2.8660254037844197227968834340572*c(2) – c(1) – 7.4282032302752922278309731279771*c(3) + 11.999999999999099801669829449778*c(4) + d(1) – 0.86602540378441972279688343405724*d(2) + 0.49999999999993444545590565551924*d(3) + 0.00000000000011354380103841645254673828148123*d(4);
% 1.133974596215466590365394949913*c(2) – c(1) + 6.4282032302759390088627633740404*c(3) + 12.000000000003370641343632950538*c(4) + d(1) + 0.86602540378453340963460505008698*d(2) + 0.50000000000032826821407702665543*d(3) + 0.00000000000056857722529136932714864072658515*d(4);
% 4*d(1) + 2*d(2) – 4.0*d(3) – 6.0*d(4) – (c(1) – 1.0*c(3))^3 – (c(1) – 1.0*c(3))*(e(1) – 1.0*e(3));
% 4*d(1) – 1.4641016151376788911875337362289*d(2) – 4.9282032302756200005514448503809*d(3) + 11.999999999999667520675021532041*d(4) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))*(e(1) – 0.86602540378441972279688343405724*e(2) + 0.49999999999993444545590565551924*e(3) + 0.00000000000011354380103841645254673828148123*e(4)) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))^3;
% 4*d(1) + 5.4641016151381336385384202003479*d(2) + 8.9282032302775803499331485073175*d(3) + 12.000000000006213527470089797174*d(4) – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))^3 – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))*(e(1) + 0.86602540378453340963460505008698*e(2) + 0.50000000000032826821407702665543*e(3) + 0.00000000000056857722529136932714864072658515*e(4));
% e(1) + 2*e(2) – 1.0*e(3) – 6.0*e(4) – (e(1) – 1.0*e(3))^2 – (c(1) – 1.0*c(3))^3*(d(1) – 1.0*d(3));
% e(1) + 1.1339745962155802772031165659428*e(2) – 6.4282032302754233369191618169386*e(3) + 11.999999999999326889271906282683*e(4) – (c(1) – 0.86602540378441972279688343405724*c(2) + 0.49999999999993444545590565551924*c(3) + 0.00000000000011354380103841645254673828148123*c(4))^3*(d(1) – 0.86602540378441972279688343405724*d(2) + 0.49999999999993444545590565551924*d(3) + 0.00000000000011354380103841645254673828148123*d(4)) – (e(1) – 0.86602540378441972279688343405724*e(2) + 0.49999999999993444545590565551924*e(3) + 0.00000000000011354380103841645254673828148123*e(4))^2;
% e(1) + 2.866025403784533409634605050087*e(2) + 7.4282032302765955452909174273512*e(3) + 12.000000000004507795794215689192*e(4) – (e(1) + 0.86602540378453340963460505008698*e(2) + 0.50000000000032826821407702665543*e(3) + 0.00000000000056857722529136932714864072658515*e(4))^2 – (c(1) + 0.86602540378453340963460505008698*c(2) + 0.50000000000032826821407702665543*c(3) + 0.00000000000056857722529136932714864072658515*c(4))^3*(d(1) + 0.86602540378453340963460505008698*d(2) + 0.50000000000032826821407702665543*d(3) + 0.00000000000056857722529136932714864072658515*d(4));
% c(1) – c(2) + c(3) – c(4) – 1; d(1) – d(2) + d(3) – d(4) – 1; e(1) – e(2) + e(3) – e(4) – 1]
intial = zeros(1,N);
solution1 = fsolve(@(vars) f(vars(1:7),vars(8:14),vars(15:21)),[intial;intial;intial])
X1 = reshape(solution1,N,size);
approxsol1(x) = transpose(X1(:,1))*H
%approxsolA1(x) = transpose(X3(:,1))*H
approxsol2(x) = transpose(X1(:,2))*H
%approxsolA2(x) =transpose(X3(:,2))*H
approxsol3(x) = transpose(X1(:,3))*H
y0 = [1;1;1];
tspan = 0:0.1:1;
[t, y] = ode45(@myODEs, tspan, y0);
% figure(1)
% plot(t, y(:,1))
x1=0:0.1:1
figure(1)
plot(x1,approxsol2(x1))
hold on
plot(t,y(:,2),’o’ )
% figure(2)
% plot(x1,approxsol2(x1))
% figure(3)
% plot(x1 fsolve, solve MATLAB Answers — New Questions
how to write the right code to measure the elapsed time of this method d1 = diag(1./diag(A))
how to write the right code to measure the elapsed time of this method
d1 = diag(1./diag(A))how to write the right code to measure the elapsed time of this method
d1 = diag(1./diag(A)) how to write the right code to measure the elapsed time of this method
d1 = diag(1./diag(A)) # elapsed time MATLAB Answers — New Questions
Purview DLP reports
Which report type suits the top 10 files that have matched DLP policies?
a) DLP policy matches
b) incident reports
Which report type suits the top 10 files that have matched DLP policies?a) DLP policy matchesb) incident reports Read More
Senstivity analysis in GA
Hello,
Im working to minimise the total cost incurred to retailer by finding optimum value of maximum inventory level using Genetic algorithm. Im considering 4 subcosts (procurment, holding, expiry, lost sales) which have fixed rate (per unit qty). I have to do this over a time period (x days). Ive already done it over different time duration (1 month, and 3 yr). Each day in this time period has pre-determined demand (ie. units sold), taken from CSVDemand file.
How to conduct "senstivity analysis"? I tried searching and understood that i should record changes in result based on the changes in GA parameters. However, on varying the mutation function, selection function, mutation rate, population size, etc im getting the same results. No variation. Is that because of only 1 optimisation variable?
How should i do senstivity analysis then?
Ive attached the code below. TCFunc is the Objective function. GA_1 is the GA code. it was made with help of optimtask insert.
please provide some guidance.Hello,
Im working to minimise the total cost incurred to retailer by finding optimum value of maximum inventory level using Genetic algorithm. Im considering 4 subcosts (procurment, holding, expiry, lost sales) which have fixed rate (per unit qty). I have to do this over a time period (x days). Ive already done it over different time duration (1 month, and 3 yr). Each day in this time period has pre-determined demand (ie. units sold), taken from CSVDemand file.
How to conduct "senstivity analysis"? I tried searching and understood that i should record changes in result based on the changes in GA parameters. However, on varying the mutation function, selection function, mutation rate, population size, etc im getting the same results. No variation. Is that because of only 1 optimisation variable?
How should i do senstivity analysis then?
Ive attached the code below. TCFunc is the Objective function. GA_1 is the GA code. it was made with help of optimtask insert.
please provide some guidance. Hello,
Im working to minimise the total cost incurred to retailer by finding optimum value of maximum inventory level using Genetic algorithm. Im considering 4 subcosts (procurment, holding, expiry, lost sales) which have fixed rate (per unit qty). I have to do this over a time period (x days). Ive already done it over different time duration (1 month, and 3 yr). Each day in this time period has pre-determined demand (ie. units sold), taken from CSVDemand file.
How to conduct "senstivity analysis"? I tried searching and understood that i should record changes in result based on the changes in GA parameters. However, on varying the mutation function, selection function, mutation rate, population size, etc im getting the same results. No variation. Is that because of only 1 optimisation variable?
How should i do senstivity analysis then?
Ive attached the code below. TCFunc is the Objective function. GA_1 is the GA code. it was made with help of optimtask insert.
please provide some guidance. senstivity analysis, genetic algorithm, optimization MATLAB Answers — New Questions
I have error in FDM 2
function FDMex()
N = 100;
h = 0.1;
eta = 0:h:N;
Ac = 0.0001;
S = 0.2;
k = 0.1;
Pr = 1.0;
Sc = 1.2;
alpha1 = 0.4;
alpha2 = 0;
zeta = 0.3;
gamma = 0.3;
omega = 0.4;
fw = 0.2;
F = zeros(N+2, 1);
G = zeros(N+2, 1);
theta = zeros(N+2, 1);
phi = zeros(N+2, 1);
H = zeros(N+2, 1);
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S + fw / Sc * (phi(2) – phi(1)) / h^2;
F(N+2) = 0;
G(N+2) = 0;
theta(N+2) = 0;
phi(N+2) = 0;
c = 1.0;
while(c>0)
[H1, F1, G1, theta1, phi1] = equation(H,F,G,theta,phi,N,h);
c = 0.0;
for j = 1:N+1
if (abs(H(j)-H1(j))>Ac); (abs(F(j)-F1(j))>Ac);(abs(G(j)-G1(j))>Ac);(abs(theta(1)-theta1(1))>Ac);(abs(phi(j)-phi1(j))>Ac);
c = c+1;
break
end
end
H = H1;
F = F1;
G = G1;
theta = theta1;
phi = phi1;
end
disp(‘Hence solutions = :’ );
H2(1 : N+2) = H;
F2(1 : N+2) = F;
G2(1 : N+2) = G;
theta2(1 : N+2) = theta;
phi2(1 : N+2) = phi;
eta = 0:0.1:N;
figure(1)
plot(eta,H2,’*r’)
hold on
function [H1, F1, G1, theta1, phi1] = equation(H,F,G,theta,phi,N,h)
for i = 1:N-1
H(i+1) = H(i) – h*2*F(i);
F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) – (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+1)-F(i))/h)+F(i)) – (h^2)*(k/2)*(((G(i+1)-G(i))/h)^2 – ((F(i+1)-F(i))/h)^2+2*F(i)*((F(i) -2*F(i+1) + F(i+2))/h^2));
G(i+1) = (G(i) + G(i+2))/2 -(h/2)*H(i)*(G(i+1)-G(i)) – (h^2)*F(i)*G(i) + (h^2)*S*(((i*h+1)/2)*((G(i+1)-G(i))/h)+G(i)) – (h^2)*k*(F(i)*((G(i) -2*G(i+1) + G(i+2))/h^2) – ((F(i+1)-F(i))/h)*((G(i+1)-G(i))/h));
theta(i+1) = (theta(i) + theta(i+2))/2 – Pr*(h/2)*(theta(i+1)-theta(i))*H(i) + Pr*(h^2)*(S/2)*(((i*h+1)/2)*((theta(i+1)-theta(i))/h)+alpha1*theta(i)) – zeta*Pr*((h^2)/2)*((theta(i) -2*theta(i+1) + theta(i+2))/h^2 – 2*F(i)*H(i)*((theta(i+1)-theta(i))/h));
phi(i+1) = (phi(i) + phi(i+2))/2 + Sc*(h/2)*H(i)*(theta(i+1)-theta(i)) – Sc*(h^2)*(S/2)*(((i*h+1)/2)*((phi(i+1)-phi(i))/2*h)+alpha2*phi(i)) + (Sc/2)*(h^2)*gamma*phi(i);
end
H1(1) = H(1);
F1(1) = F(1);
G1(1) = G(1);
theta1(1) = theta(1);
phi1(1) = phi(1);
F1(N+2) = F(N+2);
G1(N+2) = G(N+2);
theta1(N+2) = theta(N+2);
phi1(N+2) = phi(N+2);
end
end
Index exceeds the number of array elements. Index must not exceed 1. Line 39function FDMex()
N = 100;
h = 0.1;
eta = 0:h:N;
Ac = 0.0001;
S = 0.2;
k = 0.1;
Pr = 1.0;
Sc = 1.2;
alpha1 = 0.4;
alpha2 = 0;
zeta = 0.3;
gamma = 0.3;
omega = 0.4;
fw = 0.2;
F = zeros(N+2, 1);
G = zeros(N+2, 1);
theta = zeros(N+2, 1);
phi = zeros(N+2, 1);
H = zeros(N+2, 1);
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S + fw / Sc * (phi(2) – phi(1)) / h^2;
F(N+2) = 0;
G(N+2) = 0;
theta(N+2) = 0;
phi(N+2) = 0;
c = 1.0;
while(c>0)
[H1, F1, G1, theta1, phi1] = equation(H,F,G,theta,phi,N,h);
c = 0.0;
for j = 1:N+1
if (abs(H(j)-H1(j))>Ac); (abs(F(j)-F1(j))>Ac);(abs(G(j)-G1(j))>Ac);(abs(theta(1)-theta1(1))>Ac);(abs(phi(j)-phi1(j))>Ac);
c = c+1;
break
end
end
H = H1;
F = F1;
G = G1;
theta = theta1;
phi = phi1;
end
disp(‘Hence solutions = :’ );
H2(1 : N+2) = H;
F2(1 : N+2) = F;
G2(1 : N+2) = G;
theta2(1 : N+2) = theta;
phi2(1 : N+2) = phi;
eta = 0:0.1:N;
figure(1)
plot(eta,H2,’*r’)
hold on
function [H1, F1, G1, theta1, phi1] = equation(H,F,G,theta,phi,N,h)
for i = 1:N-1
H(i+1) = H(i) – h*2*F(i);
F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) – (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+1)-F(i))/h)+F(i)) – (h^2)*(k/2)*(((G(i+1)-G(i))/h)^2 – ((F(i+1)-F(i))/h)^2+2*F(i)*((F(i) -2*F(i+1) + F(i+2))/h^2));
G(i+1) = (G(i) + G(i+2))/2 -(h/2)*H(i)*(G(i+1)-G(i)) – (h^2)*F(i)*G(i) + (h^2)*S*(((i*h+1)/2)*((G(i+1)-G(i))/h)+G(i)) – (h^2)*k*(F(i)*((G(i) -2*G(i+1) + G(i+2))/h^2) – ((F(i+1)-F(i))/h)*((G(i+1)-G(i))/h));
theta(i+1) = (theta(i) + theta(i+2))/2 – Pr*(h/2)*(theta(i+1)-theta(i))*H(i) + Pr*(h^2)*(S/2)*(((i*h+1)/2)*((theta(i+1)-theta(i))/h)+alpha1*theta(i)) – zeta*Pr*((h^2)/2)*((theta(i) -2*theta(i+1) + theta(i+2))/h^2 – 2*F(i)*H(i)*((theta(i+1)-theta(i))/h));
phi(i+1) = (phi(i) + phi(i+2))/2 + Sc*(h/2)*H(i)*(theta(i+1)-theta(i)) – Sc*(h^2)*(S/2)*(((i*h+1)/2)*((phi(i+1)-phi(i))/2*h)+alpha2*phi(i)) + (Sc/2)*(h^2)*gamma*phi(i);
end
H1(1) = H(1);
F1(1) = F(1);
G1(1) = G(1);
theta1(1) = theta(1);
phi1(1) = phi(1);
F1(N+2) = F(N+2);
G1(N+2) = G(N+2);
theta1(N+2) = theta(N+2);
phi1(N+2) = phi(N+2);
end
end
Index exceeds the number of array elements. Index must not exceed 1. Line 39 function FDMex()
N = 100;
h = 0.1;
eta = 0:h:N;
Ac = 0.0001;
S = 0.2;
k = 0.1;
Pr = 1.0;
Sc = 1.2;
alpha1 = 0.4;
alpha2 = 0;
zeta = 0.3;
gamma = 0.3;
omega = 0.4;
fw = 0.2;
F = zeros(N+2, 1);
G = zeros(N+2, 1);
theta = zeros(N+2, 1);
phi = zeros(N+2, 1);
H = zeros(N+2, 1);
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S + fw / Sc * (phi(2) – phi(1)) / h^2;
F(N+2) = 0;
G(N+2) = 0;
theta(N+2) = 0;
phi(N+2) = 0;
c = 1.0;
while(c>0)
[H1, F1, G1, theta1, phi1] = equation(H,F,G,theta,phi,N,h);
c = 0.0;
for j = 1:N+1
if (abs(H(j)-H1(j))>Ac); (abs(F(j)-F1(j))>Ac);(abs(G(j)-G1(j))>Ac);(abs(theta(1)-theta1(1))>Ac);(abs(phi(j)-phi1(j))>Ac);
c = c+1;
break
end
end
H = H1;
F = F1;
G = G1;
theta = theta1;
phi = phi1;
end
disp(‘Hence solutions = :’ );
H2(1 : N+2) = H;
F2(1 : N+2) = F;
G2(1 : N+2) = G;
theta2(1 : N+2) = theta;
phi2(1 : N+2) = phi;
eta = 0:0.1:N;
figure(1)
plot(eta,H2,’*r’)
hold on
function [H1, F1, G1, theta1, phi1] = equation(H,F,G,theta,phi,N,h)
for i = 1:N-1
H(i+1) = H(i) – h*2*F(i);
F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) – (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+1)-F(i))/h)+F(i)) – (h^2)*(k/2)*(((G(i+1)-G(i))/h)^2 – ((F(i+1)-F(i))/h)^2+2*F(i)*((F(i) -2*F(i+1) + F(i+2))/h^2));
G(i+1) = (G(i) + G(i+2))/2 -(h/2)*H(i)*(G(i+1)-G(i)) – (h^2)*F(i)*G(i) + (h^2)*S*(((i*h+1)/2)*((G(i+1)-G(i))/h)+G(i)) – (h^2)*k*(F(i)*((G(i) -2*G(i+1) + G(i+2))/h^2) – ((F(i+1)-F(i))/h)*((G(i+1)-G(i))/h));
theta(i+1) = (theta(i) + theta(i+2))/2 – Pr*(h/2)*(theta(i+1)-theta(i))*H(i) + Pr*(h^2)*(S/2)*(((i*h+1)/2)*((theta(i+1)-theta(i))/h)+alpha1*theta(i)) – zeta*Pr*((h^2)/2)*((theta(i) -2*theta(i+1) + theta(i+2))/h^2 – 2*F(i)*H(i)*((theta(i+1)-theta(i))/h));
phi(i+1) = (phi(i) + phi(i+2))/2 + Sc*(h/2)*H(i)*(theta(i+1)-theta(i)) – Sc*(h^2)*(S/2)*(((i*h+1)/2)*((phi(i+1)-phi(i))/2*h)+alpha2*phi(i)) + (Sc/2)*(h^2)*gamma*phi(i);
end
H1(1) = H(1);
F1(1) = F(1);
G1(1) = G(1);
theta1(1) = theta(1);
phi1(1) = phi(1);
F1(N+2) = F(N+2);
G1(N+2) = G(N+2);
theta1(N+2) = theta(N+2);
phi1(N+2) = phi(N+2);
end
end
Index exceeds the number of array elements. Index must not exceed 1. Line 39 rashmi MATLAB Answers — New Questions
Subtract column values where leading columns have values flipped (i.e., (A,B,C1) – (B,A,C2))
Suppose I have a table, T:
A B C
1 6 10
2 5 20
3 4 30
4 3 45
5 2 6
6 1 10
I want to subtract each entry in column C where the A and B values are flipped, and put this value into column D
For example, the first row (1, 6, 10) – the last row (6, 1, 10); (2, 5, 20) – (5, 2, 6) and so on
So D should be:
0
14
-15
15
-14
0
Thanks a lot!
Edit: (i) Flipped rows could occur anywhere in the table; (ii) there may be repeated values in Α and BSuppose I have a table, T:
A B C
1 6 10
2 5 20
3 4 30
4 3 45
5 2 6
6 1 10
I want to subtract each entry in column C where the A and B values are flipped, and put this value into column D
For example, the first row (1, 6, 10) – the last row (6, 1, 10); (2, 5, 20) – (5, 2, 6) and so on
So D should be:
0
14
-15
15
-14
0
Thanks a lot!
Edit: (i) Flipped rows could occur anywhere in the table; (ii) there may be repeated values in Α and B Suppose I have a table, T:
A B C
1 6 10
2 5 20
3 4 30
4 3 45
5 2 6
6 1 10
I want to subtract each entry in column C where the A and B values are flipped, and put this value into column D
For example, the first row (1, 6, 10) – the last row (6, 1, 10); (2, 5, 20) – (5, 2, 6) and so on
So D should be:
0
14
-15
15
-14
0
Thanks a lot!
Edit: (i) Flipped rows could occur anywhere in the table; (ii) there may be repeated values in Α and B subtraction, tables values MATLAB Answers — New Questions
256QAM Rayleigh channel not able to locate 256 points in scatter plot Simulink.
In 256QAM Rayleigh channel LTE physical layer not able to locate all 256 points in scatter plot Simulink. Kindly helpIn 256QAM Rayleigh channel LTE physical layer not able to locate all 256 points in scatter plot Simulink. Kindly help In 256QAM Rayleigh channel LTE physical layer not able to locate all 256 points in scatter plot Simulink. Kindly help mobile communication, digital signal processing, digital communication MATLAB Answers — New Questions
H have a error in FDM.
FDMex()
function FDMex()
N = 100;
lgth = 1.0;
h = lgth/N;
eta = 0:h:lgth;
Ac = 0.0001;
S = 0.2;
k = 0.1;
Pr = 1.0;
Sc = 1.2;
alpha1 = 0.4;
alpha2 = 0;
zeta = 0.3;
gamma = 0.3;
omega = 0.4;
fw = 0.2;
F = zeros(N+2, 1);
G = zeros(N+2, 1);
theta = zeros(N+2, 1);
phi = zeros(N+2, 1);
H = zeros(N+2, 1);
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S + fw / Sc * (phi(2) – phi(1)) / h^2;
F(N+2) = 0;
G(N+2) = 0;
theta(N+2) = 0;
phi(N+2) = 0;
c = 1.0;
while(c>0)
[H1,F1,G1,theta1,phi1] = equation(H,F,G,theta,phi,N,h);
c = 0.0;
for i = 2:N-1
if (abs((H(i)-H1(i)), (F(i) – F1(i)), (G(i) – G1(i)),(theta(i) – theta1(i)), (phi(i) – phi1(i)))>Ac)
c = c+1;
break
end
end
H = H1;
F = F1;
G = G1;
theta = theta1;
phi = phi1;
end
disp(‘Hence solutions = :’ );
H2(1 : N+2) = H;
F2(1 : N+2) = F;
G2(1 : N+2) = G;
theta2(1 : N+2) = theta;
phi2(1 : N+2) = phi;
eta = 0:h:lgth;
figure(1)
plot(eta,H2,’*r’)
hold on
function [H1,F1,G1,theta1,phi1] = equation(H,F,G,theta,phi,N,h)
for i = 2:N-1
H(i+1) = H(i) – h*2*F(i);
F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) – (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+1)-F(i))/h)+F(i)) – (h^2)*(k/2)*(((G(i+1)-G(i))/h)^2 – ((F(i+1)-F(i))/h)^2+2*F((F(i) -2*F(i+1) + F(i+2))/h^2));
G(i+1) = 2*G(i) – G(i+2) -(h/2)*H(i)*(G(i+1)-G(i+2)) + 2*F(i)*G(i) – (h^2)*S*(((i*h+1)/2)*((G(i+1)-G(i+2))/2*h)+G(i)) + (h^2)*2*k*(F(i)*((G(i+1) -2*G(i) + G(i+2))/h^2) – ((F(i+1)-F(i+2))/2*h)*((G(i+1)-G(i+2))/2*h));
theta(i+1) = 2*theta(i) – theta(i+2) + Pr*(h/2)*(theta(i+1)-theta(i+2)) – Pr*(h^2)*S*(((i*h+1)/2)*((theta(i+1)-theta(i+2))/2*h)+alpha1*theta(i)) + zeta*((theta(i+1) -2*theta(i) + theta(i+2))/h^2 – 2*F(i)*G(i)*((theta(i+1)-theta(i+2))/2*h)); phi(i+1) = 2*phi(i) – phi(i+2) + Sc*(h/2)*(theta(i+1)-theta(i+2)) – Sc*(h^2)*S*(((i*h+1)/2)*((phi(i+1)-theta(i+2))/2*h)+alpha2*phi(i)) + Sc*(h^2)*gamma*phi(i);
end
H1(1) = H(1);
F1(1) = F(1);
G1(1) = G(1);
theta1(1) = theta(1);
phi1(1) = phi(1);
F1(N+2) = F(N+2);
G1(N+2) = G(N+2);
theta1(N+2) = theta(N+2);
phi1(N+2) = phi(N+2);
end
end
AArray indices must be positive integers or logical values.FDMex()
function FDMex()
N = 100;
lgth = 1.0;
h = lgth/N;
eta = 0:h:lgth;
Ac = 0.0001;
S = 0.2;
k = 0.1;
Pr = 1.0;
Sc = 1.2;
alpha1 = 0.4;
alpha2 = 0;
zeta = 0.3;
gamma = 0.3;
omega = 0.4;
fw = 0.2;
F = zeros(N+2, 1);
G = zeros(N+2, 1);
theta = zeros(N+2, 1);
phi = zeros(N+2, 1);
H = zeros(N+2, 1);
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S + fw / Sc * (phi(2) – phi(1)) / h^2;
F(N+2) = 0;
G(N+2) = 0;
theta(N+2) = 0;
phi(N+2) = 0;
c = 1.0;
while(c>0)
[H1,F1,G1,theta1,phi1] = equation(H,F,G,theta,phi,N,h);
c = 0.0;
for i = 2:N-1
if (abs((H(i)-H1(i)), (F(i) – F1(i)), (G(i) – G1(i)),(theta(i) – theta1(i)), (phi(i) – phi1(i)))>Ac)
c = c+1;
break
end
end
H = H1;
F = F1;
G = G1;
theta = theta1;
phi = phi1;
end
disp(‘Hence solutions = :’ );
H2(1 : N+2) = H;
F2(1 : N+2) = F;
G2(1 : N+2) = G;
theta2(1 : N+2) = theta;
phi2(1 : N+2) = phi;
eta = 0:h:lgth;
figure(1)
plot(eta,H2,’*r’)
hold on
function [H1,F1,G1,theta1,phi1] = equation(H,F,G,theta,phi,N,h)
for i = 2:N-1
H(i+1) = H(i) – h*2*F(i);
F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) – (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+1)-F(i))/h)+F(i)) – (h^2)*(k/2)*(((G(i+1)-G(i))/h)^2 – ((F(i+1)-F(i))/h)^2+2*F((F(i) -2*F(i+1) + F(i+2))/h^2));
G(i+1) = 2*G(i) – G(i+2) -(h/2)*H(i)*(G(i+1)-G(i+2)) + 2*F(i)*G(i) – (h^2)*S*(((i*h+1)/2)*((G(i+1)-G(i+2))/2*h)+G(i)) + (h^2)*2*k*(F(i)*((G(i+1) -2*G(i) + G(i+2))/h^2) – ((F(i+1)-F(i+2))/2*h)*((G(i+1)-G(i+2))/2*h));
theta(i+1) = 2*theta(i) – theta(i+2) + Pr*(h/2)*(theta(i+1)-theta(i+2)) – Pr*(h^2)*S*(((i*h+1)/2)*((theta(i+1)-theta(i+2))/2*h)+alpha1*theta(i)) + zeta*((theta(i+1) -2*theta(i) + theta(i+2))/h^2 – 2*F(i)*G(i)*((theta(i+1)-theta(i+2))/2*h)); phi(i+1) = 2*phi(i) – phi(i+2) + Sc*(h/2)*(theta(i+1)-theta(i+2)) – Sc*(h^2)*S*(((i*h+1)/2)*((phi(i+1)-theta(i+2))/2*h)+alpha2*phi(i)) + Sc*(h^2)*gamma*phi(i);
end
H1(1) = H(1);
F1(1) = F(1);
G1(1) = G(1);
theta1(1) = theta(1);
phi1(1) = phi(1);
F1(N+2) = F(N+2);
G1(N+2) = G(N+2);
theta1(N+2) = theta(N+2);
phi1(N+2) = phi(N+2);
end
end
AArray indices must be positive integers or logical values. FDMex()
function FDMex()
N = 100;
lgth = 1.0;
h = lgth/N;
eta = 0:h:lgth;
Ac = 0.0001;
S = 0.2;
k = 0.1;
Pr = 1.0;
Sc = 1.2;
alpha1 = 0.4;
alpha2 = 0;
zeta = 0.3;
gamma = 0.3;
omega = 0.4;
fw = 0.2;
F = zeros(N+2, 1);
G = zeros(N+2, 1);
theta = zeros(N+2, 1);
phi = zeros(N+2, 1);
H = zeros(N+2, 1);
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S + fw / Sc * (phi(2) – phi(1)) / h^2;
F(N+2) = 0;
G(N+2) = 0;
theta(N+2) = 0;
phi(N+2) = 0;
c = 1.0;
while(c>0)
[H1,F1,G1,theta1,phi1] = equation(H,F,G,theta,phi,N,h);
c = 0.0;
for i = 2:N-1
if (abs((H(i)-H1(i)), (F(i) – F1(i)), (G(i) – G1(i)),(theta(i) – theta1(i)), (phi(i) – phi1(i)))>Ac)
c = c+1;
break
end
end
H = H1;
F = F1;
G = G1;
theta = theta1;
phi = phi1;
end
disp(‘Hence solutions = :’ );
H2(1 : N+2) = H;
F2(1 : N+2) = F;
G2(1 : N+2) = G;
theta2(1 : N+2) = theta;
phi2(1 : N+2) = phi;
eta = 0:h:lgth;
figure(1)
plot(eta,H2,’*r’)
hold on
function [H1,F1,G1,theta1,phi1] = equation(H,F,G,theta,phi,N,h)
for i = 2:N-1
H(i+1) = H(i) – h*2*F(i);
F(i+1) = (F(i) + F(i+2))/2 -H(i)*(h/2)*(F(i+1)-F(i)) +(h^2)*(G(i)^2) – (h^2)*(F(i)^2) + (h^2)*(S/2)*((((i*h)+1)/2)*((F(i+1)-F(i))/h)+F(i)) – (h^2)*(k/2)*(((G(i+1)-G(i))/h)^2 – ((F(i+1)-F(i))/h)^2+2*F((F(i) -2*F(i+1) + F(i+2))/h^2));
G(i+1) = 2*G(i) – G(i+2) -(h/2)*H(i)*(G(i+1)-G(i+2)) + 2*F(i)*G(i) – (h^2)*S*(((i*h+1)/2)*((G(i+1)-G(i+2))/2*h)+G(i)) + (h^2)*2*k*(F(i)*((G(i+1) -2*G(i) + G(i+2))/h^2) – ((F(i+1)-F(i+2))/2*h)*((G(i+1)-G(i+2))/2*h));
theta(i+1) = 2*theta(i) – theta(i+2) + Pr*(h/2)*(theta(i+1)-theta(i+2)) – Pr*(h^2)*S*(((i*h+1)/2)*((theta(i+1)-theta(i+2))/2*h)+alpha1*theta(i)) + zeta*((theta(i+1) -2*theta(i) + theta(i+2))/h^2 – 2*F(i)*G(i)*((theta(i+1)-theta(i+2))/2*h)); phi(i+1) = 2*phi(i) – phi(i+2) + Sc*(h/2)*(theta(i+1)-theta(i+2)) – Sc*(h^2)*S*(((i*h+1)/2)*((phi(i+1)-theta(i+2))/2*h)+alpha2*phi(i)) + Sc*(h^2)*gamma*phi(i);
end
H1(1) = H(1);
F1(1) = F(1);
G1(1) = G(1);
theta1(1) = theta(1);
phi1(1) = phi(1);
F1(N+2) = F(N+2);
G1(N+2) = G(N+2);
theta1(N+2) = theta(N+2);
phi1(N+2) = phi(N+2);
end
end
AArray indices must be positive integers or logical values. fdm MATLAB Answers — New Questions
Which Dynamics version, config ourselves, pricing
Hello.
I work at a small charity and I’m trying to determine which version of Dynamics is suitable for us. I can’t find any clear information as to the differences between the different versions and which might be best for us.
Our main areas of focus are:
Service user details – e.g. name, address, membership number, medical issues, etc.Case details – each user could have many cases (such as dealing with a landlord, or pension issues), with each case having many contacts at different dates.Activities – many different activities, with many instances of each one (like twice weekly badminton).
We would be able to find an SU, click on their details, pull up a list of their cases past and present, add additional contact details to their case for each contact we have with them, say how long the contact was, and how much was charged. Also, see what clubs/activities they’ve attended and when.
We want a weekly/monthly calendar view booking system for reception to book SU contacts/appointments. In the future, we might want to have it available on the internet for SUs to book a slot themselves.
For each instance of an activity, record who came, who paid a fee (if there was one).
Be able to apply various tags to each SU (e.g. volunteer, paid member, daycare user), so we can have a list at a glance and be able to run reports on just those people.
Running reports to see who did what activity, when they did it, who did what activity, how many case contacts we had between two dates, how much money was generated, etc. would be great.
We are not focused on dealing with individual donors or fundraising, but we are interested in keeping a list of grant applications we’ve submitted and what money we’ve received from them, if any.
Our charity has a very limited budget, so the system would be designed and put together by myself.
My questions are:
Which version of Dynamics is best for us?Will it be free from MS, or do we have to apply for some kind of grant? We are already registered as a nonprofit with MS.Will MS give us Dynamics so we can produce our own software, or do we have to do it though a Partner?If with a Partner, does it cost money?
We’re a small charity with a very small budget, so can’t afford to spend big money on things, unfortunately.
Many thanks.
Hello.I work at a small charity and I’m trying to determine which version of Dynamics is suitable for us. I can’t find any clear information as to the differences between the different versions and which might be best for us. Our main areas of focus are: Service user details – e.g. name, address, membership number, medical issues, etc.Case details – each user could have many cases (such as dealing with a landlord, or pension issues), with each case having many contacts at different dates.Activities – many different activities, with many instances of each one (like twice weekly badminton). We would be able to find an SU, click on their details, pull up a list of their cases past and present, add additional contact details to their case for each contact we have with them, say how long the contact was, and how much was charged. Also, see what clubs/activities they’ve attended and when. We want a weekly/monthly calendar view booking system for reception to book SU contacts/appointments. In the future, we might want to have it available on the internet for SUs to book a slot themselves. For each instance of an activity, record who came, who paid a fee (if there was one). Be able to apply various tags to each SU (e.g. volunteer, paid member, daycare user), so we can have a list at a glance and be able to run reports on just those people. Running reports to see who did what activity, when they did it, who did what activity, how many case contacts we had between two dates, how much money was generated, etc. would be great. We are not focused on dealing with individual donors or fundraising, but we are interested in keeping a list of grant applications we’ve submitted and what money we’ve received from them, if any. Our charity has a very limited budget, so the system would be designed and put together by myself. My questions are: Which version of Dynamics is best for us?Will it be free from MS, or do we have to apply for some kind of grant? We are already registered as a nonprofit with MS.Will MS give us Dynamics so we can produce our own software, or do we have to do it though a Partner?If with a Partner, does it cost money?We’re a small charity with a very small budget, so can’t afford to spend big money on things, unfortunately. Many thanks. Read More
Exchange 2019 – The remote certificate is invalid according to the validation procedure
Hi guys,
I`m starting with Exchange and already facing an issue regarding SMTP Service.
I have an app that needs to relay SMTP through my Exhange 2019.
A receive connector has been created, the app IP was allowed into this receive connector, port 587 configured, FQDN mail.domain.com configured as well.
I have this domain.com zone in my internal DNS and of course, an A record pointing MAIL entry to the Exchange Server.
I will paste the script that I`m using to try the SMTP relay at the end of this post.
So, sometimes the relay works and sometimes fails and returns:
Send-MailMessage : The remote certificate is invalid according to the validation procedure.
At C:UsersMYuserDesktopsmtptest.ps1:15 char:9
+ Send-MailMessage @sendMailParams -BodyAsHtml -Credential $cre …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], AuthenticationException
+ FullyQualifiedErrorId : AuthenticationException,Microsoft.PowerShell.Commands.SendMailMessage
I have two certificates installed in this Exchange Server, one is issued by internal CA and the other one by a public CA. The second one is a wildcert for *domain.com.
My point is, what am I missing? It seems a little weird for me that sometimes work and sometimes dont.
This is the ps1 script that I`m using to try the smtp relay:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sendMailParams = @{
From = email address removed for privacy reasons
To = email address removed for privacy reasons
Subject = “Test SMTP Relay”
Body = “Email sent for tests purposes”
SMTPServer = “mail.domain.com”
Port = 587
Encoding = “UTF8”
}
Send-MailMessage @sendMailParams -BodyAsHtml -Credential $credential -UseSsl
Of course, the certificate is valid, is assigned to SMTP Service in Exchange Server and is TLS1.2.
The mail.domain.com resolves for Exchange Server IP and the Application can reach the server using internal IP and mentioned port.
Anonymous user is allowed for now in receive connector.
Thanks in advance
Hi guys, I`m starting with Exchange and already facing an issue regarding SMTP Service.I have an app that needs to relay SMTP through my Exhange 2019. A receive connector has been created, the app IP was allowed into this receive connector, port 587 configured, FQDN mail.domain.com configured as well.I have this domain.com zone in my internal DNS and of course, an A record pointing MAIL entry to the Exchange Server. I will paste the script that I`m using to try the SMTP relay at the end of this post.So, sometimes the relay works and sometimes fails and returns:Send-MailMessage : The remote certificate is invalid according to the validation procedure.
At C:UsersMYuserDesktopsmtptest.ps1:15 char:9
+ Send-MailMessage @sendMailParams -BodyAsHtml -Credential $cre …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], AuthenticationException
+ FullyQualifiedErrorId : AuthenticationException,Microsoft.PowerShell.Commands.SendMailMessage I have two certificates installed in this Exchange Server, one is issued by internal CA and the other one by a public CA. The second one is a wildcert for *domain.com. My point is, what am I missing? It seems a little weird for me that sometimes work and sometimes dont. This is the ps1 script that I`m using to try the smtp relay:[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sendMailParams = @{
From = email address removed for privacy reasons
To = email address removed for privacy reasons
Subject = “Test SMTP Relay”
Body = “Email sent for tests purposes”
SMTPServer = “mail.domain.com”
Port = 587
Encoding = “UTF8”
}
Send-MailMessage @sendMailParams -BodyAsHtml -Credential $credential -UseSsl
Of course, the certificate is valid, is assigned to SMTP Service in Exchange Server and is TLS1.2.The mail.domain.com resolves for Exchange Server IP and the Application can reach the server using internal IP and mentioned port.Anonymous user is allowed for now in receive connector. Thanks in advance Read More
Purview retention locations
I need to ensure that when a user sends a message containing a cloud attachment, a retention label is applied to the cloud attachment by using an auto-labeling policy. which locations should I apply the auto-labeling policy? we have 3 options:
I need to ensure that when a user sends a message containing a cloud attachment, a retention label is applied to the cloud attachment by using an auto-labeling policy. which locations should I apply the auto-labeling policy? we have 3 options: Read More
SSMS 20.1 constantly crashing (suspecting .NET issue)
I cannot make SSMS to work. After installing SSMS 20.1 (or any other version) it constantly crashes. I get various errors such as:
Cannot create the windowException has been thrown by the target of an invocationJIT compiler encountered an internal limitationCrashing after the splash screen without any error messageLosing profile dataCrashing after loginCrashing after various operations (SELECT TOP 1000 from the context menu etc., when starting various dialogs etc.)
Examining the event viewer I suspect a .NET issue. Some examples:
Faulting application name: Ssms.exe, version: 20.1.10.0, time stamp: 0x660d7b89
Faulting module name: clrjit.dll, version: 4.8.9241.0, time stamp: 0x6604a357
Exception code: 0xc0000005
Fault offset: 0x00004964
Faulting process id: 0x3b28
Faulting application start time: 0x01dac5542e795318
Faulting application path: C:Program Files (x86)Microsoft SQL Server Management Studio 20Common7IDESsms.exe
Faulting module path: **C:WindowsMicrosoft.NETFrameworkv4.0.30319clrjit.dll**
Report Id: 9cf7bd0e-2bdc-48f9–ac31-575919dab13a
Faulting package full name:
Faulting package–relative application ID: Application: Ssms.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at System.Windows.Media.Visual.GetDpi()
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
at System.Windows.Interop.HwndSource.set_RootVisual(System.Windows.Media.Visual)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(System.Object)
at System.Windows.Window.Show()
at Microsoft.VisualStudio.PlatformUI.WpfHostPrivate+UIWPFElementContainer.ShowWindow()
I also noticed that if I am unsuccessful the first time I try to run SSMS, then I’m doomed until I restart and try again.
I already tried the following:
I reinstalled my PC few times. Tried both with Windows 10 and Windows 11 fully updated, but still no luck when it comes to running SSMS correctly.I tried .NET Framework repair tool. No luck.I tried repairing SSMS. No luck.I tried uninstalling and installing .NET (Windows features On/Off). No luck. On a manual installation it says a current/newer version is already installed.
Everything was fine until few months ago. Then SSMS started crashing. I suspect some Windows update may have caused this because now it doesn’t work even on a freshly installed and updated PC.
Any solution?
I cannot make SSMS to work. After installing SSMS 20.1 (or any other version) it constantly crashes. I get various errors such as:Cannot create the windowException has been thrown by the target of an invocationJIT compiler encountered an internal limitationCrashing after the splash screen without any error messageLosing profile dataCrashing after loginCrashing after various operations (SELECT TOP 1000 from the context menu etc., when starting various dialogs etc.)Examining the event viewer I suspect a .NET issue. Some examples:Faulting application name: Ssms.exe, version: 20.1.10.0, time stamp: 0x660d7b89
Faulting module name: clrjit.dll, version: 4.8.9241.0, time stamp: 0x6604a357
Exception code: 0xc0000005
Fault offset: 0x00004964
Faulting process id: 0x3b28
Faulting application start time: 0x01dac5542e795318
Faulting application path: C:Program Files (x86)Microsoft SQL Server Management Studio 20Common7IDESsms.exe
Faulting module path: **C:WindowsMicrosoft.NETFrameworkv4.0.30319clrjit.dll**
Report Id: 9cf7bd0e-2bdc-48f9-ac31-575919dab13a
Faulting package full name:
Faulting package-relative application ID: Application: Ssms.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at System.Windows.Media.Visual.GetDpi()
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
at System.Windows.Interop.HwndSource.set_RootVisual(System.Windows.Media.Visual)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(System.Object)
at System.Windows.Window.Show()
at Microsoft.VisualStudio.PlatformUI.WpfHostPrivate+UIWPFElementContainer.ShowWindow()I also noticed that if I am unsuccessful the first time I try to run SSMS, then I’m doomed until I restart and try again.I already tried the following:I reinstalled my PC few times. Tried both with Windows 10 and Windows 11 fully updated, but still no luck when it comes to running SSMS correctly.I tried .NET Framework repair tool. No luck.I tried repairing SSMS. No luck.I tried uninstalling and installing .NET (Windows features On/Off). No luck. On a manual installation it says a current/newer version is already installed.Everything was fine until few months ago. Then SSMS started crashing. I suspect some Windows update may have caused this because now it doesn’t work even on a freshly installed and updated PC. Any solution? Read More
Greatest $50 Off Temu Coupon Code {afh97457} or {frc345228} For Existing Users June 2024
In addition to the standalone $50 off Temu coupon code {afh97457} or {frc345228}, Temu occasionally offers coupon bundles that combine multiple discounts and rewards into a single package. These bundles can include the $50 off coupon along with other valuable benefits, such as free shipping, cashback offers, or discounts on specific product categories.
The $50 coupon bundle is typically available for a limited time and may be subject to certain conditions or limitations. Temu announces these bundles through its marketing channels, so be sure to stay tuned for updates and take advantage of these incredible deals when they become available.
In addition to the standalone $50 off Temu coupon code {afh97457} or {frc345228}, Temu occasionally offers coupon bundles that combine multiple discounts and rewards into a single package. These bundles can include the $50 off coupon along with other valuable benefits, such as free shipping, cashback offers, or discounts on specific product categories.The $50 coupon bundle is typically available for a limited time and may be subject to certain conditions or limitations. Temu announces these bundles through its marketing channels, so be sure to stay tuned for updates and take advantage of these incredible deals when they become available. Read More