Category: News
Issue: Meeting attendance habit
When viewing meeting habits, Meeting attendance reflects as not good. I went into “meeting details” to understand which meetings contribute to poor attendance Our Stand-ups came up as “no” however we know we attend most/all stand-ups, and the meeting is accepted in our calendars. When checking tracking on invites though we found that tracking comes up as non.
Why are accepted meetings coming up as Nonresponse?Are meeting accepted however response not sent calculated as “Accepted meeting?
When viewing meeting habits, Meeting attendance reflects as not good. I went into “meeting details” to understand which meetings contribute to poor attendance Our Stand-ups came up as “no” however we know we attend most/all stand-ups, and the meeting is accepted in our calendars. When checking tracking on invites though we found that tracking comes up as non.Why are accepted meetings coming up as Nonresponse?Are meeting accepted however response not sent calculated as “Accepted meeting? Read More
i want matrix E == matrix B(i want correct answer)
I have tried to run this code many times , even changed the equation , values but i am not able to get the correct answer , here A given is before its transpose of glcm
% Convert to grayscale if necessary
%if size(img, 3) > 1
%img = rgb2gray(img);
%end
I = [0 0 1 1;
0 0 1 1;
0 2 2 2;
2 2 3 3];
A = [2 2 1 0;
0 2 0 0;
0 0 3 1;
0 0 0 1];
D = A’;
E = A + D;
E
%glcms = graycomatrix(I);
%glcms
m = 5;
%n = 4;
count = 0;
%count1 = 0;
n = 3;
o = 4;
for i = 1 : 4
for j = 1:4
for l = 1 : 4
for k = 1 : 4
x = I(i,1);
y = I(i,3-1);
a = I(i,3+1-1);
b = I(i,2+2-1);
if (I(i,j) && I(i,n-j)) == (I(i,n-k) && I(i, n+1-k))
%disp(‘Entered the control’);
% count = count+ 1;
%end
end
end
B(i,j) = count;
end
%B(i,j) = count;
%end
%end
end
%if (E == B)
% disp(‘Correct Answer’);
%else
% disp(‘Not Correct Answer’);
%endI have tried to run this code many times , even changed the equation , values but i am not able to get the correct answer , here A given is before its transpose of glcm
% Convert to grayscale if necessary
%if size(img, 3) > 1
%img = rgb2gray(img);
%end
I = [0 0 1 1;
0 0 1 1;
0 2 2 2;
2 2 3 3];
A = [2 2 1 0;
0 2 0 0;
0 0 3 1;
0 0 0 1];
D = A’;
E = A + D;
E
%glcms = graycomatrix(I);
%glcms
m = 5;
%n = 4;
count = 0;
%count1 = 0;
n = 3;
o = 4;
for i = 1 : 4
for j = 1:4
for l = 1 : 4
for k = 1 : 4
x = I(i,1);
y = I(i,3-1);
a = I(i,3+1-1);
b = I(i,2+2-1);
if (I(i,j) && I(i,n-j)) == (I(i,n-k) && I(i, n+1-k))
%disp(‘Entered the control’);
% count = count+ 1;
%end
end
end
B(i,j) = count;
end
%B(i,j) = count;
%end
%end
end
%if (E == B)
% disp(‘Correct Answer’);
%else
% disp(‘Not Correct Answer’);
%end I have tried to run this code many times , even changed the equation , values but i am not able to get the correct answer , here A given is before its transpose of glcm
% Convert to grayscale if necessary
%if size(img, 3) > 1
%img = rgb2gray(img);
%end
I = [0 0 1 1;
0 0 1 1;
0 2 2 2;
2 2 3 3];
A = [2 2 1 0;
0 2 0 0;
0 0 3 1;
0 0 0 1];
D = A’;
E = A + D;
E
%glcms = graycomatrix(I);
%glcms
m = 5;
%n = 4;
count = 0;
%count1 = 0;
n = 3;
o = 4;
for i = 1 : 4
for j = 1:4
for l = 1 : 4
for k = 1 : 4
x = I(i,1);
y = I(i,3-1);
a = I(i,3+1-1);
b = I(i,2+2-1);
if (I(i,j) && I(i,n-j)) == (I(i,n-k) && I(i, n+1-k))
%disp(‘Entered the control’);
% count = count+ 1;
%end
end
end
B(i,j) = count;
end
%B(i,j) = count;
%end
%end
end
%if (E == B)
% disp(‘Correct Answer’);
%else
% disp(‘Not Correct Answer’);
%end glcm MATLAB Answers — New Questions
inaccessible link
We are migrating to a hybrid Azure On-Premises/Cloud network for the MFA login and I am researching links.
How do I request access or what forum do I join? There were a couple of these inaccessible links in an Azure dashboard widget.
Thank you.
Jamie
IT Coordinator
We are migrating to a hybrid Azure On-Premises/Cloud network for the MFA login and I am researching links.https://techcommunity.microsoft.com/t5/enterprise-mobility-security/bg-p/enterprisemobilityandsecurityHow do I request access or what forum do I join? There were a couple of these inaccessible links in an Azure dashboard widget.Thank you.JamieIT Coordinator Read More
Disable srs
How do i disable SRS, it screw up forward to other mail servers that don’t support SRS.
Please don’t answer problem recieving mailserver it isn’t.
SRS is not globaly accepted solution for bypassing SPF
How do i disable SRS, it screw up forward to other mail servers that don’t support SRS. Please don’t answer problem recieving mailserver it isn’t. SRS is not globaly accepted solution for bypassing SPF Read More
Problem with Section 7.1 Task 5 of Simscape onramp
Although I correctly configured the model blocks and parameters accordingly to the directions, the training evaluation said my output did not match the answer. It prevents me from proceeding to the next task.
Here I attach two snapshots of the evaluation plot of Section 7.1 Task 5 where the problem occured.
The first picture shows comparison of the signals spanning to the end time (10sec). It looks to me exact agreement between the requirement and my signal, but it indicates slight discrepancies in the beginning of simulation (from 0 sec to around 1.0 sec) shown by the red dots. Due to these errors, the evaluator says my signal is incorrect.
The second picture zooms into the details of the red dots. It looks to me my signal has a slight delay to the answer.
I confirmed that my setup is consistent with the directions and the results unchanged even after several retries from the beginning of Section 7.1.
I am wondering if there is another parameter to be adjusted, which is not explicitly directed.
Can I have your help for solving this problem?Although I correctly configured the model blocks and parameters accordingly to the directions, the training evaluation said my output did not match the answer. It prevents me from proceeding to the next task.
Here I attach two snapshots of the evaluation plot of Section 7.1 Task 5 where the problem occured.
The first picture shows comparison of the signals spanning to the end time (10sec). It looks to me exact agreement between the requirement and my signal, but it indicates slight discrepancies in the beginning of simulation (from 0 sec to around 1.0 sec) shown by the red dots. Due to these errors, the evaluator says my signal is incorrect.
The second picture zooms into the details of the red dots. It looks to me my signal has a slight delay to the answer.
I confirmed that my setup is consistent with the directions and the results unchanged even after several retries from the beginning of Section 7.1.
I am wondering if there is another parameter to be adjusted, which is not explicitly directed.
Can I have your help for solving this problem? Although I correctly configured the model blocks and parameters accordingly to the directions, the training evaluation said my output did not match the answer. It prevents me from proceeding to the next task.
Here I attach two snapshots of the evaluation plot of Section 7.1 Task 5 where the problem occured.
The first picture shows comparison of the signals spanning to the end time (10sec). It looks to me exact agreement between the requirement and my signal, but it indicates slight discrepancies in the beginning of simulation (from 0 sec to around 1.0 sec) shown by the red dots. Due to these errors, the evaluator says my signal is incorrect.
The second picture zooms into the details of the red dots. It looks to me my signal has a slight delay to the answer.
I confirmed that my setup is consistent with the directions and the results unchanged even after several retries from the beginning of Section 7.1.
I am wondering if there is another parameter to be adjusted, which is not explicitly directed.
Can I have your help for solving this problem? simscape, onramp MATLAB Answers — New Questions
Error: The “A” matrix must be a numeric array with no Inf’s or NaN’s.
coder.extrinsic("testcon2dis")
I_2 = eye(2);
O_2 = zeros(2);
Ac_xy = [O_2 -(1/Lfilter)*I_2 O_2; (1/Cfilter)*I_2 O_2 -(1/Cfilter)*I_2; O_2 O_2 w* J];
Bc_xy = [(Vdc/Lfilter)*I_2 O_2 O_2]’ * Tr;
Cxy = [I_2 O_2 O_2; O_2 I_2 O_2];
[A, B] = testcon2dis(Ac_xy, Bc_xy, Cxy, Ts);
%%%%%%%%%%%%%%%% Below is the testcon2dis%%%%%%%%%%%%%%%%
function[A,B] = testcon2dis(Ac_xy,Bc_xy,Cxy,Ts)
ct_sys = ss(Ac_xy,Bc_xy,Cxy,[]);
dt_sys = c2d(ct_sys,Ts);
A = dt_sys.a;
B = dt_sys.b;
end
%%%%%%%%%%%%%%%%%%%%%%% Error message
Error:The "A" matrix must be a numeric array with no Inf’s or NaN’s.
Error in ss.ss.m (line 290)
throw(ME)
Error in testcon2dis.m (line 2)
Error in ‘MPC_3Phase_Inverter/MATLAB Function1’ (line 31)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Any suggestions I tried calling the A marix as a double or zeros to give it sizes but still got new errors doesn’t work(this block of code is used in a matlab function block simulink)
%%%%%%%%%%%%%%%%%%%%% Error message calling A as a double or zeros(6,6)%%%%%%%%%%%%%%%
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
> In MPC_Matrices_l (line 69)
Error:Matrix must be positive definite.
Error in MPC_Matrices_l.m (line 70)
Hinv=chol(W_inv);
Error in ‘MPC_3Phase_Inverter/MATLAB Function1’ (line 43)
Any suggestions thank youcoder.extrinsic("testcon2dis")
I_2 = eye(2);
O_2 = zeros(2);
Ac_xy = [O_2 -(1/Lfilter)*I_2 O_2; (1/Cfilter)*I_2 O_2 -(1/Cfilter)*I_2; O_2 O_2 w* J];
Bc_xy = [(Vdc/Lfilter)*I_2 O_2 O_2]’ * Tr;
Cxy = [I_2 O_2 O_2; O_2 I_2 O_2];
[A, B] = testcon2dis(Ac_xy, Bc_xy, Cxy, Ts);
%%%%%%%%%%%%%%%% Below is the testcon2dis%%%%%%%%%%%%%%%%
function[A,B] = testcon2dis(Ac_xy,Bc_xy,Cxy,Ts)
ct_sys = ss(Ac_xy,Bc_xy,Cxy,[]);
dt_sys = c2d(ct_sys,Ts);
A = dt_sys.a;
B = dt_sys.b;
end
%%%%%%%%%%%%%%%%%%%%%%% Error message
Error:The "A" matrix must be a numeric array with no Inf’s or NaN’s.
Error in ss.ss.m (line 290)
throw(ME)
Error in testcon2dis.m (line 2)
Error in ‘MPC_3Phase_Inverter/MATLAB Function1’ (line 31)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Any suggestions I tried calling the A marix as a double or zeros to give it sizes but still got new errors doesn’t work(this block of code is used in a matlab function block simulink)
%%%%%%%%%%%%%%%%%%%%% Error message calling A as a double or zeros(6,6)%%%%%%%%%%%%%%%
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
> In MPC_Matrices_l (line 69)
Error:Matrix must be positive definite.
Error in MPC_Matrices_l.m (line 70)
Hinv=chol(W_inv);
Error in ‘MPC_3Phase_Inverter/MATLAB Function1’ (line 43)
Any suggestions thank you coder.extrinsic("testcon2dis")
I_2 = eye(2);
O_2 = zeros(2);
Ac_xy = [O_2 -(1/Lfilter)*I_2 O_2; (1/Cfilter)*I_2 O_2 -(1/Cfilter)*I_2; O_2 O_2 w* J];
Bc_xy = [(Vdc/Lfilter)*I_2 O_2 O_2]’ * Tr;
Cxy = [I_2 O_2 O_2; O_2 I_2 O_2];
[A, B] = testcon2dis(Ac_xy, Bc_xy, Cxy, Ts);
%%%%%%%%%%%%%%%% Below is the testcon2dis%%%%%%%%%%%%%%%%
function[A,B] = testcon2dis(Ac_xy,Bc_xy,Cxy,Ts)
ct_sys = ss(Ac_xy,Bc_xy,Cxy,[]);
dt_sys = c2d(ct_sys,Ts);
A = dt_sys.a;
B = dt_sys.b;
end
%%%%%%%%%%%%%%%%%%%%%%% Error message
Error:The "A" matrix must be a numeric array with no Inf’s or NaN’s.
Error in ss.ss.m (line 290)
throw(ME)
Error in testcon2dis.m (line 2)
Error in ‘MPC_3Phase_Inverter/MATLAB Function1’ (line 31)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Any suggestions I tried calling the A marix as a double or zeros to give it sizes but still got new errors doesn’t work(this block of code is used in a matlab function block simulink)
%%%%%%%%%%%%%%%%%%%%% Error message calling A as a double or zeros(6,6)%%%%%%%%%%%%%%%
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN.
> In MPC_Matrices_l (line 69)
Error:Matrix must be positive definite.
Error in MPC_Matrices_l.m (line 70)
Hinv=chol(W_inv);
Error in ‘MPC_3Phase_Inverter/MATLAB Function1’ (line 43)
Any suggestions thank you matlab, simulink, matlab function MATLAB Answers — New Questions
Problem updating
Whenever I check my windows 11 for updates, it tells me that my device is up to date. However, when I open windows insider programme, it informs me that there is a newer build that doesn’t appear to me. How to solve this issue?
Whenever I check my windows 11 for updates, it tells me that my device is up to date. However, when I open windows insider programme, it informs me that there is a newer build that doesn’t appear to me. How to solve this issue? Read More
Edge Transport Server Open Ports
Hello All
With the setup of an Exchange Server, Microsoft recommends using an Edge Transport Server for filtering and security. The Edge Transport Server is to be placed into a DMZ/outside the LAN.
After installing the Edge Transport role on Windows Server 2019 a port scan was performed and it was discovered ports, 80, 443, 1194, 1801, 2103, 2105, 2107 were automatically opened on the Edge server as a result of the installation.
My question is does these open ports pose a threat/risk? Given the fact that the Edge Transport role is operating in a DMZ and if an external port scan was to be performed it will scan the Edge Transport Server not the router/firewall.
I am sure Microsoft is aware of this and would not design a server with any security flaws but I just want to confirm.
Hello All With the setup of an Exchange Server, Microsoft recommends using an Edge Transport Server for filtering and security. The Edge Transport Server is to be placed into a DMZ/outside the LAN.After installing the Edge Transport role on Windows Server 2019 a port scan was performed and it was discovered ports, 80, 443, 1194, 1801, 2103, 2105, 2107 were automatically opened on the Edge server as a result of the installation. My question is does these open ports pose a threat/risk? Given the fact that the Edge Transport role is operating in a DMZ and if an external port scan was to be performed it will scan the Edge Transport Server not the router/firewall. I am sure Microsoft is aware of this and would not design a server with any security flaws but I just want to confirm. Read More
Microsoft Learn
I am very much thankful to Microsoft learn for getting me this knowledge .
I am very much thankful to Microsoft learn for getting me this knowledge . Read More
cross correlation between two time series data
I have two different normalised atmospheric time series data. Their temporal variation shows a mixed pattern of correlation and anti correlation at different time periods. Aparently there are some lags in these correlations. But when I carry out cross correlation, the plot shows max correlation at 1500 time lag which is the number of data points (plot xcorr-data.png). The wcoherence shows strong correlation between 0.5-2 days buts arrows dont show any definite pattern. Can anyone suggest me, how I can interprete the result in more meaningful way. Any suggestion about any alternative ways will be great.
Thanking you in advance.I have two different normalised atmospheric time series data. Their temporal variation shows a mixed pattern of correlation and anti correlation at different time periods. Aparently there are some lags in these correlations. But when I carry out cross correlation, the plot shows max correlation at 1500 time lag which is the number of data points (plot xcorr-data.png). The wcoherence shows strong correlation between 0.5-2 days buts arrows dont show any definite pattern. Can anyone suggest me, how I can interprete the result in more meaningful way. Any suggestion about any alternative ways will be great.
Thanking you in advance. I have two different normalised atmospheric time series data. Their temporal variation shows a mixed pattern of correlation and anti correlation at different time periods. Aparently there are some lags in these correlations. But when I carry out cross correlation, the plot shows max correlation at 1500 time lag which is the number of data points (plot xcorr-data.png). The wcoherence shows strong correlation between 0.5-2 days buts arrows dont show any definite pattern. Can anyone suggest me, how I can interprete the result in more meaningful way. Any suggestion about any alternative ways will be great.
Thanking you in advance. xcorr, wcoherence, time series, cross correlation, atmospheric data MATLAB Answers — New Questions
Help creating RMS Window
Hello,
I am supposed to import data from 10 Excel files then filter, rectify and create a RMS window for the data, but I am stuck at the last step. I am not very good at MATLAB, but I believe that I am on the right track so far. Any help would be extremely appreciated. I included what I have so far; the commented section at the end is what I am supposed to work off of. I tried a similar loop like the ones prior but did not succeed. Thank you in advance!
clear all; clc
fileName ={‘Gait_normal01.csv’;’Gait_normal02.csv’;’Gait_rightlimp01.csv’;’Gait_rightlimp02.csv’;’MVC_Extension01.csv’;…
‘MVC_Extension02.csv’;’MVC_Flexion01.csv’;’MVC_Flexion02.csv’;’SitStand01.csv’;’Squat01.csv’}
% read in Data
for i=1:10
EMGraw_data{i,1} =dlmread(fileName{i,1},’,’,5,2);
end
%filter
for i=1:10
i
for j=1:4
j
[B,A]=butter(2,[10/500 350/500],’bandpass’);
EMGf{i,1}(:,j) = filtfilt(B,A,EMGraw_data{i,1}(:,j));
end
end
% rectify
for i=1:10
i
for j=1:4
j
EMGrec{i,1}(:,j) = abs(EMGf{i,1}(:,j));
end
end
% %Root mean square
% winlength = 299; %input 1-desired window length
% EMGrms=zeros(length(EMGrec)-winlength,1);
% for i=1:length(EMGrec)-winlength;
% win=EMGrec(i:i+winlength);
% EMGrms(i+(winlength+1)/2)=sqrt(sum(win.^2)/winlength);
% endHello,
I am supposed to import data from 10 Excel files then filter, rectify and create a RMS window for the data, but I am stuck at the last step. I am not very good at MATLAB, but I believe that I am on the right track so far. Any help would be extremely appreciated. I included what I have so far; the commented section at the end is what I am supposed to work off of. I tried a similar loop like the ones prior but did not succeed. Thank you in advance!
clear all; clc
fileName ={‘Gait_normal01.csv’;’Gait_normal02.csv’;’Gait_rightlimp01.csv’;’Gait_rightlimp02.csv’;’MVC_Extension01.csv’;…
‘MVC_Extension02.csv’;’MVC_Flexion01.csv’;’MVC_Flexion02.csv’;’SitStand01.csv’;’Squat01.csv’}
% read in Data
for i=1:10
EMGraw_data{i,1} =dlmread(fileName{i,1},’,’,5,2);
end
%filter
for i=1:10
i
for j=1:4
j
[B,A]=butter(2,[10/500 350/500],’bandpass’);
EMGf{i,1}(:,j) = filtfilt(B,A,EMGraw_data{i,1}(:,j));
end
end
% rectify
for i=1:10
i
for j=1:4
j
EMGrec{i,1}(:,j) = abs(EMGf{i,1}(:,j));
end
end
% %Root mean square
% winlength = 299; %input 1-desired window length
% EMGrms=zeros(length(EMGrec)-winlength,1);
% for i=1:length(EMGrec)-winlength;
% win=EMGrec(i:i+winlength);
% EMGrms(i+(winlength+1)/2)=sqrt(sum(win.^2)/winlength);
% end Hello,
I am supposed to import data from 10 Excel files then filter, rectify and create a RMS window for the data, but I am stuck at the last step. I am not very good at MATLAB, but I believe that I am on the right track so far. Any help would be extremely appreciated. I included what I have so far; the commented section at the end is what I am supposed to work off of. I tried a similar loop like the ones prior but did not succeed. Thank you in advance!
clear all; clc
fileName ={‘Gait_normal01.csv’;’Gait_normal02.csv’;’Gait_rightlimp01.csv’;’Gait_rightlimp02.csv’;’MVC_Extension01.csv’;…
‘MVC_Extension02.csv’;’MVC_Flexion01.csv’;’MVC_Flexion02.csv’;’SitStand01.csv’;’Squat01.csv’}
% read in Data
for i=1:10
EMGraw_data{i,1} =dlmread(fileName{i,1},’,’,5,2);
end
%filter
for i=1:10
i
for j=1:4
j
[B,A]=butter(2,[10/500 350/500],’bandpass’);
EMGf{i,1}(:,j) = filtfilt(B,A,EMGraw_data{i,1}(:,j));
end
end
% rectify
for i=1:10
i
for j=1:4
j
EMGrec{i,1}(:,j) = abs(EMGf{i,1}(:,j));
end
end
% %Root mean square
% winlength = 299; %input 1-desired window length
% EMGrms=zeros(length(EMGrec)-winlength,1);
% for i=1:length(EMGrec)-winlength;
% win=EMGrec(i:i+winlength);
% EMGrms(i+(winlength+1)/2)=sqrt(sum(win.^2)/winlength);
% end rms, for, loop, for loop, win, winlength, root, mean, square MATLAB Answers — New Questions
Stateful predict block failed to evaluate mask initial commands
this is the error showing up as soon as I run my model.
The recurrent neural network that I’ve used in this stateful predict block works completely fine on its own but when I use its MAT file in this block.. it ain’t working.
what should I dothis is the error showing up as soon as I run my model.
The recurrent neural network that I’ve used in this stateful predict block works completely fine on its own but when I use its MAT file in this block.. it ain’t working.
what should I do this is the error showing up as soon as I run my model.
The recurrent neural network that I’ve used in this stateful predict block works completely fine on its own but when I use its MAT file in this block.. it ain’t working.
what should I do stateful predict, simulink, simulation, deep learning, neural network MATLAB Answers — New Questions
Poner en un campo la unión de otros dos campos de la misma tabla.
Hola
¿Qué tengo que hacer para poner en un campo de una tabla la unión de otros dos o más campos de la misma tabla?
Gracias
Saludos
Hola ¿Qué tengo que hacer para poner en un campo de una tabla la unión de otros dos o más campos de la misma tabla? GraciasSaludos Read More
Advanced Hunting Opens Briefly, then goes blank
Hi,
I have an issue in Advanced Hunting where the portal will open up briefly, but then go blank.
This has been happening since Wednesday for me and raised a ticket (#2405090050000419) with Microsoft for this on Thursday AM, but have yet to get a response and just sits at, ‘A support agent is being assigned to your request’.
I have tried accessing the AH area in Private Mode, via Chrome (Edge is my main browser) and clearing cache, but still no joy. I also disabled Dark Mode to see if that was the issue, as I know that Dark Mode does cause visibility issues in the XDR portal (especially when attempting to preview emails when investigating emails)
This has also been noted by a user on Twitter
This isn’t affecting other users in my tenant (based in UK) as they are still able to access the AH area without issue.
We also haven’t yet enabled the Unified SIEM/XDR as yet, so that isn’t the issue. If if it was, the issue is still only affecting my account, and no one else who has access to that area.
Should be noted that they rarely use AH, so wouldn’t have as many previously open AH tabs as I normally always do. I believe that I had approx. 10 or so tabs open for various queries I was looking up or creating.
I am still able to access the Custom Detection Rules section which sits underneath that link without issue.
This means that I am completely unable to run any AH queries currently, which is an issue.
Hi, I have an issue in Advanced Hunting where the portal will open up briefly, but then go blank. This has been happening since Wednesday for me and raised a ticket (#2405090050000419) with Microsoft for this on Thursday AM, but have yet to get a response and just sits at, ‘A support agent is being assigned to your request’.I have tried accessing the AH area in Private Mode, via Chrome (Edge is my main browser) and clearing cache, but still no joy. I also disabled Dark Mode to see if that was the issue, as I know that Dark Mode does cause visibility issues in the XDR portal (especially when attempting to preview emails when investigating emails) This has also been noted by a user on Twitter This isn’t affecting other users in my tenant (based in UK) as they are still able to access the AH area without issue. We also haven’t yet enabled the Unified SIEM/XDR as yet, so that isn’t the issue. If if it was, the issue is still only affecting my account, and no one else who has access to that area. Should be noted that they rarely use AH, so wouldn’t have as many previously open AH tabs as I normally always do. I believe that I had approx. 10 or so tabs open for various queries I was looking up or creating.I am still able to access the Custom Detection Rules section which sits underneath that link without issue. This means that I am completely unable to run any AH queries currently, which is an issue. Read More
Date Setting keeps on changing
Hello, Folks!
i have been working on a tracker and it was all well until i have noticed my data skewed because of the changing date setting. it has been set to MDY even on the Text to column function, it was set to MDY (this changes to DMY every time i exit the table. i have attached several screenshots and the last screenshot Date 5) shows the date format that comes out when i again readjust the Text to Columns setup for date
Hello, Folks! i have been working on a tracker and it was all well until i have noticed my data skewed because of the changing date setting. it has been set to MDY even on the Text to column function, it was set to MDY (this changes to DMY every time i exit the table. i have attached several screenshots and the last screenshot Date 5) shows the date format that comes out when i again readjust the Text to Columns setup for date Read More
this windows 12 for testing user before release
https://archive.org/details/windows12lite64bit
you can download iso file / torrent file
https://archive.org/details/windows12lite64bit you can download iso file / torrent file Read More
How to generate code for self attention layer for deployment
How to generate code for self attention layer for deploymentHow to generate code for self attention layer for deployment How to generate code for self attention layer for deployment code generation MATLAB Answers — New Questions
Why the results of three codes with the same expression and method are different ?
I used Newton-Raphson method to get velocity and temperature profiles.
I attached the differential equations as a file.
The desired result can only be obtained in the first code, and the specific matrix can be obtained in the remaining code, so the iteration value increases or the result itself cannot be obtained.
I will attach the ideal result as a graph.
code # 1
format longE
%% Predesignation
iter = 0; a = 0; b = 1; m = 1000; h = (b – a)/m; x = a: h : b; tol = 1e-7;
v0 = 1; vn = 40; t0 = 1;
ta = 0.543; k = 5.8;
st = [0.1, 0.5, 1]’;
max_iter = 1000;
for ii = 1 : 1 : length(st)
iter = 0;
iter(ii) = iter;
v_temp = v0:(40-1)/m:vn;
v = v_temp(2:end-1)’;
t_temp = 1:(0.9-1)/m:0.9;
t = t_temp(2:end)’;
v_t = [v ; t];
St = st(ii);
while iter <= max_iter
% Residual function
R1 = zeros(m – 1, 1);
for i = 1 : m – 1
if i == 1
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*1*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*1*v(i+1)*t(i)^2 …
-1^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-1);
elseif i == m – 1
R1(i) = 4*v(i)*40*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-40^2*t(i)^2+2*v(i-1)*40*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(40-v(i-1));
else
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*v(i-1)*v(i+1)*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-v(i-1));
end
end
R2 = zeros(m, 1);
for i = 1 : m
if i == 1
R2(i) = t(i+1)-1-2*h*St*v(i)^(1/6)*(ta-1);
elseif i == m
R2(i) = t(i-2)-4*t(i-1)+3*t(i)-2*h*St*40^(1/6)*(ta-t(i));
else
R2(i) = t(i+1)-t(i-1)-2*h*St*v(i)^(1/6)*(ta-t(i));
end
end
res = [R1 ; R2];
% Jacobian
J11 = zeros(m – 1);
for i = 1 : m – 1
if i == 1
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*1*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-1)*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*1*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
elseif i == m – 1
J11(i, i – 1) = 4*v(i)*t(i)^2+2*40*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*40*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(40-v(i-1))*(7/6*v(i)^(1/6));
else
J11(i, i – 1) = 4*v(i)*t(i)^2+2*v(i+1)*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-v(i-1))*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*v(i-1)*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
end
end
J12 = zeros(m – 1, m);
for i = 1 : m – 1
if i == 1
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*1*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*1*v(i+1)*t(i)-2*1^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-1);
elseif i == m – 1
J12(i, i) = 8*v(i)*40*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*40^2*t(i) …
+4*v(i-1)*40*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(40-v(i-1));
else
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*v(i-1)*v(i+1)*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-v(i-1));
end
end
J21 = zeros(m, m – 1);
for i = 1 : m – 1
J21(i, i) = -1/3*h*St*(ta-t(i))*v(i)^(-5/6);
end
J22 = zeros(m, m);
for i = 1 : m
if i == 1
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
elseif i == m
J22(i, i – 2) = 1;
J22(i, i – 1) = -4;
J22(i, i) = 3+2*h*St*40^(1/6);
else
J22(i, i – 1) = -1;
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
end
end
jac = [J11, J12 ; J21, J22];
%% Updating
delv_delt = -inv(jac)*res; % res를 처음부터 column vector 형태로 만들자 다른점 하나 추가
error = sqrt(sum(delv_delt.^2));
%% Escaping condition
if error <= tol
v = v_t(1 : m – 1);
t = v_t(m : end);
v_compile(:, ii) = [v0 ; v ; vn];
t_compile(:, ii) = [t0 ; t];
break
else
iter = iter + 1;
v_t = v_t + delv_delt;
v = v_t(1 : m – 1);
t = v_t(m : end);
end
end
plot(x, v_compile(:, ii), ‘r’)
hold on
plot(x, t_compile(:, ii), ‘b’)
hold on
end
code #2
format longE
%% Predesignation
iter = 0; a = 0; b = 1; m = 1000; h = (b – a)/m; x = a: h : b; tol = 1e-7;
v0 = 1; vn = 40; t0 = 1;
ta = 0.543; k = 5.8;
st = [0.1, 0.5, 1]’;
max_iter = 1000;
v_temp = v0:(40-1)/m:vn;
v = v_temp(2:end-1)’;
t_temp = 1:(0.9-1)/m:0.9;
t = t_temp(2:end)’;
for ii = 1 : 1 : length(st)
iter = 0;
iter(ii) = iter;
v_t = [v ; t];
St = st(ii);
while iter <= max_iter
% Residual function
R1 = zeros(m – 1, 1);
for i = 1 : m – 1
if i == 1
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*1*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*1*v(i+1)*t(i)^2 …
-1^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-1);
elseif i == m – 1
R1(i) = 4*v(i)*40*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-40^2*t(i)^2+2*v(i-1)*40*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(40-v(i-1));
else
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*v(i-1)*v(i+1)*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-v(i-1));
end
end
R2 = zeros(m, 1);
for i = 1 : m
if i == 1
R2(i) = t(i+1)-1-2*h*St*v(i)^(1/6)*(ta-1);
elseif i == m
R2(i) = t(i-2)-4*t(i-1)+3*t(i)-2*h*St*40^(1/6)*(ta-t(i));
else
R2(i) = t(i+1)-t(i-1)-2*h*St*v(i)^(1/6)*(ta-t(i));
end
end
res = [R1 ; R2];
% Jacobian
J11 = zeros(m – 1);
for i = 1 : m – 1
if i == 1
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*1*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-1)*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*1*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
elseif i == m – 1
J11(i, i – 1) = 4*v(i)*t(i)^2+2*40*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*40*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(40-v(i-1))*(7/6*v(i)^(1/6));
else
J11(i, i – 1) = 4*v(i)*t(i)^2+2*v(i+1)*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-v(i-1))*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*v(i-1)*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
end
end
J12 = zeros(m – 1, m);
for i = 1 : m – 1
if i == 1
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*1*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*1*v(i+1)*t(i)-2*1^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-1);
elseif i == m – 1
J12(i, i) = 8*v(i)*40*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*40^2*t(i) …
+4*v(i-1)*40*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(40-v(i-1));
else
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*v(i-1)*v(i+1)*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-v(i-1));
end
end
J21 = zeros(m, m – 1);
for i = 1 : m – 1
J21(i, i) = -1/3*h*St*(ta-t(i))*v(i)^(-5/6);
end
J22 = zeros(m, m);
for i = 1 : m
if i == 1
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
elseif i == m
J22(i, i – 2) = 1;
J22(i, i – 1) = -4;
J22(i, i) = 3+2*h*St*40^(1/6);
else
J22(i, i – 1) = -1;
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
end
end
jac = [J11, J12 ; J21, J22];
%% Updating
delv_delt = -inv(jac)*res; % res를 처음부터 column vector 형태로 만들자 다른점 하나 추가
error = sqrt(sum(delv_delt.^2));
%% Escaping condition
if error <= tol
v = v_t(1 : m – 1);
t = v_t(m : end);
v_compile(:, ii) = [v0 ; v ; vn];
t_compile(:, ii) = [t0 ; t];
break
else
iter = iter + 1;
v_t = v_t + delv_delt;
v = v_t(1 : m – 1);
t = v_t(m : end);
end
end
plot(x, v_compile(:, ii), ‘r’)
hold on
plot(x, t_compile(:, ii), ‘b’)
hold on
end
code #3
format longE
%% Predesignation
a = 0; b = 1; m = 1000; h = (b – a)/m; x = a : h : b; max_iter = 300; tol = 1e-2;
vi = 1; ve = 40; ti = 1;
k = 5.8; ta = 0.543; St_v = [0.1 ; 0.5 ; 1];
%% for loop about St and 3rd dim. of v, t
for p = 1 : 1 : length(St_v)
j = 1;
iter = 0;
iter(p) = iter;
St = St_v(p);
if p == 1
v(:, j, p) = (vi : (ve – vi)/m : ve)’;
t(:, j, p) = (ti : (-1 – ti)/m : -1)’;
end
%% while loop
while iter <= max_iter
%% Residual function
R1 = zeros(m – 1, 1);
R1(1, 1) = -2*h*k*v(2, j, p)^(7/6)*St*(ta – t(2, j, p))*(v(3, j, p) – v(1, j, p)) – t(2, j, p)^2*(v(3, j, p) – v(1, j, p))^2 + 4*t(2, j, p)^2*v(2, j, p)*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p));
R1(end, 1) = -2*h*k*v(end – 1, j, p)^(7/6)*St*(ta – t(end – 1, j, p))*(v(end, j, p) – v(end – 2, j, p)) – t(end – 1, j, p)^2*(v(end, j, p) – v(end – 2, j, p))^2 + 4*t(end – 1, j, p)^2*v(end – 1, j, p)*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p));
for i = 3 : 1 : m – 1
R1(i – 1, 1) = -2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p))*(v(i + 1, j, p) – v(i – 1, j, p)) – t(i)^2*(v(i + 1, j, p) – v(i – 1, j, p))^2 + 4*t(i, j, p)^2*v(i, j, p)*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p));
end
R2 = zeros(m, 1);
R2(1, 1) = t(3, j, p) – t(1, j, p) – 2*h*St*v(2, j, p)^(1/6)*(ta – t(2, j, p));
R2(end, 1) = 3*t(end, j, p) – 4*t(end – 1, j, p) + t(end – 2, j, p) – 2*h*St*v(end, j, p)^(1/6)*(ta – t(end, j, p));
for i = 3 : 1 : m
R2(i – 1, 1) = t(i + 1, j, p) – t(i – 1, j, p) – 2*h*St*v(i, j, p)^(1/6)*(ta – t(i, j, p));
end
R = [R1 ; R2];
%% Jacobian
J11 = zeros(m – 1, m – 1);
J11(1, 1) = -2*h*k*(7/6)*v(2, j, p)^(1/6)*St*(ta – t(2, j, p))*(v(3, j, p) – v(1, j, p)) + 4*t(2, j, p)^2*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p)) + 4*t(2, j, p)^2*v(2, j, p)*-2;
J11(1, 2) = -2*h*k*v(2, j, p)^(7/6)*St*(ta – t(2, j, p)) – t(2, j, p)^2*(2*v(3, j, p) – 2*v(1, j, p)) + 4*t(2, j, p)^2*v(2, j, p);
J11(end, end – 1) = 2*h*k*v(end – 1, j , p)^(7/6)*St*(ta – t(end – 1, j, p)) – t(end – 1, j , p)^2*(2*v(end – 2, j, p) – 2*v(end, j, p)) + 4*t(end – 1, j, p)^2*v(end – 1, j, p);
J11(end, end) = -2*h*k*(7/6)*v(end – 1, j, p)^(1/6)*St*(ta – t(end – 1, j , p))*(v(end, j, p) – v(end – 2, j, p)) + 4*t(end – 1, j, p)^2*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p)) + 4*t(end – 1, j, p)^2*v(end – 1, j, p)*-2;
for i = 3 : 1 : m – 1
J11(i – 1, i – 2) = 2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p)) – t(i)^2*(2*v(i – 1, j, p) – 2*v(i + 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p);
J11(i – 1, i – 1) = -2*h*k*(7/6)*v(i, j, p)^(1/6)*St*(ta – t(i, j, p))*(v(i + 1, j, p) – v(i – 1, j, p)) + 4*t(i, j, p)^2*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p)*-2;
J11(i – 1, i) = -2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p)) – t(i, j, p)^2*(2*v(i + 1, j, p) – 2*v(i – 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p);
end
J12 = zeros(m – 1, m);
J12(1, 1) = 2*h*k*v(2, j , p)^(7/6)*St*(v(3, j, p) – v(1, j, p)) – 2*t(2, j, p)*(v(3, j, p) – v(1, j, p))^2 + 8*t(2, j, p)*v(2, j, p)*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p));
J12(end, end – 1) = 2*h*k*v(end – 1, j, p)^(7/6)*St*(v(end, j, p) – v(end – 2, j, p)) – 2*t(end – 1, j, p)*(v(end, j, p) – v(end – 2, j, p))^2 + 8*t(end – 1, j, p)*v(end – 1, j, p)*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p));
for i = 3 : 1 : m – 1
J12(i – 1, i – 1) = 2*h*k*v(i, j, p)^(7/6)*St*(v(i + 1, j, p) – v(i – 1, j, p)) – 2*t(i, j, p)*(v(i + 1, j, p) – v(i – 1, j, p))^2 + 8*t(i, j, p)*v(i, j, p)*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p));
end
J21 = zeros(m, m – 1);
for i = 2 : 1 : m
J21(i – 1, i – 1) = -2*h*St*(1/6)*v(i, j, p)^(-5/6)*(ta – t(i, j, p));
end
J22 = zeros(m, m);
J22(1, 1) = 2*h*St*v(2, j, p)^(1/6);
J22(1, 2) = 1;
J22(end, end – 2) = 1;
J22(end, end – 1) = -4;
J22(end, end) = 3 + 2*h*St*v(end, j, p)^(1/6);
for i = 3 : 1 : m
J22(i – 1, i – 2) = -1;
J22(i – 1, i – 1) = 2*h*St*v(i, j, p)^(1/6);
J22(i – 1, i) = 1;
end
J = [J11 J12 ; J21 J22];
%% Updating & Condition number
delta = -inv(J)*R;
J_i = inv(J);
for i = 1 : 1 : length(J)
aa(i) = sum(abs(J(i, :)));
bb(i) = sum(abs((J_i(i, :))));
end
aam = max(aa);
bbm = max(bb);
c = aam*bbm;
C(j, p) = 1/(aam*bbm);
%% Escaping condition & Condition number of jacobian0
if sqrt(sum(delta.^2)) <= tol
vf(:, p) = v(:, j, p);
tf(:, p) = t(:, j, p);
if p <= length(St_v) – 1
j = 1;
v(:, j, p + 1) = vf(:, p);
t(:, j, p + 1) = tf(:, p);
else
v(:, j, p + 1) = 0;
t(:, j, p + 1) = 0;
end
break
else
v(:, j + 1, p) = v(:, j, p);
v(2 : 1 : end – 1, j + 1, p) = v(2 : 1 : end – 1, j, p) + delta(1 : 1 : m – 1);
t(:, j + 1, p) = t(:, j, p);
t(2 : 1 : end, j + 1, p) = t(2 : 1 : end, j, p) + delta(m : 1 : end);
j = j + 1;
iter = iter + 1;
end
end
%% Plotting
plot(x, vf(:, p), ‘r’)
hold on
plot(x, tf(:, p), ‘b’)
hold on
endI used Newton-Raphson method to get velocity and temperature profiles.
I attached the differential equations as a file.
The desired result can only be obtained in the first code, and the specific matrix can be obtained in the remaining code, so the iteration value increases or the result itself cannot be obtained.
I will attach the ideal result as a graph.
code # 1
format longE
%% Predesignation
iter = 0; a = 0; b = 1; m = 1000; h = (b – a)/m; x = a: h : b; tol = 1e-7;
v0 = 1; vn = 40; t0 = 1;
ta = 0.543; k = 5.8;
st = [0.1, 0.5, 1]’;
max_iter = 1000;
for ii = 1 : 1 : length(st)
iter = 0;
iter(ii) = iter;
v_temp = v0:(40-1)/m:vn;
v = v_temp(2:end-1)’;
t_temp = 1:(0.9-1)/m:0.9;
t = t_temp(2:end)’;
v_t = [v ; t];
St = st(ii);
while iter <= max_iter
% Residual function
R1 = zeros(m – 1, 1);
for i = 1 : m – 1
if i == 1
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*1*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*1*v(i+1)*t(i)^2 …
-1^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-1);
elseif i == m – 1
R1(i) = 4*v(i)*40*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-40^2*t(i)^2+2*v(i-1)*40*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(40-v(i-1));
else
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*v(i-1)*v(i+1)*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-v(i-1));
end
end
R2 = zeros(m, 1);
for i = 1 : m
if i == 1
R2(i) = t(i+1)-1-2*h*St*v(i)^(1/6)*(ta-1);
elseif i == m
R2(i) = t(i-2)-4*t(i-1)+3*t(i)-2*h*St*40^(1/6)*(ta-t(i));
else
R2(i) = t(i+1)-t(i-1)-2*h*St*v(i)^(1/6)*(ta-t(i));
end
end
res = [R1 ; R2];
% Jacobian
J11 = zeros(m – 1);
for i = 1 : m – 1
if i == 1
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*1*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-1)*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*1*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
elseif i == m – 1
J11(i, i – 1) = 4*v(i)*t(i)^2+2*40*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*40*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(40-v(i-1))*(7/6*v(i)^(1/6));
else
J11(i, i – 1) = 4*v(i)*t(i)^2+2*v(i+1)*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-v(i-1))*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*v(i-1)*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
end
end
J12 = zeros(m – 1, m);
for i = 1 : m – 1
if i == 1
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*1*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*1*v(i+1)*t(i)-2*1^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-1);
elseif i == m – 1
J12(i, i) = 8*v(i)*40*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*40^2*t(i) …
+4*v(i-1)*40*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(40-v(i-1));
else
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*v(i-1)*v(i+1)*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-v(i-1));
end
end
J21 = zeros(m, m – 1);
for i = 1 : m – 1
J21(i, i) = -1/3*h*St*(ta-t(i))*v(i)^(-5/6);
end
J22 = zeros(m, m);
for i = 1 : m
if i == 1
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
elseif i == m
J22(i, i – 2) = 1;
J22(i, i – 1) = -4;
J22(i, i) = 3+2*h*St*40^(1/6);
else
J22(i, i – 1) = -1;
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
end
end
jac = [J11, J12 ; J21, J22];
%% Updating
delv_delt = -inv(jac)*res; % res를 처음부터 column vector 형태로 만들자 다른점 하나 추가
error = sqrt(sum(delv_delt.^2));
%% Escaping condition
if error <= tol
v = v_t(1 : m – 1);
t = v_t(m : end);
v_compile(:, ii) = [v0 ; v ; vn];
t_compile(:, ii) = [t0 ; t];
break
else
iter = iter + 1;
v_t = v_t + delv_delt;
v = v_t(1 : m – 1);
t = v_t(m : end);
end
end
plot(x, v_compile(:, ii), ‘r’)
hold on
plot(x, t_compile(:, ii), ‘b’)
hold on
end
code #2
format longE
%% Predesignation
iter = 0; a = 0; b = 1; m = 1000; h = (b – a)/m; x = a: h : b; tol = 1e-7;
v0 = 1; vn = 40; t0 = 1;
ta = 0.543; k = 5.8;
st = [0.1, 0.5, 1]’;
max_iter = 1000;
v_temp = v0:(40-1)/m:vn;
v = v_temp(2:end-1)’;
t_temp = 1:(0.9-1)/m:0.9;
t = t_temp(2:end)’;
for ii = 1 : 1 : length(st)
iter = 0;
iter(ii) = iter;
v_t = [v ; t];
St = st(ii);
while iter <= max_iter
% Residual function
R1 = zeros(m – 1, 1);
for i = 1 : m – 1
if i == 1
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*1*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*1*v(i+1)*t(i)^2 …
-1^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-1);
elseif i == m – 1
R1(i) = 4*v(i)*40*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-40^2*t(i)^2+2*v(i-1)*40*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(40-v(i-1));
else
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*v(i-1)*v(i+1)*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-v(i-1));
end
end
R2 = zeros(m, 1);
for i = 1 : m
if i == 1
R2(i) = t(i+1)-1-2*h*St*v(i)^(1/6)*(ta-1);
elseif i == m
R2(i) = t(i-2)-4*t(i-1)+3*t(i)-2*h*St*40^(1/6)*(ta-t(i));
else
R2(i) = t(i+1)-t(i-1)-2*h*St*v(i)^(1/6)*(ta-t(i));
end
end
res = [R1 ; R2];
% Jacobian
J11 = zeros(m – 1);
for i = 1 : m – 1
if i == 1
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*1*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-1)*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*1*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
elseif i == m – 1
J11(i, i – 1) = 4*v(i)*t(i)^2+2*40*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*40*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(40-v(i-1))*(7/6*v(i)^(1/6));
else
J11(i, i – 1) = 4*v(i)*t(i)^2+2*v(i+1)*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-v(i-1))*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*v(i-1)*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
end
end
J12 = zeros(m – 1, m);
for i = 1 : m – 1
if i == 1
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*1*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*1*v(i+1)*t(i)-2*1^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-1);
elseif i == m – 1
J12(i, i) = 8*v(i)*40*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*40^2*t(i) …
+4*v(i-1)*40*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(40-v(i-1));
else
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*v(i-1)*v(i+1)*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-v(i-1));
end
end
J21 = zeros(m, m – 1);
for i = 1 : m – 1
J21(i, i) = -1/3*h*St*(ta-t(i))*v(i)^(-5/6);
end
J22 = zeros(m, m);
for i = 1 : m
if i == 1
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
elseif i == m
J22(i, i – 2) = 1;
J22(i, i – 1) = -4;
J22(i, i) = 3+2*h*St*40^(1/6);
else
J22(i, i – 1) = -1;
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
end
end
jac = [J11, J12 ; J21, J22];
%% Updating
delv_delt = -inv(jac)*res; % res를 처음부터 column vector 형태로 만들자 다른점 하나 추가
error = sqrt(sum(delv_delt.^2));
%% Escaping condition
if error <= tol
v = v_t(1 : m – 1);
t = v_t(m : end);
v_compile(:, ii) = [v0 ; v ; vn];
t_compile(:, ii) = [t0 ; t];
break
else
iter = iter + 1;
v_t = v_t + delv_delt;
v = v_t(1 : m – 1);
t = v_t(m : end);
end
end
plot(x, v_compile(:, ii), ‘r’)
hold on
plot(x, t_compile(:, ii), ‘b’)
hold on
end
code #3
format longE
%% Predesignation
a = 0; b = 1; m = 1000; h = (b – a)/m; x = a : h : b; max_iter = 300; tol = 1e-2;
vi = 1; ve = 40; ti = 1;
k = 5.8; ta = 0.543; St_v = [0.1 ; 0.5 ; 1];
%% for loop about St and 3rd dim. of v, t
for p = 1 : 1 : length(St_v)
j = 1;
iter = 0;
iter(p) = iter;
St = St_v(p);
if p == 1
v(:, j, p) = (vi : (ve – vi)/m : ve)’;
t(:, j, p) = (ti : (-1 – ti)/m : -1)’;
end
%% while loop
while iter <= max_iter
%% Residual function
R1 = zeros(m – 1, 1);
R1(1, 1) = -2*h*k*v(2, j, p)^(7/6)*St*(ta – t(2, j, p))*(v(3, j, p) – v(1, j, p)) – t(2, j, p)^2*(v(3, j, p) – v(1, j, p))^2 + 4*t(2, j, p)^2*v(2, j, p)*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p));
R1(end, 1) = -2*h*k*v(end – 1, j, p)^(7/6)*St*(ta – t(end – 1, j, p))*(v(end, j, p) – v(end – 2, j, p)) – t(end – 1, j, p)^2*(v(end, j, p) – v(end – 2, j, p))^2 + 4*t(end – 1, j, p)^2*v(end – 1, j, p)*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p));
for i = 3 : 1 : m – 1
R1(i – 1, 1) = -2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p))*(v(i + 1, j, p) – v(i – 1, j, p)) – t(i)^2*(v(i + 1, j, p) – v(i – 1, j, p))^2 + 4*t(i, j, p)^2*v(i, j, p)*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p));
end
R2 = zeros(m, 1);
R2(1, 1) = t(3, j, p) – t(1, j, p) – 2*h*St*v(2, j, p)^(1/6)*(ta – t(2, j, p));
R2(end, 1) = 3*t(end, j, p) – 4*t(end – 1, j, p) + t(end – 2, j, p) – 2*h*St*v(end, j, p)^(1/6)*(ta – t(end, j, p));
for i = 3 : 1 : m
R2(i – 1, 1) = t(i + 1, j, p) – t(i – 1, j, p) – 2*h*St*v(i, j, p)^(1/6)*(ta – t(i, j, p));
end
R = [R1 ; R2];
%% Jacobian
J11 = zeros(m – 1, m – 1);
J11(1, 1) = -2*h*k*(7/6)*v(2, j, p)^(1/6)*St*(ta – t(2, j, p))*(v(3, j, p) – v(1, j, p)) + 4*t(2, j, p)^2*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p)) + 4*t(2, j, p)^2*v(2, j, p)*-2;
J11(1, 2) = -2*h*k*v(2, j, p)^(7/6)*St*(ta – t(2, j, p)) – t(2, j, p)^2*(2*v(3, j, p) – 2*v(1, j, p)) + 4*t(2, j, p)^2*v(2, j, p);
J11(end, end – 1) = 2*h*k*v(end – 1, j , p)^(7/6)*St*(ta – t(end – 1, j, p)) – t(end – 1, j , p)^2*(2*v(end – 2, j, p) – 2*v(end, j, p)) + 4*t(end – 1, j, p)^2*v(end – 1, j, p);
J11(end, end) = -2*h*k*(7/6)*v(end – 1, j, p)^(1/6)*St*(ta – t(end – 1, j , p))*(v(end, j, p) – v(end – 2, j, p)) + 4*t(end – 1, j, p)^2*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p)) + 4*t(end – 1, j, p)^2*v(end – 1, j, p)*-2;
for i = 3 : 1 : m – 1
J11(i – 1, i – 2) = 2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p)) – t(i)^2*(2*v(i – 1, j, p) – 2*v(i + 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p);
J11(i – 1, i – 1) = -2*h*k*(7/6)*v(i, j, p)^(1/6)*St*(ta – t(i, j, p))*(v(i + 1, j, p) – v(i – 1, j, p)) + 4*t(i, j, p)^2*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p)*-2;
J11(i – 1, i) = -2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p)) – t(i, j, p)^2*(2*v(i + 1, j, p) – 2*v(i – 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p);
end
J12 = zeros(m – 1, m);
J12(1, 1) = 2*h*k*v(2, j , p)^(7/6)*St*(v(3, j, p) – v(1, j, p)) – 2*t(2, j, p)*(v(3, j, p) – v(1, j, p))^2 + 8*t(2, j, p)*v(2, j, p)*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p));
J12(end, end – 1) = 2*h*k*v(end – 1, j, p)^(7/6)*St*(v(end, j, p) – v(end – 2, j, p)) – 2*t(end – 1, j, p)*(v(end, j, p) – v(end – 2, j, p))^2 + 8*t(end – 1, j, p)*v(end – 1, j, p)*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p));
for i = 3 : 1 : m – 1
J12(i – 1, i – 1) = 2*h*k*v(i, j, p)^(7/6)*St*(v(i + 1, j, p) – v(i – 1, j, p)) – 2*t(i, j, p)*(v(i + 1, j, p) – v(i – 1, j, p))^2 + 8*t(i, j, p)*v(i, j, p)*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p));
end
J21 = zeros(m, m – 1);
for i = 2 : 1 : m
J21(i – 1, i – 1) = -2*h*St*(1/6)*v(i, j, p)^(-5/6)*(ta – t(i, j, p));
end
J22 = zeros(m, m);
J22(1, 1) = 2*h*St*v(2, j, p)^(1/6);
J22(1, 2) = 1;
J22(end, end – 2) = 1;
J22(end, end – 1) = -4;
J22(end, end) = 3 + 2*h*St*v(end, j, p)^(1/6);
for i = 3 : 1 : m
J22(i – 1, i – 2) = -1;
J22(i – 1, i – 1) = 2*h*St*v(i, j, p)^(1/6);
J22(i – 1, i) = 1;
end
J = [J11 J12 ; J21 J22];
%% Updating & Condition number
delta = -inv(J)*R;
J_i = inv(J);
for i = 1 : 1 : length(J)
aa(i) = sum(abs(J(i, :)));
bb(i) = sum(abs((J_i(i, :))));
end
aam = max(aa);
bbm = max(bb);
c = aam*bbm;
C(j, p) = 1/(aam*bbm);
%% Escaping condition & Condition number of jacobian0
if sqrt(sum(delta.^2)) <= tol
vf(:, p) = v(:, j, p);
tf(:, p) = t(:, j, p);
if p <= length(St_v) – 1
j = 1;
v(:, j, p + 1) = vf(:, p);
t(:, j, p + 1) = tf(:, p);
else
v(:, j, p + 1) = 0;
t(:, j, p + 1) = 0;
end
break
else
v(:, j + 1, p) = v(:, j, p);
v(2 : 1 : end – 1, j + 1, p) = v(2 : 1 : end – 1, j, p) + delta(1 : 1 : m – 1);
t(:, j + 1, p) = t(:, j, p);
t(2 : 1 : end, j + 1, p) = t(2 : 1 : end, j, p) + delta(m : 1 : end);
j = j + 1;
iter = iter + 1;
end
end
%% Plotting
plot(x, vf(:, p), ‘r’)
hold on
plot(x, tf(:, p), ‘b’)
hold on
end I used Newton-Raphson method to get velocity and temperature profiles.
I attached the differential equations as a file.
The desired result can only be obtained in the first code, and the specific matrix can be obtained in the remaining code, so the iteration value increases or the result itself cannot be obtained.
I will attach the ideal result as a graph.
code # 1
format longE
%% Predesignation
iter = 0; a = 0; b = 1; m = 1000; h = (b – a)/m; x = a: h : b; tol = 1e-7;
v0 = 1; vn = 40; t0 = 1;
ta = 0.543; k = 5.8;
st = [0.1, 0.5, 1]’;
max_iter = 1000;
for ii = 1 : 1 : length(st)
iter = 0;
iter(ii) = iter;
v_temp = v0:(40-1)/m:vn;
v = v_temp(2:end-1)’;
t_temp = 1:(0.9-1)/m:0.9;
t = t_temp(2:end)’;
v_t = [v ; t];
St = st(ii);
while iter <= max_iter
% Residual function
R1 = zeros(m – 1, 1);
for i = 1 : m – 1
if i == 1
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*1*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*1*v(i+1)*t(i)^2 …
-1^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-1);
elseif i == m – 1
R1(i) = 4*v(i)*40*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-40^2*t(i)^2+2*v(i-1)*40*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(40-v(i-1));
else
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*v(i-1)*v(i+1)*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-v(i-1));
end
end
R2 = zeros(m, 1);
for i = 1 : m
if i == 1
R2(i) = t(i+1)-1-2*h*St*v(i)^(1/6)*(ta-1);
elseif i == m
R2(i) = t(i-2)-4*t(i-1)+3*t(i)-2*h*St*40^(1/6)*(ta-t(i));
else
R2(i) = t(i+1)-t(i-1)-2*h*St*v(i)^(1/6)*(ta-t(i));
end
end
res = [R1 ; R2];
% Jacobian
J11 = zeros(m – 1);
for i = 1 : m – 1
if i == 1
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*1*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-1)*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*1*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
elseif i == m – 1
J11(i, i – 1) = 4*v(i)*t(i)^2+2*40*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*40*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(40-v(i-1))*(7/6*v(i)^(1/6));
else
J11(i, i – 1) = 4*v(i)*t(i)^2+2*v(i+1)*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-v(i-1))*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*v(i-1)*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
end
end
J12 = zeros(m – 1, m);
for i = 1 : m – 1
if i == 1
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*1*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*1*v(i+1)*t(i)-2*1^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-1);
elseif i == m – 1
J12(i, i) = 8*v(i)*40*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*40^2*t(i) …
+4*v(i-1)*40*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(40-v(i-1));
else
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*v(i-1)*v(i+1)*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-v(i-1));
end
end
J21 = zeros(m, m – 1);
for i = 1 : m – 1
J21(i, i) = -1/3*h*St*(ta-t(i))*v(i)^(-5/6);
end
J22 = zeros(m, m);
for i = 1 : m
if i == 1
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
elseif i == m
J22(i, i – 2) = 1;
J22(i, i – 1) = -4;
J22(i, i) = 3+2*h*St*40^(1/6);
else
J22(i, i – 1) = -1;
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
end
end
jac = [J11, J12 ; J21, J22];
%% Updating
delv_delt = -inv(jac)*res; % res를 처음부터 column vector 형태로 만들자 다른점 하나 추가
error = sqrt(sum(delv_delt.^2));
%% Escaping condition
if error <= tol
v = v_t(1 : m – 1);
t = v_t(m : end);
v_compile(:, ii) = [v0 ; v ; vn];
t_compile(:, ii) = [t0 ; t];
break
else
iter = iter + 1;
v_t = v_t + delv_delt;
v = v_t(1 : m – 1);
t = v_t(m : end);
end
end
plot(x, v_compile(:, ii), ‘r’)
hold on
plot(x, t_compile(:, ii), ‘b’)
hold on
end
code #2
format longE
%% Predesignation
iter = 0; a = 0; b = 1; m = 1000; h = (b – a)/m; x = a: h : b; tol = 1e-7;
v0 = 1; vn = 40; t0 = 1;
ta = 0.543; k = 5.8;
st = [0.1, 0.5, 1]’;
max_iter = 1000;
v_temp = v0:(40-1)/m:vn;
v = v_temp(2:end-1)’;
t_temp = 1:(0.9-1)/m:0.9;
t = t_temp(2:end)’;
for ii = 1 : 1 : length(st)
iter = 0;
iter(ii) = iter;
v_t = [v ; t];
St = st(ii);
while iter <= max_iter
% Residual function
R1 = zeros(m – 1, 1);
for i = 1 : m – 1
if i == 1
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*1*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*1*v(i+1)*t(i)^2 …
-1^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-1);
elseif i == m – 1
R1(i) = 4*v(i)*40*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-40^2*t(i)^2+2*v(i-1)*40*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(40-v(i-1));
else
R1(i) = 4*v(i)*v(i+1)*t(i)^2-8*v(i)^2*t(i)^2+4*v(i-1)*v(i)*t(i)^2 …
-v(i+1)^2*t(i)^2+2*v(i-1)*v(i+1)*t(i)^2 …
-v(i-1)^2*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i))*(v(i+1)-v(i-1));
end
end
R2 = zeros(m, 1);
for i = 1 : m
if i == 1
R2(i) = t(i+1)-1-2*h*St*v(i)^(1/6)*(ta-1);
elseif i == m
R2(i) = t(i-2)-4*t(i-1)+3*t(i)-2*h*St*40^(1/6)*(ta-t(i));
else
R2(i) = t(i+1)-t(i-1)-2*h*St*v(i)^(1/6)*(ta-t(i));
end
end
res = [R1 ; R2];
% Jacobian
J11 = zeros(m – 1);
for i = 1 : m – 1
if i == 1
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*1*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-1)*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*1*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
elseif i == m – 1
J11(i, i – 1) = 4*v(i)*t(i)^2+2*40*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*40*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(40-v(i-1))*(7/6*v(i)^(1/6));
else
J11(i, i – 1) = 4*v(i)*t(i)^2+2*v(i+1)*t(i)^2-2*v(i-1)*t(i)^2+2*k*St*h*v(i)^(7/6)*(ta-t(i));
J11(i, i) = 4*v(i+1)*t(i)^2-16*v(i)*t(i)^2+4*v(i-1)*t(i)^2-2*k*St*h*(ta-t(i))*(v(i+1)-v(i-1))*(7/6*v(i)^(1/6));
J11(i, i + 1) = 4*v(i)*t(i)^2-2*v(i+1)*t(i)^2+2*v(i-1)*t(i)^2-2*k*St*h*v(i)^(7/6)*(ta-t(i));
end
end
J12 = zeros(m – 1, m);
for i = 1 : m – 1
if i == 1
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*1*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*1*v(i+1)*t(i)-2*1^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-1);
elseif i == m – 1
J12(i, i) = 8*v(i)*40*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*40^2*t(i) …
+4*v(i-1)*40*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(40-v(i-1));
else
J12(i, i) = 8*v(i)*v(i+1)*t(i)-16*v(i)^2*t(i)+8*v(i-1)*v(i)*t(i)-2*v(i+1)^2*t(i) …
+4*v(i-1)*v(i+1)*t(i)-2*v(i-1)^2*t(i)+2*k*St*h*v(i)^(7/6)*(v(i+1)-v(i-1));
end
end
J21 = zeros(m, m – 1);
for i = 1 : m – 1
J21(i, i) = -1/3*h*St*(ta-t(i))*v(i)^(-5/6);
end
J22 = zeros(m, m);
for i = 1 : m
if i == 1
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
elseif i == m
J22(i, i – 2) = 1;
J22(i, i – 1) = -4;
J22(i, i) = 3+2*h*St*40^(1/6);
else
J22(i, i – 1) = -1;
J22(i, i) = 2*h*St*v(i)^(1/6);
J22(i, i + 1) = 1;
end
end
jac = [J11, J12 ; J21, J22];
%% Updating
delv_delt = -inv(jac)*res; % res를 처음부터 column vector 형태로 만들자 다른점 하나 추가
error = sqrt(sum(delv_delt.^2));
%% Escaping condition
if error <= tol
v = v_t(1 : m – 1);
t = v_t(m : end);
v_compile(:, ii) = [v0 ; v ; vn];
t_compile(:, ii) = [t0 ; t];
break
else
iter = iter + 1;
v_t = v_t + delv_delt;
v = v_t(1 : m – 1);
t = v_t(m : end);
end
end
plot(x, v_compile(:, ii), ‘r’)
hold on
plot(x, t_compile(:, ii), ‘b’)
hold on
end
code #3
format longE
%% Predesignation
a = 0; b = 1; m = 1000; h = (b – a)/m; x = a : h : b; max_iter = 300; tol = 1e-2;
vi = 1; ve = 40; ti = 1;
k = 5.8; ta = 0.543; St_v = [0.1 ; 0.5 ; 1];
%% for loop about St and 3rd dim. of v, t
for p = 1 : 1 : length(St_v)
j = 1;
iter = 0;
iter(p) = iter;
St = St_v(p);
if p == 1
v(:, j, p) = (vi : (ve – vi)/m : ve)’;
t(:, j, p) = (ti : (-1 – ti)/m : -1)’;
end
%% while loop
while iter <= max_iter
%% Residual function
R1 = zeros(m – 1, 1);
R1(1, 1) = -2*h*k*v(2, j, p)^(7/6)*St*(ta – t(2, j, p))*(v(3, j, p) – v(1, j, p)) – t(2, j, p)^2*(v(3, j, p) – v(1, j, p))^2 + 4*t(2, j, p)^2*v(2, j, p)*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p));
R1(end, 1) = -2*h*k*v(end – 1, j, p)^(7/6)*St*(ta – t(end – 1, j, p))*(v(end, j, p) – v(end – 2, j, p)) – t(end – 1, j, p)^2*(v(end, j, p) – v(end – 2, j, p))^2 + 4*t(end – 1, j, p)^2*v(end – 1, j, p)*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p));
for i = 3 : 1 : m – 1
R1(i – 1, 1) = -2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p))*(v(i + 1, j, p) – v(i – 1, j, p)) – t(i)^2*(v(i + 1, j, p) – v(i – 1, j, p))^2 + 4*t(i, j, p)^2*v(i, j, p)*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p));
end
R2 = zeros(m, 1);
R2(1, 1) = t(3, j, p) – t(1, j, p) – 2*h*St*v(2, j, p)^(1/6)*(ta – t(2, j, p));
R2(end, 1) = 3*t(end, j, p) – 4*t(end – 1, j, p) + t(end – 2, j, p) – 2*h*St*v(end, j, p)^(1/6)*(ta – t(end, j, p));
for i = 3 : 1 : m
R2(i – 1, 1) = t(i + 1, j, p) – t(i – 1, j, p) – 2*h*St*v(i, j, p)^(1/6)*(ta – t(i, j, p));
end
R = [R1 ; R2];
%% Jacobian
J11 = zeros(m – 1, m – 1);
J11(1, 1) = -2*h*k*(7/6)*v(2, j, p)^(1/6)*St*(ta – t(2, j, p))*(v(3, j, p) – v(1, j, p)) + 4*t(2, j, p)^2*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p)) + 4*t(2, j, p)^2*v(2, j, p)*-2;
J11(1, 2) = -2*h*k*v(2, j, p)^(7/6)*St*(ta – t(2, j, p)) – t(2, j, p)^2*(2*v(3, j, p) – 2*v(1, j, p)) + 4*t(2, j, p)^2*v(2, j, p);
J11(end, end – 1) = 2*h*k*v(end – 1, j , p)^(7/6)*St*(ta – t(end – 1, j, p)) – t(end – 1, j , p)^2*(2*v(end – 2, j, p) – 2*v(end, j, p)) + 4*t(end – 1, j, p)^2*v(end – 1, j, p);
J11(end, end) = -2*h*k*(7/6)*v(end – 1, j, p)^(1/6)*St*(ta – t(end – 1, j , p))*(v(end, j, p) – v(end – 2, j, p)) + 4*t(end – 1, j, p)^2*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p)) + 4*t(end – 1, j, p)^2*v(end – 1, j, p)*-2;
for i = 3 : 1 : m – 1
J11(i – 1, i – 2) = 2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p)) – t(i)^2*(2*v(i – 1, j, p) – 2*v(i + 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p);
J11(i – 1, i – 1) = -2*h*k*(7/6)*v(i, j, p)^(1/6)*St*(ta – t(i, j, p))*(v(i + 1, j, p) – v(i – 1, j, p)) + 4*t(i, j, p)^2*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p)*-2;
J11(i – 1, i) = -2*h*k*v(i, j, p)^(7/6)*St*(ta – t(i, j, p)) – t(i, j, p)^2*(2*v(i + 1, j, p) – 2*v(i – 1, j, p)) + 4*t(i, j, p)^2*v(i, j, p);
end
J12 = zeros(m – 1, m);
J12(1, 1) = 2*h*k*v(2, j , p)^(7/6)*St*(v(3, j, p) – v(1, j, p)) – 2*t(2, j, p)*(v(3, j, p) – v(1, j, p))^2 + 8*t(2, j, p)*v(2, j, p)*(v(3, j, p) – 2*v(2, j, p) + v(1, j, p));
J12(end, end – 1) = 2*h*k*v(end – 1, j, p)^(7/6)*St*(v(end, j, p) – v(end – 2, j, p)) – 2*t(end – 1, j, p)*(v(end, j, p) – v(end – 2, j, p))^2 + 8*t(end – 1, j, p)*v(end – 1, j, p)*(v(end, j, p) – 2*v(end – 1, j, p) + v(end – 2, j, p));
for i = 3 : 1 : m – 1
J12(i – 1, i – 1) = 2*h*k*v(i, j, p)^(7/6)*St*(v(i + 1, j, p) – v(i – 1, j, p)) – 2*t(i, j, p)*(v(i + 1, j, p) – v(i – 1, j, p))^2 + 8*t(i, j, p)*v(i, j, p)*(v(i + 1, j, p) – 2*v(i, j, p) + v(i – 1, j, p));
end
J21 = zeros(m, m – 1);
for i = 2 : 1 : m
J21(i – 1, i – 1) = -2*h*St*(1/6)*v(i, j, p)^(-5/6)*(ta – t(i, j, p));
end
J22 = zeros(m, m);
J22(1, 1) = 2*h*St*v(2, j, p)^(1/6);
J22(1, 2) = 1;
J22(end, end – 2) = 1;
J22(end, end – 1) = -4;
J22(end, end) = 3 + 2*h*St*v(end, j, p)^(1/6);
for i = 3 : 1 : m
J22(i – 1, i – 2) = -1;
J22(i – 1, i – 1) = 2*h*St*v(i, j, p)^(1/6);
J22(i – 1, i) = 1;
end
J = [J11 J12 ; J21 J22];
%% Updating & Condition number
delta = -inv(J)*R;
J_i = inv(J);
for i = 1 : 1 : length(J)
aa(i) = sum(abs(J(i, :)));
bb(i) = sum(abs((J_i(i, :))));
end
aam = max(aa);
bbm = max(bb);
c = aam*bbm;
C(j, p) = 1/(aam*bbm);
%% Escaping condition & Condition number of jacobian0
if sqrt(sum(delta.^2)) <= tol
vf(:, p) = v(:, j, p);
tf(:, p) = t(:, j, p);
if p <= length(St_v) – 1
j = 1;
v(:, j, p + 1) = vf(:, p);
t(:, j, p + 1) = tf(:, p);
else
v(:, j, p + 1) = 0;
t(:, j, p + 1) = 0;
end
break
else
v(:, j + 1, p) = v(:, j, p);
v(2 : 1 : end – 1, j + 1, p) = v(2 : 1 : end – 1, j, p) + delta(1 : 1 : m – 1);
t(:, j + 1, p) = t(:, j, p);
t(2 : 1 : end, j + 1, p) = t(2 : 1 : end, j, p) + delta(m : 1 : end);
j = j + 1;
iter = iter + 1;
end
end
%% Plotting
plot(x, vf(:, p), ‘r’)
hold on
plot(x, tf(:, p), ‘b’)
hold on
end differential equations, newton-raphson method MATLAB Answers — New Questions
Does Outlook Mobile app on iOS share third party Mail Account password with Microsoft Servers
When an IMAP mail account of third party mail providers is configured on the Microsoft Outlook app for iOS or Android, does the Outlook app also make the mail account password and content accessible to Microsoft Servers for Push Notifications or otherwise.
If yes, it makes the security of mail account suspect particularly in case of corporate mail accounts which have strict policies of not sharing or connecting their mail server credentials as well as mail content to or through any third party which may include Microsoft.
Or is it that the Microsoft Outlook App connects directly with the mail servers and other Microsoft Servers are not in the picture.
When an IMAP mail account of third party mail providers is configured on the Microsoft Outlook app for iOS or Android, does the Outlook app also make the mail account password and content accessible to Microsoft Servers for Push Notifications or otherwise.If yes, it makes the security of mail account suspect particularly in case of corporate mail accounts which have strict policies of not sharing or connecting their mail server credentials as well as mail content to or through any third party which may include Microsoft.Or is it that the Microsoft Outlook App connects directly with the mail servers and other Microsoft Servers are not in the picture. Read More
“Something went wrong. Try to reopen Settings later.” The update page has been blank for days.
Hi there,
I can’t get any update anymore, and the Update troubleshooter doesn’t work either. I tried solutions provided in posts from 2022 but it didn’t help.
Would anyone happen to have a recent solution that works for this case? I also get a “Restart necessary” toast for a firmware update on startup, but the update is never installed on reboot.
I’ve spent days trying to restart services, clear the cache, etc… and I’m starting to lose hope about this one. Sent feedback in the feedback app but no update so far.
I’d be very thankful for anyone that can get me the updater working again.
Many thanks!
—
Edition Windows 11 Enterprise
Version 24H2
OS build 26058.1100
Experience Windows Feature Experience Pack 1000.26058.1100.0
Hi there, I can’t get any update anymore, and the Update troubleshooter doesn’t work either. I tried solutions provided in posts from 2022 but it didn’t help. Would anyone happen to have a recent solution that works for this case? I also get a “Restart necessary” toast for a firmware update on startup, but the update is never installed on reboot. I’ve spent days trying to restart services, clear the cache, etc… and I’m starting to lose hope about this one. Sent feedback in the feedback app but no update so far. I’d be very thankful for anyone that can get me the updater working again.Many thanks! — Edition Windows 11 EnterpriseVersion 24H2OS build 26058.1100Experience Windows Feature Experience Pack 1000.26058.1100.0 Read More