Category: News
Laptop Freezes Only During Specific Time Period When Upgrading to Windows 11
After upgrading to Windows 11 24H2 on my Dell laptop, I encountered a frustrating problem: every morning between 6-10 AM, the touchpad mouse would freeze for 5 seconds every minute or so. Despite trying various solutions like deleting scheduled tasks and even reinstalling different versions of Windows 11, the issue persisted. It is perplexing to me as everything was working perfectly before the update to Windows 11 24H2. Any advice on how to resolve this issue would be greatly appreciated. Thank you.
After upgrading to Windows 11 24H2 on my Dell laptop, I encountered a frustrating problem: every morning between 6-10 AM, the touchpad mouse would freeze for 5 seconds every minute or so. Despite trying various solutions like deleting scheduled tasks and even reinstalling different versions of Windows 11, the issue persisted. It is perplexing to me as everything was working perfectly before the update to Windows 11 24H2. Any advice on how to resolve this issue would be greatly appreciated. Thank you. Read More
Gaining Mastery of my Windows 11 Pro System
I recently made the switch from using Linux to Windows 11 in order to focus on gaming without compatibility issues. While I appreciate the user-friendly interface of Windows, I am encountering challenges in gaining full control over my system. Despite upgrading to the Pro version for increased controls, I am struggling with automated events overriding my custom settings in regedit and gpedit. This leads me to question if I have the necessary permissions or privileges to make these changes.
My goal is to have complete authority over antivirus and update processes, yet I find Windows Defender and automatic updates seemingly operating independently. I believe that an experienced user should have the ability to manage these aspects without constant interference. While I remember Windows software in the past being highly customizable, I am uncertain if the same level of flexibility exists now. Are professionals no longer able to tailor their systems to their needs?
I am determined to find a solution to prevent the OS from making decisions on my behalf. However, my online searches for answers have been inconclusive with many sources offering mere suggestions rather than definitive solutions. This leaves me wondering if this struggle for control is ongoing or if I am overlooking a crucial detail.
If anyone can provide guidance on how to elevate my user privileges to true system administrator status, I would greatly appreciate the assistance. Thank you!
I recently made the switch from using Linux to Windows 11 in order to focus on gaming without compatibility issues. While I appreciate the user-friendly interface of Windows, I am encountering challenges in gaining full control over my system. Despite upgrading to the Pro version for increased controls, I am struggling with automated events overriding my custom settings in regedit and gpedit. This leads me to question if I have the necessary permissions or privileges to make these changes. My goal is to have complete authority over antivirus and update processes, yet I find Windows Defender and automatic updates seemingly operating independently. I believe that an experienced user should have the ability to manage these aspects without constant interference. While I remember Windows software in the past being highly customizable, I am uncertain if the same level of flexibility exists now. Are professionals no longer able to tailor their systems to their needs? I am determined to find a solution to prevent the OS from making decisions on my behalf. However, my online searches for answers have been inconclusive with many sources offering mere suggestions rather than definitive solutions. This leaves me wondering if this struggle for control is ongoing or if I am overlooking a crucial detail. If anyone can provide guidance on how to elevate my user privileges to true system administrator status, I would greatly appreciate the assistance. Thank you! Read More
Ipad RD Client, Maintaining middle mouse click problem
Was redirected here, coming from: https://techcommunity.microsoft.com/t5/azure-virtual-desktop-feedback/ipad-rd-client-maintaining-middle-mouse-click-problem/idc-p/4194446
When using middle mouse click maintained and dragging somewhere else with my bluetooth mouse, the cursor stay stuck in place instead of moving while clicked to suddenly traverse the screen and give input only once released, which is bothering for 3D programs or scrolling trough pages on firefox, preventing the scroll or moving viewport by staying blocked in placee instead of moving when moving the mouse.
Windows 11
Ipad Pro 3rd gen 12″, Ipad OS 17.5.3
Was redirected here, coming from: https://techcommunity.microsoft.com/t5/azure-virtual-desktop-feedback/ipad-rd-client-maintaining-middle-mouse-click-problem/idc-p/4194446When using middle mouse click maintained and dragging somewhere else with my bluetooth mouse, the cursor stay stuck in place instead of moving while clicked to suddenly traverse the screen and give input only once released, which is bothering for 3D programs or scrolling trough pages on firefox, preventing the scroll or moving viewport by staying blocked in placee instead of moving when moving the mouse.Windows 11Ipad Pro 3rd gen 12″, Ipad OS 17.5.3 Read More
Ipad RD Client, Keyboard in app Shortcuts problems
Was redirected here, original post: https://techcommunity.microsoft.com/t5/azure-virtual-desktop-feedback/ipad-rd-client-keyboard-in-app-shortcuts-problems/idi-p/4182429
Hello,
So here is the problem I face:
My keyboard is working perfectly fine whenever I use it regurlarly, however, there seem to have problem when using shortcuts in apps.
Like, most of the time, I must to Ctrl + w instead of Ctrl + Z for having the Ctrl + Z working.
I Have a french keyboard, AZERTY, and it looks like the shortcuts are swapped? There are problem with those in different apps in any case;
Seenda keyboard.
Also, problem when using Blender, I did dug up an old post (https://techcommunity.microsoft.com/t5/azure-virtual-desktop-feedback/blender-does-not-recognize-keyboard-input-with-rdclient-for-ipad/idc-p/4182412#M3302) since I have the same problem, but will put it there too, but it seems that alphabetical and numerical inputs are not sent at all while using this program. (Also, when moving things around in the viewport with middle mouse button, the stream freeze while moving and can’t see how it update live, which is bothering (EDIT: Other problem that will be adressed in another post).)
Seems to be 3D apps in general? 3D Coat doesn’t register shortcut either (tried enter, and Alphabetical).
Windows 11 on laptop
Ipad is 3rd gen 12″, IpadOs 17.5.1
Was redirected here, original post: https://techcommunity.microsoft.com/t5/azure-virtual-desktop-feedback/ipad-rd-client-keyboard-in-app-shortcuts-problems/idi-p/4182429Hello,So here is the problem I face:My keyboard is working perfectly fine whenever I use it regurlarly, however, there seem to have problem when using shortcuts in apps.Like, most of the time, I must to Ctrl + w instead of Ctrl + Z for having the Ctrl + Z working.I Have a french keyboard, AZERTY, and it looks like the shortcuts are swapped? There are problem with those in different apps in any case;Seenda keyboard.Also, problem when using Blender, I did dug up an old post (https://techcommunity.microsoft.com/t5/azure-virtual-desktop-feedback/blender-does-not-recognize-keyboard-input-with-rdclient-for-ipad/idc-p/4182412#M3302) since I have the same problem, but will put it there too, but it seems that alphabetical and numerical inputs are not sent at all while using this program. (Also, when moving things around in the viewport with middle mouse button, the stream freeze while moving and can’t see how it update live, which is bothering (EDIT: Other problem that will be adressed in another post).)Seems to be 3D apps in general? 3D Coat doesn’t register shortcut either (tried enter, and Alphabetical).Windows 11 on laptopIpad is 3rd gen 12″, IpadOs 17.5.1 Read More
On import high dimensional data from csv, how to assign them appropriate optimal datatypes automatically?
I am working with a dataset that has 30,000 features most of them are logocal datatypes.
I wish that when this data is imported to workspace an appropriate optimal datatypes is assiged automatically to each column(attributes).
I observe through the data cleaning tool that they are not being assigned the optimal datatypes
such as logical datatypes are assigned double( wasting alot of space).
Manualy assigning will be very tedious task because of 30 thousand features.
Moreover, other algorithms are demanding too much memory because of this such as feature ranking methods and machine learning algorithms
Th system i am using has 32GB of RAM.I am working with a dataset that has 30,000 features most of them are logocal datatypes.
I wish that when this data is imported to workspace an appropriate optimal datatypes is assiged automatically to each column(attributes).
I observe through the data cleaning tool that they are not being assigned the optimal datatypes
such as logical datatypes are assigned double( wasting alot of space).
Manualy assigning will be very tedious task because of 30 thousand features.
Moreover, other algorithms are demanding too much memory because of this such as feature ranking methods and machine learning algorithms
Th system i am using has 32GB of RAM. I am working with a dataset that has 30,000 features most of them are logocal datatypes.
I wish that when this data is imported to workspace an appropriate optimal datatypes is assiged automatically to each column(attributes).
I observe through the data cleaning tool that they are not being assigned the optimal datatypes
such as logical datatypes are assigned double( wasting alot of space).
Manualy assigning will be very tedious task because of 30 thousand features.
Moreover, other algorithms are demanding too much memory because of this such as feature ranking methods and machine learning algorithms
Th system i am using has 32GB of RAM. high dimansional data, optimal datatypes casting, importing high dimensional data MATLAB Answers — New Questions
Hi, I am trying to get a curve fit to real data. and I have had a lot of problems. I am using the fminsearch function to get an estimate of the parameters; my questions are: 1
clear
close all
clc
% Données spécifiques
specific_data = [
2009 2 8;
2010 10 22;
2011 30 45;
2012 111 75;
2013 125 96;
2014 255 192;
2015 379 227;
2016 384 238
2017 360 279;
2018 399 229;
2019 235 128
];
% Utilisez les données spécifiques
tdata = specific_data(:, 1);
Hdata = specific_data(:, 2);
HSdata = specific_data(:, 3);
tforward = 2009:1:2019;
%tmeasure = [ 1:100:1001]’;
% initial values
gamma = 1.5;
phi_S = 0.0006; % transmission prob
phi_H = 0.000051; % trans proba
c1=3;
c2=1.5;
theta1 = 100; % djustment parameters for syph
theta2 = 4; %djustment parameters for hi
alpha = 0.6; % progression rate
beta = 0.2; %Complications rate
rho1 = 0.4; % adjustment parameters
rho2 = 1.5; % adjustment parameters
rho3 = 1.5; % adjustment parameters
k0 = [phi_S phi_H c1 c2 theta1 theta2 alpha beta rho1 rho2 rho3 ];
% solve equ with initial value of parameters
[t, Y] = ode23s(@(t, y)modelhs(t, y, k0), tforward, [ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
yintM = Y(:,1);
yintS = Y(:,2);
yintH1 = Y(:,3);
yintH2 = Y(:,4);
yintH1S=Y(:,5);
yintH2S=Y(:,6);
Hh=phi_H * ( yintH1 + c1 * yintH1S ).*yintM + rho1 * gamma * yintH1S + alpha* yintH2; % new cases from monoH
HShs=theta1*phi_S * ( yintS + c2 * yintH1S ).*yintH1 + theta2*phi_H * ( yintH1 + c1 * yintH1S ).*yintS+ rho2*alpha*yintH1S; %new case of co h-s
%H2q = Y(:,4);% assignts the y-coordinates of .
% Plotting specific data and solutions
% Display the results
figure(1)
%subplot(1,2,1);
plot(tdata, Hdata, ‘r*’);
hold on
plot(tdata, Hh, ‘b-‘);
xlabel(‘time in days’);
ylabel(‘Number of monhiv cases’);
axis([2009 2019 0 500]);
figure(2)
%subplot(1,2,1);
plot(tdata, HSdata, ‘r*’);
hold on
plot(tdata, HShs, ‘b-‘);
xlabel(‘time in days’);
ylabel(‘Number of Coinfection cases’);
axis([2009 2019 0 500]);
% Minimization routine using Nelder & Mead Simplex algorithm (a derivative-free method)
% Assigns the new values of parameters to k and the error to fval
% Minimization routine using Nelder & Mead Simplex algorithm (a derivative-free method)
% Assigns the new values of parameters to k and the error to fval
[k,fval] = fminsearch(@moderHS,k0)
%print final values of alpha and beta
disp(k);
%Draw the data with the final ODE
[T, Y] = ode45(@(t,y)(modelhs(t,y,k)),tforward,[ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
yintM = Y(:,1);
yintS = Y(:,2);
yintH1 = Y(:,3);
yintH2 = Y(:,4);
yintH1S=Y(:,5);
yintH2S=Y(:,6);
Hh=phi_H * ( yintH1 + c1 * yintH1S ).*yintM + rho1 * gamma * yintH1S + alpha* yintH2; % new cases from mono-HIV
HShs=theta1*phi_S * ( yintS + c2 * yintH1S ).*yintH1 + theta2*phi_H * ( yintH1 + c1 * yintH1S ).*yintS+ rho2*alpha*yintH1S; %new case of coinfection hiv+syphilis
%H2q = Y(:,4);% assignts the y-coordinates of …
residuals = (Hdata+HSdata – Hh-HShs)./2;
%subplot(1,2,2);
figure(3)
plot(tdata,Hdata,’r*’);
hold on
plot(tdata,Hh,’b-‘);
xlabel(‘Time in days’);
ylabel(‘Number of mono-HIV cases’);
axis([2009 2019 0 1000]);
legend(‘Data’, ‘Model estimation’);
figure(4)
plot(tdata,HSdata,’r*’);
hold on
plot(tdata,HShs,’b-‘);
xlabel(‘Time in days’);
ylabel(‘Number of Coinfection cases’);
axis([2009 2019 0 1000]);
legend(‘Data’, ‘Model estimation’);
function dy=modelhs(~,y,k)
delta = 0.01; % Taux de mortalité
delta_S = 0.05; % Taux de mort de Syphilis.
delta_H = 0.4;
Lambda =4.04 *100;
gamma=1.5;
phi_S =k(1);
phi_H =k(2);
c1 = k(3);
c2=k(4) ;
theta1 =k(5) ;
theta2 = k(6);
alpha = k(7);
beta = k(8);
rho1 = k(9);
rho2= k(10);
rho3=k(11);
dy = zeros(7,1);
%lambda_s=phi_S * ( y(2) + c2 * y(5))
%lambda_H= phi_H * ( y(3) + c1 * y(5) )
dy(1) = Lambda + gamma * y(2) – (phi_S * ( y(2) + c2 * y(5)) + phi_H * (y(3) + c1 * y(5)) + delta ) * y(1) ;%M
dy(2)= phi_S * ( y(2) + c2 * y(5) ) * y(1) – ( gamma + theta2 * phi_H * ( y(3) + c1 * y(5) ) + delta_S ) * y(2) ;%S
dy(3) = phi_H * ( y(3) + c1 * y(5) ) * y(1) + rho1 * gamma * y(5) – (theta1 * phi_S * ( y(2) + c2 * y(5)) + delta + delta_H + alpha) * y(3) ;%H1
dy(4) = alpha * y(3) – (beta + delta + delta_H) * y(4) ;%H2
dy(5) = theta2 * phi_H * ( y(3) + c1 * y(5) ) * y(2) + ( theta1 * phi_S * ( y(2) + c2 * y(5) ) ) * y(3) – ( rho1 * gamma + rho2 * alpha + delta_H + delta_S + delta ) * y(5) ;%H1S
dy(6)= rho2 * alpha * y(5) – ( rho3 * beta + delta_S + delta_H + delta ) * y(6) ;%H2S
dy(7)= beta * y(4) + rho3 * beta * y(6) – ( delta + delta_H ) * y(7) ;%C
end
function error_in_data = moderHS(k)
% Données spécifiques
specific_data = [
2009 2 8;
2010 10 22;
2011 30 45;
2012 111 75;
2013 125 96;
2014 255 192;
2015 379 227;
2016 384 238
2017 360 279;
2018 399 229;
2019 235 128
];
gamma = 1.5;
phi_S =k(1);
phi_H =k(2);
c1 = k(3);
c2=k(4) ;
theta1 =k(5) ;
theta2 = k(6);
alpha = k(7);
beta = k(8);
rho1 = k(9);
rho2= k(10);
rho3=k(11);
% Utilisez les données spécifiques
tdata = specific_data(:, 1);
Hdata = specific_data(:, 2);
HSdata = specific_data(:, 3);
tforward = 2009:1:2019;
[T, Y] = ode23s(@(t,y)(modelhs(t,y,k)),tforward,[ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
M = Y(:,1);
S = Y(:,2);
H1 = Y(:,3);
H2 = Y(:,4);
H1S=Y(:,5);
H2S=Y(:,6);
H=phi_H * ( H1 + c1 * H1S ).*M + rho1 * gamma*H1S + alpha* H2; % new cases from mono-HIV
HS=theta1*phi_S * ( S + c2 * H1S ).*H1 + theta2*phi_H * ( H1 + c1 * H1S ).*S+ rho2*alpha*H1S; %new case of coinfection hiv+syphilis
%H2q = Y(:,4);% assignts the y-coordinates of …
%the solution at
D=mean(Hdata).^2;
D1=mean(HSdata).^2;
A=(H – Hdata).^2;
B=(HS – HSdata).^2;
error_in_data =sum(A)./(11*D)+ sum(B)./(11*D1);
%%
endclear
close all
clc
% Données spécifiques
specific_data = [
2009 2 8;
2010 10 22;
2011 30 45;
2012 111 75;
2013 125 96;
2014 255 192;
2015 379 227;
2016 384 238
2017 360 279;
2018 399 229;
2019 235 128
];
% Utilisez les données spécifiques
tdata = specific_data(:, 1);
Hdata = specific_data(:, 2);
HSdata = specific_data(:, 3);
tforward = 2009:1:2019;
%tmeasure = [ 1:100:1001]’;
% initial values
gamma = 1.5;
phi_S = 0.0006; % transmission prob
phi_H = 0.000051; % trans proba
c1=3;
c2=1.5;
theta1 = 100; % djustment parameters for syph
theta2 = 4; %djustment parameters for hi
alpha = 0.6; % progression rate
beta = 0.2; %Complications rate
rho1 = 0.4; % adjustment parameters
rho2 = 1.5; % adjustment parameters
rho3 = 1.5; % adjustment parameters
k0 = [phi_S phi_H c1 c2 theta1 theta2 alpha beta rho1 rho2 rho3 ];
% solve equ with initial value of parameters
[t, Y] = ode23s(@(t, y)modelhs(t, y, k0), tforward, [ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
yintM = Y(:,1);
yintS = Y(:,2);
yintH1 = Y(:,3);
yintH2 = Y(:,4);
yintH1S=Y(:,5);
yintH2S=Y(:,6);
Hh=phi_H * ( yintH1 + c1 * yintH1S ).*yintM + rho1 * gamma * yintH1S + alpha* yintH2; % new cases from monoH
HShs=theta1*phi_S * ( yintS + c2 * yintH1S ).*yintH1 + theta2*phi_H * ( yintH1 + c1 * yintH1S ).*yintS+ rho2*alpha*yintH1S; %new case of co h-s
%H2q = Y(:,4);% assignts the y-coordinates of .
% Plotting specific data and solutions
% Display the results
figure(1)
%subplot(1,2,1);
plot(tdata, Hdata, ‘r*’);
hold on
plot(tdata, Hh, ‘b-‘);
xlabel(‘time in days’);
ylabel(‘Number of monhiv cases’);
axis([2009 2019 0 500]);
figure(2)
%subplot(1,2,1);
plot(tdata, HSdata, ‘r*’);
hold on
plot(tdata, HShs, ‘b-‘);
xlabel(‘time in days’);
ylabel(‘Number of Coinfection cases’);
axis([2009 2019 0 500]);
% Minimization routine using Nelder & Mead Simplex algorithm (a derivative-free method)
% Assigns the new values of parameters to k and the error to fval
% Minimization routine using Nelder & Mead Simplex algorithm (a derivative-free method)
% Assigns the new values of parameters to k and the error to fval
[k,fval] = fminsearch(@moderHS,k0)
%print final values of alpha and beta
disp(k);
%Draw the data with the final ODE
[T, Y] = ode45(@(t,y)(modelhs(t,y,k)),tforward,[ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
yintM = Y(:,1);
yintS = Y(:,2);
yintH1 = Y(:,3);
yintH2 = Y(:,4);
yintH1S=Y(:,5);
yintH2S=Y(:,6);
Hh=phi_H * ( yintH1 + c1 * yintH1S ).*yintM + rho1 * gamma * yintH1S + alpha* yintH2; % new cases from mono-HIV
HShs=theta1*phi_S * ( yintS + c2 * yintH1S ).*yintH1 + theta2*phi_H * ( yintH1 + c1 * yintH1S ).*yintS+ rho2*alpha*yintH1S; %new case of coinfection hiv+syphilis
%H2q = Y(:,4);% assignts the y-coordinates of …
residuals = (Hdata+HSdata – Hh-HShs)./2;
%subplot(1,2,2);
figure(3)
plot(tdata,Hdata,’r*’);
hold on
plot(tdata,Hh,’b-‘);
xlabel(‘Time in days’);
ylabel(‘Number of mono-HIV cases’);
axis([2009 2019 0 1000]);
legend(‘Data’, ‘Model estimation’);
figure(4)
plot(tdata,HSdata,’r*’);
hold on
plot(tdata,HShs,’b-‘);
xlabel(‘Time in days’);
ylabel(‘Number of Coinfection cases’);
axis([2009 2019 0 1000]);
legend(‘Data’, ‘Model estimation’);
function dy=modelhs(~,y,k)
delta = 0.01; % Taux de mortalité
delta_S = 0.05; % Taux de mort de Syphilis.
delta_H = 0.4;
Lambda =4.04 *100;
gamma=1.5;
phi_S =k(1);
phi_H =k(2);
c1 = k(3);
c2=k(4) ;
theta1 =k(5) ;
theta2 = k(6);
alpha = k(7);
beta = k(8);
rho1 = k(9);
rho2= k(10);
rho3=k(11);
dy = zeros(7,1);
%lambda_s=phi_S * ( y(2) + c2 * y(5))
%lambda_H= phi_H * ( y(3) + c1 * y(5) )
dy(1) = Lambda + gamma * y(2) – (phi_S * ( y(2) + c2 * y(5)) + phi_H * (y(3) + c1 * y(5)) + delta ) * y(1) ;%M
dy(2)= phi_S * ( y(2) + c2 * y(5) ) * y(1) – ( gamma + theta2 * phi_H * ( y(3) + c1 * y(5) ) + delta_S ) * y(2) ;%S
dy(3) = phi_H * ( y(3) + c1 * y(5) ) * y(1) + rho1 * gamma * y(5) – (theta1 * phi_S * ( y(2) + c2 * y(5)) + delta + delta_H + alpha) * y(3) ;%H1
dy(4) = alpha * y(3) – (beta + delta + delta_H) * y(4) ;%H2
dy(5) = theta2 * phi_H * ( y(3) + c1 * y(5) ) * y(2) + ( theta1 * phi_S * ( y(2) + c2 * y(5) ) ) * y(3) – ( rho1 * gamma + rho2 * alpha + delta_H + delta_S + delta ) * y(5) ;%H1S
dy(6)= rho2 * alpha * y(5) – ( rho3 * beta + delta_S + delta_H + delta ) * y(6) ;%H2S
dy(7)= beta * y(4) + rho3 * beta * y(6) – ( delta + delta_H ) * y(7) ;%C
end
function error_in_data = moderHS(k)
% Données spécifiques
specific_data = [
2009 2 8;
2010 10 22;
2011 30 45;
2012 111 75;
2013 125 96;
2014 255 192;
2015 379 227;
2016 384 238
2017 360 279;
2018 399 229;
2019 235 128
];
gamma = 1.5;
phi_S =k(1);
phi_H =k(2);
c1 = k(3);
c2=k(4) ;
theta1 =k(5) ;
theta2 = k(6);
alpha = k(7);
beta = k(8);
rho1 = k(9);
rho2= k(10);
rho3=k(11);
% Utilisez les données spécifiques
tdata = specific_data(:, 1);
Hdata = specific_data(:, 2);
HSdata = specific_data(:, 3);
tforward = 2009:1:2019;
[T, Y] = ode23s(@(t,y)(modelhs(t,y,k)),tforward,[ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
M = Y(:,1);
S = Y(:,2);
H1 = Y(:,3);
H2 = Y(:,4);
H1S=Y(:,5);
H2S=Y(:,6);
H=phi_H * ( H1 + c1 * H1S ).*M + rho1 * gamma*H1S + alpha* H2; % new cases from mono-HIV
HS=theta1*phi_S * ( S + c2 * H1S ).*H1 + theta2*phi_H * ( H1 + c1 * H1S ).*S+ rho2*alpha*H1S; %new case of coinfection hiv+syphilis
%H2q = Y(:,4);% assignts the y-coordinates of …
%the solution at
D=mean(Hdata).^2;
D1=mean(HSdata).^2;
A=(H – Hdata).^2;
B=(HS – HSdata).^2;
error_in_data =sum(A)./(11*D)+ sum(B)./(11*D1);
%%
end clear
close all
clc
% Données spécifiques
specific_data = [
2009 2 8;
2010 10 22;
2011 30 45;
2012 111 75;
2013 125 96;
2014 255 192;
2015 379 227;
2016 384 238
2017 360 279;
2018 399 229;
2019 235 128
];
% Utilisez les données spécifiques
tdata = specific_data(:, 1);
Hdata = specific_data(:, 2);
HSdata = specific_data(:, 3);
tforward = 2009:1:2019;
%tmeasure = [ 1:100:1001]’;
% initial values
gamma = 1.5;
phi_S = 0.0006; % transmission prob
phi_H = 0.000051; % trans proba
c1=3;
c2=1.5;
theta1 = 100; % djustment parameters for syph
theta2 = 4; %djustment parameters for hi
alpha = 0.6; % progression rate
beta = 0.2; %Complications rate
rho1 = 0.4; % adjustment parameters
rho2 = 1.5; % adjustment parameters
rho3 = 1.5; % adjustment parameters
k0 = [phi_S phi_H c1 c2 theta1 theta2 alpha beta rho1 rho2 rho3 ];
% solve equ with initial value of parameters
[t, Y] = ode23s(@(t, y)modelhs(t, y, k0), tforward, [ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
yintM = Y(:,1);
yintS = Y(:,2);
yintH1 = Y(:,3);
yintH2 = Y(:,4);
yintH1S=Y(:,5);
yintH2S=Y(:,6);
Hh=phi_H * ( yintH1 + c1 * yintH1S ).*yintM + rho1 * gamma * yintH1S + alpha* yintH2; % new cases from monoH
HShs=theta1*phi_S * ( yintS + c2 * yintH1S ).*yintH1 + theta2*phi_H * ( yintH1 + c1 * yintH1S ).*yintS+ rho2*alpha*yintH1S; %new case of co h-s
%H2q = Y(:,4);% assignts the y-coordinates of .
% Plotting specific data and solutions
% Display the results
figure(1)
%subplot(1,2,1);
plot(tdata, Hdata, ‘r*’);
hold on
plot(tdata, Hh, ‘b-‘);
xlabel(‘time in days’);
ylabel(‘Number of monhiv cases’);
axis([2009 2019 0 500]);
figure(2)
%subplot(1,2,1);
plot(tdata, HSdata, ‘r*’);
hold on
plot(tdata, HShs, ‘b-‘);
xlabel(‘time in days’);
ylabel(‘Number of Coinfection cases’);
axis([2009 2019 0 500]);
% Minimization routine using Nelder & Mead Simplex algorithm (a derivative-free method)
% Assigns the new values of parameters to k and the error to fval
% Minimization routine using Nelder & Mead Simplex algorithm (a derivative-free method)
% Assigns the new values of parameters to k and the error to fval
[k,fval] = fminsearch(@moderHS,k0)
%print final values of alpha and beta
disp(k);
%Draw the data with the final ODE
[T, Y] = ode45(@(t,y)(modelhs(t,y,k)),tforward,[ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
yintM = Y(:,1);
yintS = Y(:,2);
yintH1 = Y(:,3);
yintH2 = Y(:,4);
yintH1S=Y(:,5);
yintH2S=Y(:,6);
Hh=phi_H * ( yintH1 + c1 * yintH1S ).*yintM + rho1 * gamma * yintH1S + alpha* yintH2; % new cases from mono-HIV
HShs=theta1*phi_S * ( yintS + c2 * yintH1S ).*yintH1 + theta2*phi_H * ( yintH1 + c1 * yintH1S ).*yintS+ rho2*alpha*yintH1S; %new case of coinfection hiv+syphilis
%H2q = Y(:,4);% assignts the y-coordinates of …
residuals = (Hdata+HSdata – Hh-HShs)./2;
%subplot(1,2,2);
figure(3)
plot(tdata,Hdata,’r*’);
hold on
plot(tdata,Hh,’b-‘);
xlabel(‘Time in days’);
ylabel(‘Number of mono-HIV cases’);
axis([2009 2019 0 1000]);
legend(‘Data’, ‘Model estimation’);
figure(4)
plot(tdata,HSdata,’r*’);
hold on
plot(tdata,HShs,’b-‘);
xlabel(‘Time in days’);
ylabel(‘Number of Coinfection cases’);
axis([2009 2019 0 1000]);
legend(‘Data’, ‘Model estimation’);
function dy=modelhs(~,y,k)
delta = 0.01; % Taux de mortalité
delta_S = 0.05; % Taux de mort de Syphilis.
delta_H = 0.4;
Lambda =4.04 *100;
gamma=1.5;
phi_S =k(1);
phi_H =k(2);
c1 = k(3);
c2=k(4) ;
theta1 =k(5) ;
theta2 = k(6);
alpha = k(7);
beta = k(8);
rho1 = k(9);
rho2= k(10);
rho3=k(11);
dy = zeros(7,1);
%lambda_s=phi_S * ( y(2) + c2 * y(5))
%lambda_H= phi_H * ( y(3) + c1 * y(5) )
dy(1) = Lambda + gamma * y(2) – (phi_S * ( y(2) + c2 * y(5)) + phi_H * (y(3) + c1 * y(5)) + delta ) * y(1) ;%M
dy(2)= phi_S * ( y(2) + c2 * y(5) ) * y(1) – ( gamma + theta2 * phi_H * ( y(3) + c1 * y(5) ) + delta_S ) * y(2) ;%S
dy(3) = phi_H * ( y(3) + c1 * y(5) ) * y(1) + rho1 * gamma * y(5) – (theta1 * phi_S * ( y(2) + c2 * y(5)) + delta + delta_H + alpha) * y(3) ;%H1
dy(4) = alpha * y(3) – (beta + delta + delta_H) * y(4) ;%H2
dy(5) = theta2 * phi_H * ( y(3) + c1 * y(5) ) * y(2) + ( theta1 * phi_S * ( y(2) + c2 * y(5) ) ) * y(3) – ( rho1 * gamma + rho2 * alpha + delta_H + delta_S + delta ) * y(5) ;%H1S
dy(6)= rho2 * alpha * y(5) – ( rho3 * beta + delta_S + delta_H + delta ) * y(6) ;%H2S
dy(7)= beta * y(4) + rho3 * beta * y(6) – ( delta + delta_H ) * y(7) ;%C
end
function error_in_data = moderHS(k)
% Données spécifiques
specific_data = [
2009 2 8;
2010 10 22;
2011 30 45;
2012 111 75;
2013 125 96;
2014 255 192;
2015 379 227;
2016 384 238
2017 360 279;
2018 399 229;
2019 235 128
];
gamma = 1.5;
phi_S =k(1);
phi_H =k(2);
c1 = k(3);
c2=k(4) ;
theta1 =k(5) ;
theta2 = k(6);
alpha = k(7);
beta = k(8);
rho1 = k(9);
rho2= k(10);
rho3=k(11);
% Utilisez les données spécifiques
tdata = specific_data(:, 1);
Hdata = specific_data(:, 2);
HSdata = specific_data(:, 3);
tforward = 2009:1:2019;
[T, Y] = ode23s(@(t,y)(modelhs(t,y,k)),tforward,[ 5000.0 20.0 2.0 0.0 6.0 2.0 0.0 ]);
M = Y(:,1);
S = Y(:,2);
H1 = Y(:,3);
H2 = Y(:,4);
H1S=Y(:,5);
H2S=Y(:,6);
H=phi_H * ( H1 + c1 * H1S ).*M + rho1 * gamma*H1S + alpha* H2; % new cases from mono-HIV
HS=theta1*phi_S * ( S + c2 * H1S ).*H1 + theta2*phi_H * ( H1 + c1 * H1S ).*S+ rho2*alpha*H1S; %new case of coinfection hiv+syphilis
%H2q = Y(:,4);% assignts the y-coordinates of …
%the solution at
D=mean(Hdata).^2;
D1=mean(HSdata).^2;
A=(H – Hdata).^2;
B=(HS – HSdata).^2;
error_in_data =sum(A)./(11*D)+ sum(B)./(11*D1);
%%
end fiting, code, estimation of parameters, optimization MATLAB Answers — New Questions
Copying speed decreased by 90% out of nowhere.
Up until recently, both of my office computers have been performing well according to my needs. They were reliable machines for my tasks.
However, today, System 2 experienced a significant drop in copying speed from my internal NVMe to my external SSD. Normally, both System 1 and System 2 could copy large files at speeds exceeding 350 MB/s to the external drive. But today, System 2 was only managing to copy at a sluggish 35+ MB/s.
I vaguely remember a similar issue with System 2 in the past, where it suddenly dropped in copying speed towards the end of a file transfer. I sought explanations for that previously, but today’s situation is different. The speed started at 35+ MB/s and remained constant during a ten-minute transfer of a 17 GB file.
I investigated by disconnecting and reconnecting the external drive, changing SSD disks, and testing different USB3 ports on System 2. I also compared the performance to System 1, which maintained high copying speeds.
Despite the overall performance of System 2 being consistent with that of System 1, this sudden decrease in copying speed is perplexing. I believe I will need assistance to resolve this issue, as both PCs exhibit fast Wi-Fi and internal disk-to-disk speeds for these files, indicating a potential problem with the USB3 ports on System 2.
What are your thoughts on this situation?
Up until recently, both of my office computers have been performing well according to my needs. They were reliable machines for my tasks. However, today, System 2 experienced a significant drop in copying speed from my internal NVMe to my external SSD. Normally, both System 1 and System 2 could copy large files at speeds exceeding 350 MB/s to the external drive. But today, System 2 was only managing to copy at a sluggish 35+ MB/s. I vaguely remember a similar issue with System 2 in the past, where it suddenly dropped in copying speed towards the end of a file transfer. I sought explanations for that previously, but today’s situation is different. The speed started at 35+ MB/s and remained constant during a ten-minute transfer of a 17 GB file. I investigated by disconnecting and reconnecting the external drive, changing SSD disks, and testing different USB3 ports on System 2. I also compared the performance to System 1, which maintained high copying speeds. Despite the overall performance of System 2 being consistent with that of System 1, this sudden decrease in copying speed is perplexing. I believe I will need assistance to resolve this issue, as both PCs exhibit fast Wi-Fi and internal disk-to-disk speeds for these files, indicating a potential problem with the USB3 ports on System 2. What are your thoughts on this situation? Read More
Falling Behind After Switching Tabs!
After switching from a game to another window, I often experience significant lag when returning to the game. This issue results in stuttering and delays when moving the mouse to navigate the game view. The only solution I have found so far is to restart the game. The problem persists even when the screen content is static, such as when navigating menus with the mouse pointer. This drop in frames per second has been ongoing for over a year. I’m seeking advice on how to address this issue. See the attached images illustrating the smooth performance versus the lag after tabbing out and back in.
After switching from a game to another window, I often experience significant lag when returning to the game. This issue results in stuttering and delays when moving the mouse to navigate the game view. The only solution I have found so far is to restart the game. The problem persists even when the screen content is static, such as when navigating menus with the mouse pointer. This drop in frames per second has been ongoing for over a year. I’m seeking advice on how to address this issue. See the attached images illustrating the smooth performance versus the lag after tabbing out and back in. Read More
How to Permanently Stop NWuApiHost.exe and Event Viewer Warnings
I need a solution to prevent the ongoing warnings from appearing in the images without enabling or resuming ‘Windows Update’. These warnings are consuming significant disk space. The system showing these warnings will always be offline and ‘Windows Update’ will be paused during any temporary internet connection. One of the images displays a CLSID pointing to wuapihost.exe. How can I achieve this goal?
I need a solution to prevent the ongoing warnings from appearing in the images without enabling or resuming ‘Windows Update’. These warnings are consuming significant disk space. The system showing these warnings will always be offline and ‘Windows Update’ will be paused during any temporary internet connection. One of the images displays a CLSID pointing to wuapihost.exe. How can I achieve this goal? Read More
Frozen
I’ve been experiencing frequent system freezes, causing me to reboot. I suspect that Hardware Accelerated GPU Scheduling may be the culprit. Recently, I encountered three freezes within a mere 30-minute span while playing Fallout 76, a game where I’ve never experienced any issues until the past few weeks.
Upon disabling Hardware Accelerated GPU Scheduling, I played Fallout 76 for 2 hours without encountering a single freeze. I’ve conducted various checks, such as testing the RAM, but the issue persists. Any suggestions on what might be causing this and how to address it?
I’ve been experiencing frequent system freezes, causing me to reboot. I suspect that Hardware Accelerated GPU Scheduling may be the culprit. Recently, I encountered three freezes within a mere 30-minute span while playing Fallout 76, a game where I’ve never experienced any issues until the past few weeks. Upon disabling Hardware Accelerated GPU Scheduling, I played Fallout 76 for 2 hours without encountering a single freeze. I’ve conducted various checks, such as testing the RAM, but the issue persists. Any suggestions on what might be causing this and how to address it? Read More
Displayed Duplicate Entries in File Explorer
Hello! I’ve encountered a strange issue in File Explorer where there are duplicate entries pointing to my OneDrive folder. I’m puzzled as to how this occurred and I’m hesitant to delete one entry as I’m unsure of the implications, especially regarding the safety of my OneDrive folder. If anyone could provide guidance on how to remove one entry while preserving the integrity of the OneDrive folder, I’d greatly appreciate it. I’ve included a screen capture displaying the duplicate entries on the left side of the screen. Thank you for your assistance! – BEH
Hello! I’ve encountered a strange issue in File Explorer where there are duplicate entries pointing to my OneDrive folder. I’m puzzled as to how this occurred and I’m hesitant to delete one entry as I’m unsure of the implications, especially regarding the safety of my OneDrive folder. If anyone could provide guidance on how to remove one entry while preserving the integrity of the OneDrive folder, I’d greatly appreciate it. I’ve included a screen capture displaying the duplicate entries on the left side of the screen. Thank you for your assistance! – BEH Read More
I’m using VIT transformer in my code. How to convert the output of 1D layer of VIT into 2D with format SSCB?
I used the following code from Matlab answer to solve the errorrs that shown in the attached figure.
(Samuel Somuyiwa on 24 Jul 2023)
% Get Vision Transformer model
net = visionTransformer;
% Create dummy input
input = dlarray(rand(384,384,3),’SSCB’);
% Obtain output embedding from last layerNormalizationLayer
out = forward(net, input, Outputs=’encoder_norm’);
% Reshape output patch embedding
out = reshapePatchEmbedding(out);
function out = reshapePatchEmbedding(in)
% Remove output embedding corresponding to class token from input
out = in(2:end,:,:);
% Reshape resulting embedding to input format
WH = sqrt(size(out, 1));
C = size(out, 2);
out = reshape(out, WH, WH, C, []); % Shape is W x H x C x N
out = permute(out, [2, 1, 3, 4]); % Shape is H x W x C x N
% Convert to formatted dlarray
out = dlarray(out, ‘SSCB’);
endI used the following code from Matlab answer to solve the errorrs that shown in the attached figure.
(Samuel Somuyiwa on 24 Jul 2023)
% Get Vision Transformer model
net = visionTransformer;
% Create dummy input
input = dlarray(rand(384,384,3),’SSCB’);
% Obtain output embedding from last layerNormalizationLayer
out = forward(net, input, Outputs=’encoder_norm’);
% Reshape output patch embedding
out = reshapePatchEmbedding(out);
function out = reshapePatchEmbedding(in)
% Remove output embedding corresponding to class token from input
out = in(2:end,:,:);
% Reshape resulting embedding to input format
WH = sqrt(size(out, 1));
C = size(out, 2);
out = reshape(out, WH, WH, C, []); % Shape is W x H x C x N
out = permute(out, [2, 1, 3, 4]); % Shape is H x W x C x N
% Convert to formatted dlarray
out = dlarray(out, ‘SSCB’);
end I used the following code from Matlab answer to solve the errorrs that shown in the attached figure.
(Samuel Somuyiwa on 24 Jul 2023)
% Get Vision Transformer model
net = visionTransformer;
% Create dummy input
input = dlarray(rand(384,384,3),’SSCB’);
% Obtain output embedding from last layerNormalizationLayer
out = forward(net, input, Outputs=’encoder_norm’);
% Reshape output patch embedding
out = reshapePatchEmbedding(out);
function out = reshapePatchEmbedding(in)
% Remove output embedding corresponding to class token from input
out = in(2:end,:,:);
% Reshape resulting embedding to input format
WH = sqrt(size(out, 1));
C = size(out, 2);
out = reshape(out, WH, WH, C, []); % Shape is W x H x C x N
out = permute(out, [2, 1, 3, 4]); % Shape is H x W x C x N
% Convert to formatted dlarray
out = dlarray(out, ‘SSCB’);
end deep learning MATLAB Answers — New Questions
I want to use the multicore function of Simulink to accelarate my simulation. Having errors when profiling. It can not find the header file?
This the error shown in matlab command windows. I don’t konw how to solve this!
cpp: e:multicoretestnewmaintest grt rtwrt main.c:22 Could not find include file <processthreadsapi.h>
Error rt main.c: 287 operands of= have illegal types ‘pointer to void’ and ‘int’
Error rt main.c: 360 operands of= have illegal types ‘pointer to void’ and ‘int’
2 errors, 1 warning
The line 287 and Line 360 of rt_main.c is
orTimer = CreateWaitableTimer((NULL), false, (NULL));This the error shown in matlab command windows. I don’t konw how to solve this!
cpp: e:multicoretestnewmaintest grt rtwrt main.c:22 Could not find include file <processthreadsapi.h>
Error rt main.c: 287 operands of= have illegal types ‘pointer to void’ and ‘int’
Error rt main.c: 360 operands of= have illegal types ‘pointer to void’ and ‘int’
2 errors, 1 warning
The line 287 and Line 360 of rt_main.c is
orTimer = CreateWaitableTimer((NULL), false, (NULL)); This the error shown in matlab command windows. I don’t konw how to solve this!
cpp: e:multicoretestnewmaintest grt rtwrt main.c:22 Could not find include file <processthreadsapi.h>
Error rt main.c: 287 operands of= have illegal types ‘pointer to void’ and ‘int’
Error rt main.c: 360 operands of= have illegal types ‘pointer to void’ and ‘int’
2 errors, 1 warning
The line 287 and Line 360 of rt_main.c is
orTimer = CreateWaitableTimer((NULL), false, (NULL)); multicore, concurrent execution MATLAB Answers — New Questions
plotting multiple boxplots in the same figure window
I have 10 vectors of temperature data, all different lengths, that I want to make boxplots of and plot them all in the same figure window. How do I do this?I have 10 vectors of temperature data, all different lengths, that I want to make boxplots of and plot them all in the same figure window. How do I do this? I have 10 vectors of temperature data, all different lengths, that I want to make boxplots of and plot them all in the same figure window. How do I do this? boxplots, multiple vectors MATLAB Answers — New Questions
جـلب الـحبيب < الهفوف☎️ 54029097.9 : 966 +| نمبر شيــخ روحــاني سـعودي KSA
جـلب الـحبيب < الهفوف:telephone: 54029097.9 : 966 +| نمبر شيــخ روحــاني سـعودي KSA
الشيخ الروحاني فلاح عبد العزيز، فك السحر ، رد المطلقة ، جلب الحبيب، خواتم روحانية، عرق السواحل، فرج الضبعة، تزويج البائر، تسهيل الزواج ، علاج العقم، تفريق وطلاق ، طاعة عمياء، عقد لسان الظالم ، جلب الحبيب السعودية ، جلب الحبيب قطر ، جلب الحبيب الكويت ، جلب الحبيب الإمارات ، سحر سفلي ، سحر علوي ،جلب البنت للبنت ، جلب الشاب للشاب ، شيخ روحاني، شيخة، روحانية، ساحر، مشعوذ، سحر أسود، سحر تفريق، سحر علوي ، جلب الحبيب البحرين، جلب الحبيب عُمان
جـلب الـحبيب < الهفوف:telephone: 54029097.9 : 966 +| نمبر شيــخ روحــاني سـعودي KSAالشيخ الروحاني فلاح عبد العزيز، فك السحر ، رد المطلقة ، جلب الحبيب، خواتم روحانية، عرق السواحل، فرج الضبعة، تزويج البائر، تسهيل الزواج ، علاج العقم، تفريق وطلاق ، طاعة عمياء، عقد لسان الظالم ، جلب الحبيب السعودية ، جلب الحبيب قطر ، جلب الحبيب الكويت ، جلب الحبيب الإمارات ، سحر سفلي ، سحر علوي ،جلب البنت للبنت ، جلب الشاب للشاب ، شيخ روحاني، شيخة، روحانية، ساحر، مشعوذ، سحر أسود، سحر تفريق، سحر علوي ، جلب الحبيب البحرين، جلب الحبيب عُمان Read More
Site Move Tool – Bing Webmaster Tools – link does not work
Hi,
I am trying to move my site to a new domain on Bing Webmaster Tools.
The following article from Bing (https://blogs.bing.com/webmaster/december-2020/Website-Migration-with-Bing), suggest that I need to use The Site Move tool, and provides the following url: https://www.bing.com/webmaster/help/how-to-use-the-site-move-tool-bb8f5112
However, this URL is broken. Where can I find the Move Tool?
Thank you.
Hi, I am trying to move my site to a new domain on Bing Webmaster Tools. The following article from Bing (https://blogs.bing.com/webmaster/december-2020/Website-Migration-with-Bing), suggest that I need to use The Site Move tool, and provides the following url: https://www.bing.com/webmaster/help/how-to-use-the-site-move-tool-bb8f5112 However, this URL is broken. Where can I find the Move Tool?Thank you. Read More
جـلب الـحبيب < مكة☎️ 33859487 :973 +| مـعالج و شيــخ روحـــاني بحريني السعودية KSA
جـلب الـحبيب < مكة:telephone: 33859487 :973 +| مـعالج و شيــخ روحـــاني بحريني السعودية KSA
جـلب الـحبيب < مكة:telephone: 33859487 :973 +| مـعالج و شيــخ روحـــاني بحريني السعودية KSA Read More
عمل جلب الحبيـب☎️ ٠٠٩٧٣٣٤٣٢٤٩٣٥ الـكـويـت _ الـسعـوديـة
عمل جلب الحبيـب:telephone: ٠٠٩٧٣٣٤٣٢٤٩٣٥ الـكـويـت _ الـسعـوديـة
عمل جلب الحبيـب:telephone: ٠٠٩٧٣٣٤٣٢٤٩٣٥ الـكـويـت _ الـسعـوديـة Read More
maximum clique problem solve
Maximum Clique
People in the social network are identified by unique IDs, consecutive integers from 1 to N. Who follows who is captured in a cell array called sn: the ii th element of sn is a vector that contains a list of IDs the person with ID ii follows. You may assume that these lists are ordered in ascending order by ID. Note that the follows relationship is not necessarily symmetrical: if person A follows person B, person B may or may not follow person A. :
function clique = max_clique(graph, clique)
if nargin < 2
clique = [];
end
max_clq = clique;
if isempty(clique)
for ii= 1:length(graph)
clq = max_clique(graph,ii);
if length(clq) > length(max_clq)
max_clq = clq;
end
end
else
for node=1:length(graph)
if isempty(find(node==clique))
if check_clique(clique,node,graph)
clq = max_clique(graph, [clique node]);
if length(clq) > length(max_clq)
max_clique == clq
end
end
end
end
end
clique = max_clq;
end
function ok = check_clique(clq,node,graph)
ok = false;
for ii=1:length(clq)
if isempty(find(clq(ii) == graph{node})) || isempty (find(node == graph{clq(ii)}))
return;
end
end
ok = true;
end
Unfortunately, it is too slow and the grader will time out. Your task is to modify the code to speed it up. Remember, the question to ask: am I doing any unncessary work? Call the modified function max_clique. (Hint: when we try to expand the current clique, do we really need to consider all the nodes?)
Please solve this problem with entire new code that is fast.Maximum Clique
People in the social network are identified by unique IDs, consecutive integers from 1 to N. Who follows who is captured in a cell array called sn: the ii th element of sn is a vector that contains a list of IDs the person with ID ii follows. You may assume that these lists are ordered in ascending order by ID. Note that the follows relationship is not necessarily symmetrical: if person A follows person B, person B may or may not follow person A. :
function clique = max_clique(graph, clique)
if nargin < 2
clique = [];
end
max_clq = clique;
if isempty(clique)
for ii= 1:length(graph)
clq = max_clique(graph,ii);
if length(clq) > length(max_clq)
max_clq = clq;
end
end
else
for node=1:length(graph)
if isempty(find(node==clique))
if check_clique(clique,node,graph)
clq = max_clique(graph, [clique node]);
if length(clq) > length(max_clq)
max_clique == clq
end
end
end
end
end
clique = max_clq;
end
function ok = check_clique(clq,node,graph)
ok = false;
for ii=1:length(clq)
if isempty(find(clq(ii) == graph{node})) || isempty (find(node == graph{clq(ii)}))
return;
end
end
ok = true;
end
Unfortunately, it is too slow and the grader will time out. Your task is to modify the code to speed it up. Remember, the question to ask: am I doing any unncessary work? Call the modified function max_clique. (Hint: when we try to expand the current clique, do we really need to consider all the nodes?)
Please solve this problem with entire new code that is fast. Maximum Clique
People in the social network are identified by unique IDs, consecutive integers from 1 to N. Who follows who is captured in a cell array called sn: the ii th element of sn is a vector that contains a list of IDs the person with ID ii follows. You may assume that these lists are ordered in ascending order by ID. Note that the follows relationship is not necessarily symmetrical: if person A follows person B, person B may or may not follow person A. :
function clique = max_clique(graph, clique)
if nargin < 2
clique = [];
end
max_clq = clique;
if isempty(clique)
for ii= 1:length(graph)
clq = max_clique(graph,ii);
if length(clq) > length(max_clq)
max_clq = clq;
end
end
else
for node=1:length(graph)
if isempty(find(node==clique))
if check_clique(clique,node,graph)
clq = max_clique(graph, [clique node]);
if length(clq) > length(max_clq)
max_clique == clq
end
end
end
end
end
clique = max_clq;
end
function ok = check_clique(clq,node,graph)
ok = false;
for ii=1:length(clq)
if isempty(find(clq(ii) == graph{node})) || isempty (find(node == graph{clq(ii)}))
return;
end
end
ok = true;
end
Unfortunately, it is too slow and the grader will time out. Your task is to modify the code to speed it up. Remember, the question to ask: am I doing any unncessary work? Call the modified function max_clique. (Hint: when we try to expand the current clique, do we really need to consider all the nodes?)
Please solve this problem with entire new code that is fast. maximum_clique MATLAB Answers — New Questions
Profiling of inefficient recursive Fibonacci series function
I am asked to profile an intentionally inefficient code. Following code will overtime with a huge input:
function f = fibo(n)
if n <= 2
f = 1;
else
f = fibo(n-2) + fibo(n-1);
end
end
I used a persistente variable, to create an array that reflects the recursion calls:
function [f, trace]=fibo_trace(n,v)%with persistent variable ‘trc’
persistent trc;
if isempty(trc)
trc=v;
end
if n<=2
trc=[trc n];
f=1;
else
trc=[trc n];
f=fibo_trace(n-2)+fibo_trace(n-1);
end
trace=trc;
end
That works flawlessly when I run the function with followin code:
[f trace] = fibo_trace(6,[])
And this is what the code returns:
f = 8
trace = 6 4 2 3 1 2 5 3 1 2 4 2 3 1 2,
which is OK, since the trace vector shows how inefficient the original code is. Now my problem is, it is an assigment for a MOOC platform and the solution with the persistent variable won’t work because the the automated grader will run the function a number of times with random inputs and it will not clear the function. Without the persistent variable I must split the recursive calls in two code lines and I am struggling now to compute the nth fibonacci number:
Can anyone give a clue? The creation of the array works but I honestly don’t know how to deal with the two recursive call lines to compute the fibonacci.I am asked to profile an intentionally inefficient code. Following code will overtime with a huge input:
function f = fibo(n)
if n <= 2
f = 1;
else
f = fibo(n-2) + fibo(n-1);
end
end
I used a persistente variable, to create an array that reflects the recursion calls:
function [f, trace]=fibo_trace(n,v)%with persistent variable ‘trc’
persistent trc;
if isempty(trc)
trc=v;
end
if n<=2
trc=[trc n];
f=1;
else
trc=[trc n];
f=fibo_trace(n-2)+fibo_trace(n-1);
end
trace=trc;
end
That works flawlessly when I run the function with followin code:
[f trace] = fibo_trace(6,[])
And this is what the code returns:
f = 8
trace = 6 4 2 3 1 2 5 3 1 2 4 2 3 1 2,
which is OK, since the trace vector shows how inefficient the original code is. Now my problem is, it is an assigment for a MOOC platform and the solution with the persistent variable won’t work because the the automated grader will run the function a number of times with random inputs and it will not clear the function. Without the persistent variable I must split the recursive calls in two code lines and I am struggling now to compute the nth fibonacci number:
Can anyone give a clue? The creation of the array works but I honestly don’t know how to deal with the two recursive call lines to compute the fibonacci. I am asked to profile an intentionally inefficient code. Following code will overtime with a huge input:
function f = fibo(n)
if n <= 2
f = 1;
else
f = fibo(n-2) + fibo(n-1);
end
end
I used a persistente variable, to create an array that reflects the recursion calls:
function [f, trace]=fibo_trace(n,v)%with persistent variable ‘trc’
persistent trc;
if isempty(trc)
trc=v;
end
if n<=2
trc=[trc n];
f=1;
else
trc=[trc n];
f=fibo_trace(n-2)+fibo_trace(n-1);
end
trace=trc;
end
That works flawlessly when I run the function with followin code:
[f trace] = fibo_trace(6,[])
And this is what the code returns:
f = 8
trace = 6 4 2 3 1 2 5 3 1 2 4 2 3 1 2,
which is OK, since the trace vector shows how inefficient the original code is. Now my problem is, it is an assigment for a MOOC platform and the solution with the persistent variable won’t work because the the automated grader will run the function a number of times with random inputs and it will not clear the function. Without the persistent variable I must split the recursive calls in two code lines and I am struggling now to compute the nth fibonacci number:
Can anyone give a clue? The creation of the array works but I honestly don’t know how to deal with the two recursive call lines to compute the fibonacci. fibonacci, recursion, homework MATLAB Answers — New Questions