Category: News
Controlling Notifications in project for the web plans
i am trying to control the notifications sent to the project team on the plan level in project for the web but i don’t find any option to edit the notifications in the plan settings view as attached. 
So what should i do?
i am trying to control the notifications sent to the project team on the plan level in project for the web but i don’t find any option to edit the notifications in the plan settings view as attached.  So what should i do? Read More
Maybe a mistake in the documentation of function ”robgain”
Please refer to this documentation: robgain
as well as this system:
In the example "Robust Performance of Closed-Loop System", it says that "Create a model of the controller, and build the closed-loop sensitivity function, S. The sensitivity measures the closed-loop response at the plant output to a disturbance at the plant input."
The corresponding codes are:
k = ureal(‘k’,10,’Percent’,40);
delta = ultidyn(‘delta’,[1 1]);
G = tf(18,[1 1.8 k]) * (1 + 0.5*delta);
C = pid(2.3,3,0.38,0.001);
S = feedback(1,G*C);
tf(S)
However, when I refer to the documentation of feedback, it seems that the code feedback(1,G*C) actually refers to the closed-loop response at the plant input, instead of that at the plant output. I use the function connect to prove this:
G.InputName = ‘e2’;
G.OutputName = ‘y’;
C.InputName = ‘e1’;
C.OutputName = ‘u’;
S1 = sumblk("e1 = r – y");
S2 = sumblk("e2 = u + d");
inputs = {‘d’};
outputs = {‘e2’};
S = connect(G,C,S1,S2,inputs,outputs);
tf(S)
The preceding two results are the same, which prove my assumption.
To measure the closed-loop response at the plant output to a disturbance at the plant input, the codes should be:
S = feedback(G,C);
tf(S)
or in the "connect" version
G.InputName = ‘e2’;
G.OutputName = ‘y’;
C.InputName = ‘e1’;
C.OutputName = ‘u’;
S1 = sumblk("e1 = r – y");
S2 = sumblk("e2 = u + d");
inputs = {‘d’};
outputs = {‘y’};
S = connect(G,C,S1,S2,inputs,outputs);
tf(S)
Please check other documentatins which also use this sensitivity function.
Best regards.Please refer to this documentation: robgain
as well as this system:
In the example "Robust Performance of Closed-Loop System", it says that "Create a model of the controller, and build the closed-loop sensitivity function, S. The sensitivity measures the closed-loop response at the plant output to a disturbance at the plant input."
The corresponding codes are:
k = ureal(‘k’,10,’Percent’,40);
delta = ultidyn(‘delta’,[1 1]);
G = tf(18,[1 1.8 k]) * (1 + 0.5*delta);
C = pid(2.3,3,0.38,0.001);
S = feedback(1,G*C);
tf(S)
However, when I refer to the documentation of feedback, it seems that the code feedback(1,G*C) actually refers to the closed-loop response at the plant input, instead of that at the plant output. I use the function connect to prove this:
G.InputName = ‘e2’;
G.OutputName = ‘y’;
C.InputName = ‘e1’;
C.OutputName = ‘u’;
S1 = sumblk("e1 = r – y");
S2 = sumblk("e2 = u + d");
inputs = {‘d’};
outputs = {‘e2’};
S = connect(G,C,S1,S2,inputs,outputs);
tf(S)
The preceding two results are the same, which prove my assumption.
To measure the closed-loop response at the plant output to a disturbance at the plant input, the codes should be:
S = feedback(G,C);
tf(S)
or in the "connect" version
G.InputName = ‘e2’;
G.OutputName = ‘y’;
C.InputName = ‘e1’;
C.OutputName = ‘u’;
S1 = sumblk("e1 = r – y");
S2 = sumblk("e2 = u + d");
inputs = {‘d’};
outputs = {‘y’};
S = connect(G,C,S1,S2,inputs,outputs);
tf(S)
Please check other documentatins which also use this sensitivity function.
Best regards. Please refer to this documentation: robgain
as well as this system:
In the example "Robust Performance of Closed-Loop System", it says that "Create a model of the controller, and build the closed-loop sensitivity function, S. The sensitivity measures the closed-loop response at the plant output to a disturbance at the plant input."
The corresponding codes are:
k = ureal(‘k’,10,’Percent’,40);
delta = ultidyn(‘delta’,[1 1]);
G = tf(18,[1 1.8 k]) * (1 + 0.5*delta);
C = pid(2.3,3,0.38,0.001);
S = feedback(1,G*C);
tf(S)
However, when I refer to the documentation of feedback, it seems that the code feedback(1,G*C) actually refers to the closed-loop response at the plant input, instead of that at the plant output. I use the function connect to prove this:
G.InputName = ‘e2’;
G.OutputName = ‘y’;
C.InputName = ‘e1’;
C.OutputName = ‘u’;
S1 = sumblk("e1 = r – y");
S2 = sumblk("e2 = u + d");
inputs = {‘d’};
outputs = {‘e2’};
S = connect(G,C,S1,S2,inputs,outputs);
tf(S)
The preceding two results are the same, which prove my assumption.
To measure the closed-loop response at the plant output to a disturbance at the plant input, the codes should be:
S = feedback(G,C);
tf(S)
or in the "connect" version
G.InputName = ‘e2’;
G.OutputName = ‘y’;
C.InputName = ‘e1’;
C.OutputName = ‘u’;
S1 = sumblk("e1 = r – y");
S2 = sumblk("e2 = u + d");
inputs = {‘d’};
outputs = {‘y’};
S = connect(G,C,S1,S2,inputs,outputs);
tf(S)
Please check other documentatins which also use this sensitivity function.
Best regards. robust control toolbox, control, help, robgain MATLAB Answers — New Questions
creating a function to solve non linear equations using simple iteration method
Create a Matlab function named (solveIteration) for solving a non-linear equation using
(Simple iteration method) and takes the following inputs: g: function, x0 initial guess TolX as
Termination tolerance on the function value, a positive scalar (when to stop iteration) and
Maxiter as the max number of iterations if reached means the function has no solution
The function returns the following outputs : x as a root(s) of the equation ,error as error
message if the equation has no solutions
Function seems like below one:
function [x,error] = solveIteration(g,x0,TolX,MaxIter)
…
any hints ??Create a Matlab function named (solveIteration) for solving a non-linear equation using
(Simple iteration method) and takes the following inputs: g: function, x0 initial guess TolX as
Termination tolerance on the function value, a positive scalar (when to stop iteration) and
Maxiter as the max number of iterations if reached means the function has no solution
The function returns the following outputs : x as a root(s) of the equation ,error as error
message if the equation has no solutions
Function seems like below one:
function [x,error] = solveIteration(g,x0,TolX,MaxIter)
…
any hints ?? Create a Matlab function named (solveIteration) for solving a non-linear equation using
(Simple iteration method) and takes the following inputs: g: function, x0 initial guess TolX as
Termination tolerance on the function value, a positive scalar (when to stop iteration) and
Maxiter as the max number of iterations if reached means the function has no solution
The function returns the following outputs : x as a root(s) of the equation ,error as error
message if the equation has no solutions
Function seems like below one:
function [x,error] = solveIteration(g,x0,TolX,MaxIter)
…
any hints ?? numeric equation solving MATLAB Answers — New Questions
Boxplot for both x and y axis with different box widths.
How can we make a boxplot like the one below for both x and y data (the box widths of each group that are x-data related are different). I tried boxplot(X,Y, group) but it did not work.How can we make a boxplot like the one below for both x and y data (the box widths of each group that are x-data related are different). I tried boxplot(X,Y, group) but it did not work. How can we make a boxplot like the one below for both x and y data (the box widths of each group that are x-data related are different). I tried boxplot(X,Y, group) but it did not work. boxplot, different box width MATLAB Answers — New Questions
In R2024a, when searching for components using Chinese after double clicking on the Simulink interface, it will get stuck
This issue is causing me a lot of trouble when using Simulink, and I hope it can be resolved. There is no such issue in 2020b, and there is no such issue when searching in English in 2024a.This issue is causing me a lot of trouble when using Simulink, and I hope it can be resolved. There is no such issue in 2020b, and there is no such issue when searching in English in 2024a. This issue is causing me a lot of trouble when using Simulink, and I hope it can be resolved. There is no such issue in 2020b, and there is no such issue when searching in English in 2024a. r2024a, simulink, search MATLAB Answers — New Questions
Speeding up matrix expotentials by using GPU
Hey all:
I am trying to accelerate the speed of calculation of high dimisional matrix expotential by using GPU, but I find that the speed of calculating them on CPU is faster than GPU, and I can’t find where the problem is. The code is:
dev = gpuDevice();
CPU_time = 0;
GPU_time = 0;
for i = 1:10
CPU_matrix = rand(4096, 4096);
GPU_matrix = gpuArray(complex(CPU_matrix));
tic;
Exp_CPU = expm(-1i * CPU_matrix);
CPU_time = CPU_time + toc;
tic;
Exp_GPU = expm(-1i * GPU_matrix);
GPU_time = GPU_time + toc;
end
disp("CPU time:" + string(CPU_time));
disp("GPU time:" + string(GPU_time));
I tested this code using my computer, and its CPU configuration is: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz, RAM 16 GB. Its GPU configuration is: NVIDIA GeForce GTX 1650. The final result is:
CPU time:452.1338
GPU time:915.5892
Why the speed of GPU is slower than CPU?
ThanksHey all:
I am trying to accelerate the speed of calculation of high dimisional matrix expotential by using GPU, but I find that the speed of calculating them on CPU is faster than GPU, and I can’t find where the problem is. The code is:
dev = gpuDevice();
CPU_time = 0;
GPU_time = 0;
for i = 1:10
CPU_matrix = rand(4096, 4096);
GPU_matrix = gpuArray(complex(CPU_matrix));
tic;
Exp_CPU = expm(-1i * CPU_matrix);
CPU_time = CPU_time + toc;
tic;
Exp_GPU = expm(-1i * GPU_matrix);
GPU_time = GPU_time + toc;
end
disp("CPU time:" + string(CPU_time));
disp("GPU time:" + string(GPU_time));
I tested this code using my computer, and its CPU configuration is: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz, RAM 16 GB. Its GPU configuration is: NVIDIA GeForce GTX 1650. The final result is:
CPU time:452.1338
GPU time:915.5892
Why the speed of GPU is slower than CPU?
Thanks Hey all:
I am trying to accelerate the speed of calculation of high dimisional matrix expotential by using GPU, but I find that the speed of calculating them on CPU is faster than GPU, and I can’t find where the problem is. The code is:
dev = gpuDevice();
CPU_time = 0;
GPU_time = 0;
for i = 1:10
CPU_matrix = rand(4096, 4096);
GPU_matrix = gpuArray(complex(CPU_matrix));
tic;
Exp_CPU = expm(-1i * CPU_matrix);
CPU_time = CPU_time + toc;
tic;
Exp_GPU = expm(-1i * GPU_matrix);
GPU_time = GPU_time + toc;
end
disp("CPU time:" + string(CPU_time));
disp("GPU time:" + string(GPU_time));
I tested this code using my computer, and its CPU configuration is: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz, RAM 16 GB. Its GPU configuration is: NVIDIA GeForce GTX 1650. The final result is:
CPU time:452.1338
GPU time:915.5892
Why the speed of GPU is slower than CPU?
Thanks gpu, matrix, matlab, time, expotential MATLAB Answers — New Questions
weird word double crash
Hi, I try to open older docx files and word (office 365) shows the file for two seconds, then shuts down and reloads. Sometimes it does this even twice. Safe mode does not make any difference.
I have zotero installed as the only extension and virus protection is up to date. Anyone any idea what could be going on?
Hi, I try to open older docx files and word (office 365) shows the file for two seconds, then shuts down and reloads. Sometimes it does this even twice. Safe mode does not make any difference. I have zotero installed as the only extension and virus protection is up to date. Anyone any idea what could be going on? Read More
need help in setting up record site in Sharepoint
Hi All,
My client has setup a record site in sharepoint. I need help in setting up and configuring all the rules. Could someone please help me with this. I am new to this.
Hi All, My client has setup a record site in sharepoint. I need help in setting up and configuring all the rules. Could someone please help me with this. I am new to this. Read More
General Purpose to Business Critical Azure SQL database upgrade
Recently, we faced a requirement to upgrade large number of Azure SQL databases from general-purpose to business-critical.
As you’re aware, this scaling-up operation can be executed via PowerShell, CLI, or the Azure portal and follow the guidance mentioned here – Failover groups overview & best practices – Azure SQL Managed Instance | Microsoft Learn
Given the need to perform this task across a large number of databases, individually running commands for each server is not practical. Hence, I have created a PowerShell script to facilitate such extensive migrations.
Important consideration:
# This script performs an upgrade of Azure SQL databases to a specified SKU.
# The script also handles geo-replicated databases by upgrading the secondary first, then the primary, and finally any other databases without replication links.
# The script logs the progress and outcome of each database upgrade to the console and a log file.
# Disclaimer: This script is provided as-is, without any warranty or support. Use it at your own risk.
# Before running this script, make sure to test it in a non-production environment and review the impact of the upgrade on your databases and applications.
# The script may take a long time to complete, depending on the number and size of the databases to be upgraded.
# The script may incur additional charges for the upgraded databases, depending on the target SKU and the duration of the upgrade process.
# The script requires the Az PowerShell module and the appropriate permissions to access and modify the Azure SQL databases.
<#
.Description
# This is an upgrade script for upgrading AzureSQL Databases to the desired SKU.
# The script covers various scenarios and performs the following tasks:
# Scenarios being tested:
# 1) Jobs will be executed in parallel.
# 2) The script will upgrade secondary databases first, then the primary.
# 3) Upgrade the database based on the primary listed in the database info list.
# 4) Script will perform the check prior to the migration in case of the role has changed from primary to secondary of the database mentioned in the database info list.
# 5) Upgrade individual databases in case of no primary/secondary found for a given database.
# 6) Upgrade the database if secondary is upgraded but primary has not been upgraded. Running the script again will skip the secondary and upgrade the primary database.
# In other words, SLO mismatch will be handled based on the SKU defined in the database info list.
# 7) Track the database progress and display the progress in the console.
##Database info list is required in order to perform an upgrade:
DatabaseName: Name of the database to be upgraded.
PartnerResourceGroupName: Name of the resource group where the secondary database is located.
ServerName: Name of the server where the primary database is located.
ResourceGroupName : Name of the resource group where the primary database is located
RequestedServiceObjectiveName: Desired SKU to be upgraded to.
#>
# Define the list of database information
$DatabaseInfoList = @(
#@{ DatabaseName = ‘{DatabaseName}’; PartnerResourceGroupName = ‘{PartnerResourcegroupName}’; ServerName = ‘{ServerName}’ ; ResourceGroupName = ‘{ResourceGroupName}’; RequestedServiceObjectiveName = ‘{SLODetails}’; subscriptionID = ‘{SubscriptionID}’ }
)
# Define the script block that performs the update
$ScriptBlock = {
param (
$DatabaseInfo
)
Set-AzContext -subscriptionId $DatabaseInfo.subscriptionID
###store output in txt file
$OutputFilePath = “C:temp$($DatabaseInfo.DatabaseName)_$($env:USERNAME)_$($Job.Id)_Output.txt”
$OutputCapture = @()
$OutputCapture += “Database: $($DatabaseInfo.DatabaseName)”
$ReplicationLink = Get-AzSqlDatabaseReplicationLink -DatabaseName $DatabaseInfo.DatabaseName -PartnerResourceGroupName $DatabaseInfo.PartnerResourceGroupName -ServerName $DatabaseInfo.ServerName -ResourceGroupName $DatabaseInfo.ResourceGroupName
$PrimaryServerRole = $ReplicationLink.Role
$PrimaryResourceGroupName = $ReplicationLink.ResourceGroupName
$PrimaryServerName = $ReplicationLink.ServerName
$PrimaryDatabaseName = $ReplicationLink.DatabaseName
$PartnerRole = $ReplicationLink.PartnerRole
$PartnerServerName = $ReplicationLink.PartnerServerName
$PartnerDatabaseName = $ReplicationLink.PartnerDatabaseName
$PartnerResourceGroupName = $ReplicationLink.PartnerResourceGroupName
$UpdateSecondary = $false
$UpdatePrimary = $false
if ($PartnerRole -eq “Secondary” -and $PrimaryServerRole -eq “Primary”) {
$UpdateSecondary = $true
$UpdatePrimary = $true
}
#For Failover Scenarios only
elseif ($PartnerRole -eq “Primary” -and $PrimaryServerRole -eq “Secondary”) {
$UpdateSecondary = $true
$UpdatePrimary = $true
$PartnerRole = $ReplicationLink.Role
$PartnerServerName = $ReplicationLink.ServerName
$PartnerDatabaseName = $ReplicationLink.DatabaseName
$PartnerResourceGroupName = $ReplicationLink.ResourceGroupName
$PrimaryServerRole = $ReplicationLink.PartnerRole
$PrimaryResourceGroupName = $ReplicationLink.PartnerResourceGroupName
$PrimaryServerName = $ReplicationLink.PartnerServerName
$PrimaryDatabaseName = $ReplicationLink.PartnerDatabaseName
}
Try
{
if ($UpdateSecondary) {
$DatabaseProperties = Get-AzSqlDatabase -ResourceGroupName $PartnerResourceGroupName -ServerName $PartnerServerName -DatabaseName $PartnerDatabaseName
#$DatabaseEdition = $DatabaseProperties.Edition
$DatabaseSKU = $DatabaseProperties.RequestedServiceObjectiveName
if ($DatabaseSKU -ne $DatabaseInfo.RequestedServiceObjectiveName) {
Write-host “Secondary started at $(Get-Date) of DB $UpdateSecondary”
$OutputCapture += “Secondary started at $(Get-Date) of DB $UpdateSecondary”
Set-AzSqlDatabase -ResourceGroupName $PartnerResourceGroupName -DatabaseName $PartnerDatabaseName -ServerName $PartnerServerName -Edition “BusinessCritical” -RequestedServiceObjectiveName $DatabaseInfo.RequestedServiceObjectiveName
Write-host “Secondary end at $(Get-Date)”
$OutputCapture += “Secondary end at $(Get-Date)”
# Start Track Progress
$activities = Get-AzSqlDatabaseActivity -ResourceGroupName $PartnerResourceGroupName -ServerName $PartnerServerName -DatabaseName $PartnerDatabaseName |
Where-Object {$_.State -eq “InProgress” -or $_.State -eq “Succeeded” -or $_.State -eq “Failed”} | Sort-Object -Property StartTime -Descending | Select-Object -First 1
if ($activities.Count -gt 0) {
Write-Host “Operations in progress or completed for $($PartnerDatabaseName):”
$OutputCapture += “Operations in progress or completed for $($PartnerDatabaseName):”
foreach ($activity in $activities) {
Write-Host “Activity Start Time: $($activity.StartTime) , Activity Estimated Completed Time: $($activity.EstimatedCompletionTime) , Activity ID: $($activity.OperationId), Server Name: $($activity.ServerName), Database Name: $($activity.DatabaseName), Status: $($activity.State), Percent Complete: $($activity.PercentComplete)%, Description: $($activity.Description)”
$OutputCapture += “Activity Start Time: $($activity.StartTime) , Activity Estimated Completed Time: $($activity.EstimatedCompletionTime) , Activity ID: $($activity.OperationId), Server Name: $($activity.ServerName), Database Name: $($activity.DatabaseName), Status: $($activity.State), Percent Complete: $($activity.PercentComplete)%, Description: $($activity.Description)”
}
Write-Host “$PartnerDatabaseName Upgrade Successfully Completed!”
$OutputCapture += “$PartnerDatabaseName Upgrade Successfully Completed!”
} else {
Write-Host “No operations in progress or completed for $($PartnerDatabaseName)”
$OutputCapture += “No operations in progress or completed for $($PartnerDatabaseName)”
}
# End Track Progress
#
}
else {
Write-host “Database $PartnerDatabaseName is already upgraded.”
$OutputCapture += “Database $PartnerDatabaseName is already upgraded.”
}
}
if ($UpdatePrimary) {
$DatabaseProperties = Get-AzSqlDatabase -ResourceGroupName $PrimaryResourceGroupName -ServerName $PrimaryServerName -DatabaseName $PrimaryDatabaseName
# $DatabaseEdition = $DatabaseProperties.Edition
$DatabaseSKU = $DatabaseProperties.RequestedServiceObjectiveName
if ($DatabaseSKU -ne $DatabaseInfo.RequestedServiceObjectiveName){
Write-host “Primary started at $(Get-Date) of DB $UpdatePrimary”
$OutputCapture += “Primary started at $(Get-Date) of DB $UpdatePrimary”
Set-AzSqlDatabase -ResourceGroupName $PrimaryResourceGroupName -DatabaseName $PrimaryDatabaseName -ServerName $PrimaryServerName -Edition “BusinessCritical” -RequestedServiceObjectiveName $DatabaseInfo.RequestedServiceObjectiveName
Write-host “Primary end at $(Get-Date)”
$OutputCapture += “Primary end at $(Get-Date)”
# Start Track Progress
$activities = Get-AzSqlDatabaseActivity -ResourceGroupName $PrimaryResourceGroupName -ServerName $PrimaryServerName -DatabaseName $PrimaryDatabaseName |
Where-Object {$_.State -eq “InProgress” -or $_.State -eq “Succeeded” -or $_.State -eq “Failed”} | Sort-Object -Property StartTime -Descending | Select-Object -First 1
if ($activities.Count -gt 0) {
Write-Host “Operations in progress or completed for $($PrimaryDatabaseName):”
$OutputCapture += “Operations in progress or completed for $($PrimaryDatabaseName):”
foreach ($activity in $activities) {
Write-Host “Activity Start Time: $($activity.StartTime) , Activity Estimated Completed Time: $($activity.EstimatedCompletionTime) , Activity ID: $($activity.OperationId), Server Name: $($activity.ServerName), Database Name: $($activity.DatabaseName), Status: $($activity.State), Percent Complete: $($activity.PercentComplete)%, Description: $($activity.Description)”
$OutputCapture += “Activity Start Time: $($activity.StartTime) , Activity Estimated Completed Time: $($activity.EstimatedCompletionTime) , Activity ID: $($activity.OperationId), Server Name: $($activity.ServerName), Database Name: $($activity.DatabaseName), Status: $($activity.State), Percent Complete: $($activity.PercentComplete)%, Description: $($activity.Description)”
}
Write-Host “$PrimaryDatabaseName Upgrade Successfully Completed!”
$OutputCapture += “$PrimaryDatabaseName Upgrade Successfully Completed!”
} else {
Write-Host “No operations in progress or completed for $($PrimaryDatabaseName)”
$OutputCapture += “No operations in progress or completed for $($PrimaryDatabaseName)”
}
# End Track Progress
#
}
else {
Write-host “Database $PrimaryDatabaseName is already upgraded.”
$OutputCapture += “Database $PrimaryDatabaseName is already upgraded.”
}
}
if (!$UpdateSecondary -and !$UpdatePrimary) {
$DatabaseProperties = Get-AzSqlDatabase -ResourceGroupName $DatabaseInfo.ResourceGroupName -ServerName $DatabaseInfo.ServerName -DatabaseName $DatabaseInfo.DatabaseName
# $DatabaseEdition = $DatabaseProperties.Edition
$DatabaseSKU = $DatabaseProperties.RequestedServiceObjectiveName
If ($DatabaseSKU -ne $DatabaseInfo.RequestedServiceObjectiveName) {
Write-Host “No Replica Found.”
$OutputCapture += “No Replica Found.”
Write-host “Upgrade started at $(Get-Date)”
$OutputCapture += “Upgrade started at $(Get-Date)”
Set-AzSqlDatabase -ResourceGroupName $DatabaseInfo.ResourceGroupName -DatabaseName $DatabaseInfo.DatabaseName -ServerName $DatabaseInfo.ServerName -Edition “BusinessCritical” -RequestedServiceObjectiveName $DatabaseInfo.RequestedServiceObjectiveName
Write-host “Upgrade completed at $(Get-Date)”
$OutputCapture += “Upgrade completed at $(Get-Date)”
# Start Track Progress
$activities = Get-AzSqlDatabaseActivity -ResourceGroupName $DatabaseInfo.ResourceGroupName -ServerName $DatabaseInfo.ServerName -DatabaseName $DatabaseInfo.DatabaseName |
Where-Object {$_.State -eq “InProgress” -or $_.State -eq “Succeeded” -or $_.State -eq “Failed”} | Sort-Object -Property StartTime -Descending | Select-Object -First 1
if ($activities.Count -gt 0) {
Write-Host “Operations in progress or completed for $($DatabaseInfo.DatabaseName):”
$OutputCapture += “Operations in progress or completed for $($DatabaseInfo.DatabaseName):”
foreach ($activity in $activities) {
Write-Host “Activity Start Time: $($activity.StartTime) , Activity Estimated Completed Time: $($activity.EstimatedCompletionTime) , Activity ID: $($activity.OperationId), Server Name: $($activity.ServerName), Database Name: $($activity.DatabaseName), Status: $($activity.State), Percent Complete: $($activity.PercentComplete)%, Description: $($activity.Description)”
$OutputCapture += “Activity Start Time: $($activity.StartTime) , Activity Estimated Completed Time: $($activity.EstimatedCompletionTime) , Activity ID: $($activity.OperationId), Server Name: $($activity.ServerName), Database Name: $($activity.DatabaseName), Status: $($activity.State), Percent Complete: $($activity.PercentComplete)%, Description: $($activity.Description)”
}
Write-Host ” “$DatabaseInfo.DatabaseName” Upgrade Successfully Completed!”
$OutputCapture += “$($DatabaseInfo.DatabaseName) Upgrade Successfully Completed!”
} else {
Write-Host “No operations in progress or completed for $($DatabaseInfo.DatabaseName)”
$OutputCapture += “No operations in progress or completed for $($DatabaseInfo.DatabaseName)”
}
# End Track Progress
# Write-Host ” “$DatabaseInfo.DatabaseName” Upgrade Successfully Completed!”
}
else {
Write-host “Database “$DatabaseInfo.DatabaseName” is already upgraded.”
$OutputCapture += “Database $($DatabaseInfo.DatabaseName) is already upgraded.”
}
$OutputCapture += “Secondary started at $(Get-Date) of DB $UpdateSecondary”
}
}
Catch
{
# Catch any error
Write-Output “Error occurred: $_”
$OutputCapture += “Error occurred: $_”
}
Finally
{
Write-Host “Upgrade Successfully Completed!”
$OutputCapture += “Upgrade Successfully Completed!”
# Output the captured messages to the file
$OutputCapture | Out-File -FilePath $OutputFilePath
}
}
# Loop through each database and start a background job
foreach ($DatabaseInfo in $DatabaseInfoList) {
Start-Job -ScriptBlock $ScriptBlock -ArgumentList $DatabaseInfo
}
# Wait for all background jobs to complete
Get-Job | Wait-Job
# Retrieve and display job results
#Get-Job | Receive-Job
Get-Job | ForEach-Object {
$Job = $_
$OutputFilePath = “C:temp$($Job.Id)_Output.txt”
Receive-Job -Job $Job | Out-File -FilePath $OutputFilePath # Append job output to the text file
}
# Clean up background jobs
Get-Job | Remove-Job -Force
write-host “Execution Completed successfully.”
$OutputCapture += “Execution Completed successfully.”
Microsoft Tech Community – Latest Blogs –Read More
How to calculate HF/LF from ECG data
Hi, I am university student and doing reseach regarding relaxation methods by deep breathing.
So, I’d like to know HF/LF from subject’s ECG data. However I can’t come up with MATLAB code to calculate it.
if you have any idea, please help me.
file type is ‘.txt’ (attached file)Hi, I am university student and doing reseach regarding relaxation methods by deep breathing.
So, I’d like to know HF/LF from subject’s ECG data. However I can’t come up with MATLAB code to calculate it.
if you have any idea, please help me.
file type is ‘.txt’ (attached file) Hi, I am university student and doing reseach regarding relaxation methods by deep breathing.
So, I’d like to know HF/LF from subject’s ECG data. However I can’t come up with MATLAB code to calculate it.
if you have any idea, please help me.
file type is ‘.txt’ (attached file) #hf/lf, #hrv, frequency analysis MATLAB Answers — New Questions
How to use stacked bar charts to draw multiple confidence intervals
How to use stacked bar charts to draw multiple confidence intervals as follows
My sample data is as follows: the point estimated coefficient is
coef = [-0.0186
0.0057
-0.0067
-0.0007
0
-0.0295
-0.0517
-0.0651
-0.0689
-0.0862
-0.0866
];
The lower bounds for the point estimated coefficient at 1%, 5%, 10%, 15% and 20% levels are
Lower_Bound = [
-0.061944 -0.051528 -0.04632 -0.042792 -0.040104
-0.04203 -0.03056 -0.024825 -0.02094 -0.01798
-0.05314 -0.04198 -0.0364 -0.03262 -0.02974
-0.044302 -0.033824 -0.028585 -0.025036 -0.022332
0 0 0 0 0
-0.07723 -0.06576 -0.060025 -0.05614 -0.05318
-0.103042 -0.090704 -0.084535 -0.080356 -0.077172
-0.121602 -0.108024 -0.101235 -0.096636 -0.093132
-0.132368 -0.117116 -0.10949 -0.104324 -0.100388
-0.152506 -0.136572 -0.128605 -0.123208 -0.119096
-0.183092 -0.159904 -0.14831 -0.140456 -0.134472
];
The upper bounds for the point estimated coefficient at 1%, 5%, 10%, 15% and 20% levels are
Upper_Bound = [0.024744 0.014328 0.00912 0.005592 0.002904
0.05343 0.04196 0.036225 0.03234 0.02938
0.03974 0.02858 0.023 0.01922 0.01634
0.042902 0.032424 0.027185 0.023636 0.020932
0 0 0 0 0
0.01823 0.00676 0.001025 -0.00286 -0.00582
-0.000358 -0.012696 -0.018865 -0.023044 -0.026228
-0.008598 -0.022176 -0.028965 -0.033564 -0.037068
-0.005432 -0.020684 -0.02831 -0.033476 -0.037412
-0.019894 -0.035828 -0.043795 -0.049192 -0.053304
0.009892 -0.013296 -0.02489 -0.032744 -0.038728
];How to use stacked bar charts to draw multiple confidence intervals as follows
My sample data is as follows: the point estimated coefficient is
coef = [-0.0186
0.0057
-0.0067
-0.0007
0
-0.0295
-0.0517
-0.0651
-0.0689
-0.0862
-0.0866
];
The lower bounds for the point estimated coefficient at 1%, 5%, 10%, 15% and 20% levels are
Lower_Bound = [
-0.061944 -0.051528 -0.04632 -0.042792 -0.040104
-0.04203 -0.03056 -0.024825 -0.02094 -0.01798
-0.05314 -0.04198 -0.0364 -0.03262 -0.02974
-0.044302 -0.033824 -0.028585 -0.025036 -0.022332
0 0 0 0 0
-0.07723 -0.06576 -0.060025 -0.05614 -0.05318
-0.103042 -0.090704 -0.084535 -0.080356 -0.077172
-0.121602 -0.108024 -0.101235 -0.096636 -0.093132
-0.132368 -0.117116 -0.10949 -0.104324 -0.100388
-0.152506 -0.136572 -0.128605 -0.123208 -0.119096
-0.183092 -0.159904 -0.14831 -0.140456 -0.134472
];
The upper bounds for the point estimated coefficient at 1%, 5%, 10%, 15% and 20% levels are
Upper_Bound = [0.024744 0.014328 0.00912 0.005592 0.002904
0.05343 0.04196 0.036225 0.03234 0.02938
0.03974 0.02858 0.023 0.01922 0.01634
0.042902 0.032424 0.027185 0.023636 0.020932
0 0 0 0 0
0.01823 0.00676 0.001025 -0.00286 -0.00582
-0.000358 -0.012696 -0.018865 -0.023044 -0.026228
-0.008598 -0.022176 -0.028965 -0.033564 -0.037068
-0.005432 -0.020684 -0.02831 -0.033476 -0.037412
-0.019894 -0.035828 -0.043795 -0.049192 -0.053304
0.009892 -0.013296 -0.02489 -0.032744 -0.038728
]; How to use stacked bar charts to draw multiple confidence intervals as follows
My sample data is as follows: the point estimated coefficient is
coef = [-0.0186
0.0057
-0.0067
-0.0007
0
-0.0295
-0.0517
-0.0651
-0.0689
-0.0862
-0.0866
];
The lower bounds for the point estimated coefficient at 1%, 5%, 10%, 15% and 20% levels are
Lower_Bound = [
-0.061944 -0.051528 -0.04632 -0.042792 -0.040104
-0.04203 -0.03056 -0.024825 -0.02094 -0.01798
-0.05314 -0.04198 -0.0364 -0.03262 -0.02974
-0.044302 -0.033824 -0.028585 -0.025036 -0.022332
0 0 0 0 0
-0.07723 -0.06576 -0.060025 -0.05614 -0.05318
-0.103042 -0.090704 -0.084535 -0.080356 -0.077172
-0.121602 -0.108024 -0.101235 -0.096636 -0.093132
-0.132368 -0.117116 -0.10949 -0.104324 -0.100388
-0.152506 -0.136572 -0.128605 -0.123208 -0.119096
-0.183092 -0.159904 -0.14831 -0.140456 -0.134472
];
The upper bounds for the point estimated coefficient at 1%, 5%, 10%, 15% and 20% levels are
Upper_Bound = [0.024744 0.014328 0.00912 0.005592 0.002904
0.05343 0.04196 0.036225 0.03234 0.02938
0.03974 0.02858 0.023 0.01922 0.01634
0.042902 0.032424 0.027185 0.023636 0.020932
0 0 0 0 0
0.01823 0.00676 0.001025 -0.00286 -0.00582
-0.000358 -0.012696 -0.018865 -0.023044 -0.026228
-0.008598 -0.022176 -0.028965 -0.033564 -0.037068
-0.005432 -0.020684 -0.02831 -0.033476 -0.037412
-0.019894 -0.035828 -0.043795 -0.049192 -0.053304
0.009892 -0.013296 -0.02489 -0.032744 -0.038728
]; stack, bar, baseline MATLAB Answers — New Questions
How to connect ESP8266 modeule to app designer via serial communication and wifi
I want to connect the ESP8266 wifi node mcu module to the application i designed in app designer via serial communication and also by wifi.I want to connect the ESP8266 wifi node mcu module to the application i designed in app designer via serial communication and also by wifi. I want to connect the ESP8266 wifi node mcu module to the application i designed in app designer via serial communication and also by wifi. esp8266 module, matlab, app MATLAB Answers — New Questions
Masking Subsystems Task 5 in Simulink Fundamentals course
Hello,
I did what the task asked. The result of it is same as the answer. I cannot move on the new task since the question says you cannot meet the requirements although I did. Could you help me please?Hello,
I did what the task asked. The result of it is same as the answer. I cannot move on the new task since the question says you cannot meet the requirements although I did. Could you help me please? Hello,
I did what the task asked. The result of it is same as the answer. I cannot move on the new task since the question says you cannot meet the requirements although I did. Could you help me please? simulink fundamentals, online course, self-paced, masking subsystems, disp() MATLAB Answers — New Questions
How to change the colorbar max and min number and correspond a certain color to the colormap ticks
My data’s max and min are 0.09 and 0. I want to
set the colorbar max and min value to 1 and -1 and
have green and red corresponds to the max and min values.
The colorbar ticks can be an interpolation from green to red with black at the middle.
Clim does not work because the green color corresponds to the data’s maximum instead of the colorbar limit’s maximum.
Please help…My data’s max and min are 0.09 and 0. I want to
set the colorbar max and min value to 1 and -1 and
have green and red corresponds to the max and min values.
The colorbar ticks can be an interpolation from green to red with black at the middle.
Clim does not work because the green color corresponds to the data’s maximum instead of the colorbar limit’s maximum.
Please help… My data’s max and min are 0.09 and 0. I want to
set the colorbar max and min value to 1 and -1 and
have green and red corresponds to the max and min values.
The colorbar ticks can be an interpolation from green to red with black at the middle.
Clim does not work because the green color corresponds to the data’s maximum instead of the colorbar limit’s maximum.
Please help… colorbar, color MATLAB Answers — New Questions
Extending dynamic disk
Hi,
I have windows server 2012 R2. I have one drive with 2 folders, one of the folders is shared.
When I extend the drive space (current: 280GB), it gets increased and disk management shows 632 GB, but the file explorer and shares in server manager still shows 280 GB.
I am attaching the screenshots.
I have tried below to resolve the issue but in vain:
1. rescan disks
2. restarting the server
3. stop share and then increase the size
4. checked events but nothing found
5. checked diskpart, everything is normal there
Hi, I have windows server 2012 R2. I have one drive with 2 folders, one of the folders is shared. When I extend the drive space (current: 280GB), it gets increased and disk management shows 632 GB, but the file explorer and shares in server manager still shows 280 GB.I am attaching the screenshots.I have tried below to resolve the issue but in vain:1. rescan disks2. restarting the server3. stop share and then increase the size4. checked events but nothing found5. checked diskpart, everything is normal there Read More
Error installing Server Core FOD on WS 2025 Server Core preview
On a VM that has internet connectivity I tried the following command:
Add-WindowsCapability -Online -Name ServerCore.AppCompatibility~~~~0.0.1.0
I got the following result across two different VMs. Has anyone else seen this behavior?
On a VM that has internet connectivity I tried the following command: Add-WindowsCapability -Online -Name ServerCore.AppCompatibility~~~~0.0.1.0 I got the following result across two different VMs. Has anyone else seen this behavior? Read More
Error converting from Simulink.SimulationInput to double
%% Speed Array
Speed = zeros(1,5001);
len = numel(Speed);
q=0;
for s = 1:len
Speed(1,s) = q;
q = q + (1/(len-1));
end
Trq_inst = zeros(1,401);
len_trq = numel(Trq_inst);
Trq_ref =1;
for t = 1:(len_trq)
% simIn = zeros(1,401);
% simOutputs = zeros(1,401);
Trq_inst(1,t)= Trq_ref;
for i = 1:len
simIn(i) = Simulink.SimulationInput(‘fl_name’);
simIn(i) = setBlockParameter(simIn(i),’fl_name/Speed_sweep’,’Spd’,Speed(i));
end
simOutputs = sim(simIn);
for i = 1: len
Res1 = simOutputs(1,i).sldemo_absbrake_output{1}.Values.Res1.Data;
Res2= simOutputs(1,i).sldemo_absbrake_output{1}.Values.Res2.Data;
Struc = struct("Res1",Res1,"Res2",Res2);
fname = sprintf(‘Trq%d_Spd%d.mat’, Trq_ins(1,t)*400,5000*Speed(1,i));
save(fname,"Struc")
%save("trq_400.mat","Struc")
end
I am getting an error for the Simulink.SimulationInput converting to double.%% Speed Array
Speed = zeros(1,5001);
len = numel(Speed);
q=0;
for s = 1:len
Speed(1,s) = q;
q = q + (1/(len-1));
end
Trq_inst = zeros(1,401);
len_trq = numel(Trq_inst);
Trq_ref =1;
for t = 1:(len_trq)
% simIn = zeros(1,401);
% simOutputs = zeros(1,401);
Trq_inst(1,t)= Trq_ref;
for i = 1:len
simIn(i) = Simulink.SimulationInput(‘fl_name’);
simIn(i) = setBlockParameter(simIn(i),’fl_name/Speed_sweep’,’Spd’,Speed(i));
end
simOutputs = sim(simIn);
for i = 1: len
Res1 = simOutputs(1,i).sldemo_absbrake_output{1}.Values.Res1.Data;
Res2= simOutputs(1,i).sldemo_absbrake_output{1}.Values.Res2.Data;
Struc = struct("Res1",Res1,"Res2",Res2);
fname = sprintf(‘Trq%d_Spd%d.mat’, Trq_ins(1,t)*400,5000*Speed(1,i));
save(fname,"Struc")
%save("trq_400.mat","Struc")
end
I am getting an error for the Simulink.SimulationInput converting to double. %% Speed Array
Speed = zeros(1,5001);
len = numel(Speed);
q=0;
for s = 1:len
Speed(1,s) = q;
q = q + (1/(len-1));
end
Trq_inst = zeros(1,401);
len_trq = numel(Trq_inst);
Trq_ref =1;
for t = 1:(len_trq)
% simIn = zeros(1,401);
% simOutputs = zeros(1,401);
Trq_inst(1,t)= Trq_ref;
for i = 1:len
simIn(i) = Simulink.SimulationInput(‘fl_name’);
simIn(i) = setBlockParameter(simIn(i),’fl_name/Speed_sweep’,’Spd’,Speed(i));
end
simOutputs = sim(simIn);
for i = 1: len
Res1 = simOutputs(1,i).sldemo_absbrake_output{1}.Values.Res1.Data;
Res2= simOutputs(1,i).sldemo_absbrake_output{1}.Values.Res2.Data;
Struc = struct("Res1",Res1,"Res2",Res2);
fname = sprintf(‘Trq%d_Spd%d.mat’, Trq_ins(1,t)*400,5000*Speed(1,i));
save(fname,"Struc")
%save("trq_400.mat","Struc")
end
I am getting an error for the Simulink.SimulationInput converting to double. simulink.simulationinput, double MATLAB Answers — New Questions
SQL Server
Jorge Andre Aguirre Rojo
SQL Server destaca por su capacidad para manejar grandes volúmenes de datos, su robustez y su escalabilidad. Entre sus principales características se encuentran la seguridad avanzada, la capacidad de realizar transacciones de manera eficiente y su integración con otros productos de Microsoft, como Azure y Power BI.
SQL Server se distribuye en varias versiones y ediciones, cada una diseñada para diferentes necesidades, desde pequeñas aplicaciones hasta grandes corporaciones.
SQL Express, una edición gratuita y limitada, es ideal para aprender y desarrollar aplicaciones pequeñas, por lo cual se instalará.
SQL Server Management Studio (SSMS) es una herramienta integral que facilita la administración, configuración y monitoreo de instancias de SQL Server, proporcionando una interfaz gráfica que simplifica el manejo de bases de datos, consultas y otros elementos del servidor.
Jorge Andre Aguirre RojoSQL Server destaca por su capacidad para manejar grandes volúmenes de datos, su robustez y su escalabilidad. Entre sus principales características se encuentran la seguridad avanzada, la capacidad de realizar transacciones de manera eficiente y su integración con otros productos de Microsoft, como Azure y Power BI. SQL Server se distribuye en varias versiones y ediciones, cada una diseñada para diferentes necesidades, desde pequeñas aplicaciones hasta grandes corporaciones. SQL Express, una edición gratuita y limitada, es ideal para aprender y desarrollar aplicaciones pequeñas, por lo cual se instalará. SQL Server Management Studio (SSMS) es una herramienta integral que facilita la administración, configuración y monitoreo de instancias de SQL Server, proporcionando una interfaz gráfica que simplifica el manejo de bases de datos, consultas y otros elementos del servidor. Read More
How does Copilot identify relationshipsforeign keys across relational data?
I’m creating a connector with a custom API Graph. As the API Graph only supports a flat structure of data, how does Copilot identify relationshipsforeign keys across relational data? For example, how do I expose customer details with associated addresses. This is a one-to-many relationship. I assume I would need a Customer ConnectorAPI and a customerAddresses ConnectorAPI. Would copilot automatically work out the relational data by seeing the customerId in the customer address record?
I’m creating a connector with a custom API Graph. As the API Graph only supports a flat structure of data, how does Copilot identify relationshipsforeign keys across relational data? For example, how do I expose customer details with associated addresses. This is a one-to-many relationship. I assume I would need a Customer ConnectorAPI and a customerAddresses ConnectorAPI. Would copilot automatically work out the relational data by seeing the customerId in the customer address record? Read More
sequence and countA
I would like to know why the sequence formula is not found in the insert function.. I tried using =sequence(countA(_:_)) but this appears instead #NAME? What do I do?
I would like to know why the sequence formula is not found in the insert function.. I tried using =sequence(countA(_:_)) but this appears instead #NAME? What do I do? Read More