Month: June 2024
Managing Local Administrators on endoints using Intune
Hello, I need to frequently add and remove users from Administrators group on specific computers.
I’m creating a policy (under Account Protection) which adds users to this group and I’m assigning this policy to computers using a group which contains this computer.
For some reason it doesn’t work constantly, sometimes it adds the users to the group and sometimes nothing happens.
Any ideas? Thanks!
Hello, I need to frequently add and remove users from Administrators group on specific computers.I’m creating a policy (under Account Protection) which adds users to this group and I’m assigning this policy to computers using a group which contains this computer. For some reason it doesn’t work constantly, sometimes it adds the users to the group and sometimes nothing happens.Any ideas? Thanks! Read More
Lesson Learned #501: Exporting Multiple Databases Simultaneously with SqlPackage
This week, I’ve been working on a service request case where we need to export multiple databases using SqlPackage. Following, I would like to share my lesson learned to export simultaneous several databases, saving the export files to the F:sql folder and the logs of the operations to the F:sqllog folder.
Few recommendations when performing these exports:
Enable Accelerated Networking: This enhances data transfer performance.
Virtual Machine:
Be in the same region of the server.
The virtual machine needs to have enough space in the %temp% folder for the temporary files generated during the process. Lesson Learned #21: There is not enough space on the disk exporting BacPac using SSMS – Microsoft Community Hub
The machine should have sufficient CPU capacity, ideally between 4 to 8 CPUs, depending on the volume of operations.
Use SSD or Premium storage for better performance.
# Define the path to the SqlPackage.exe file
$SqlPackagePath = “C:Program FilesMicrosoft SQL ServerXXXDACbinSqlPackage.exe”
# Define the server, user, and password
$serverName = “servername.database.windows.net”
$username = “username”
$password = “password”
$outputFolder = “f:sql”
$logFolder = “f:sqllogs”
$databaseList = @(“db1”, “db2”)
# Create the logs folder if it does not exist
if (-Not (Test-Path -Path $logFolder)) {
New-Item -ItemType Directory -Path $logFolder
}
foreach ($database in $databaseList) {
$outputFile = Join-Path -Path $outputFolder -ChildPath “$database.bacpac”
$logFile = Join-Path -Path $logFolder -ChildPath “$database.log”
$errorLogFile = Join-Path -Path $logFolder -ChildPath “$database-error.log”
$args = @(
“/Action:Export”,
“/ssn:$serverName”,
“/sdn:$database”,
“/su:$username”,
“/sp:$password”,
“/tf:$outputFile”
)
# Start the background job with log redirection
Write-Host “Starting export of database $database to $outputFile in background”
Start-Job -ScriptBlock {
param($exePath, $arguments, $log, $errorLog)
& $exePath @arguments *>$log 2>$errorLog
} -ArgumentList $SqlPackagePath, $args, $logFile, $errorLogFile
}
Write-Host “Background export jobs started for all databases.”
# Wait for all background jobs to complete
$jobs = Get-Job
foreach ($job in $jobs) {
Wait-Job -Job $job
$jobDetails = Receive-Job -Job $job
Write-Host “Job ID $($job.Id) completed with state: $($job.State)”
Remove-Job -Job $job
}
Write-Host “Export completed for all databases. Logs are located in the $logFolder folder.”
Disclaimer
The script provided above is intended for illustrative purposes only. Before using it in a production environment, thoroughly review and test the script to ensure it meets your needs and adheres to your organization’s security and operational policies. Always safeguard sensitive information such as credentials and server details.
Also, remember that sqlpackage exports the data but does not guarantee transactional consistency. You will find more details about here: Using data-tier applications (BACPAC) to migrate a database from Managed Instance to SQL Server – Microsoft Community Hub
Microsoft Tech Community – Latest Blogs –Read More
I need to find the index of a 2d matrix within a 3rd array which has the lowest number of NaN values.
I have a 3D array of dimensions 942x523x365 with numerical and NaN values. I would like to find the 2D slice along the 3rd Dimension with the lowest number of NaN values.I have a 3D array of dimensions 942x523x365 with numerical and NaN values. I would like to find the 2D slice along the 3rd Dimension with the lowest number of NaN values. I have a 3D array of dimensions 942x523x365 with numerical and NaN values. I would like to find the 2D slice along the 3rd Dimension with the lowest number of NaN values. find nans, 3d array, indexing MATLAB Answers — New Questions
Sync PST Files to Outlook
Hello
Please i need your help on this issue.
I would like to sync this PST file to outlook
I would like to know how to sync PST file to outlook
Hello Please i need your help on this issue. I would like to sync this PST file to outlook I would like to know how to sync PST file to outlook Read More
How to publish Java programs written in the app store
I have written a Java program with over 700 lines of code, which has been packaged as a running Jar program. After double clicking and running, I can read the “boxs.txt” file created in partition D, and read the data to generate a box of arbitrary size and position. I can set the stroke and fill color, set transparency, rotate the box, and arrange the front and back of each box according to the ID string. I want to publish it to the application store, but I don’t know how to operate it. I hope you can guide me,show two screenshot, run the program to read the data and string of the text file, and generate a table. you can also generate simpler houses and more complex buildings.
I have written a Java program with over 700 lines of code, which has been packaged as a running Jar program. After double clicking and running, I can read the “boxs.txt” file created in partition D, and read the data to generate a box of arbitrary size and position. I can set the stroke and fill color, set transparency, rotate the box, and arrange the front and back of each box according to the ID string. I want to publish it to the application store, but I don’t know how to operate it. I hope you can guide me,show two screenshot, run the program to read the data and string of the text file, and generate a table. you can also generate simpler houses and more complex buildings. Read More
The logical index at position 1 contains a true value outside the array boundary (Error tsVAR/estimate (line 826))
The logical index at position 1 contains a true value outside the array boundary
位置 1 处的逻辑索引包含一个在数组边界之外的 true 值。
Error tsVAR/estimate (line 826)
出错 tsVAR/estimate (第 826 行)
Ei = E(s == iii,:);
出错 TVAR_v1 (第 92 行)
EstMdl = estimate(tMdl,tt,Ye(:,1:6), Y0 = Y00(:,1:6),…
p = 4;
%%
% 加载数据
data = readtable(file_var);
year_quarter = data{:,1};
% 分解为年份和季度部分
year = floor(year_quarter);
quarter = round((year_quarter – year) * 4 + 1);
% 将季度转换为对应的月份
month = (quarter – 1) * 3 + 1;
% 创建一个 datetime 对象
dt = datetime(year, month, 1);
data{:,’time’} = dt;
data = table2timetable(data);
Y = data(:, vars);
%%
% 滤波用于判断经济周期
% one-sided HP filter
raw_data = Y; % 需滤波数据
lambda = 1600;
[Yt,Yc] = hpfilter(raw_data,lambda,FilterType="one-sided");
% 差分方法 去除趋势
Yd = diff(Y);
% 添加状态
Yd{:,"state"} = [NaN; Yc{1:end-1,"lrgdp"}];
%%
% 划分预样本和估计样本
maxp = 4;
T = height(Yd);
eT = T – maxp;
idxpre = 1:maxp;
idxest = (maxp+1):T;
Y0 = Yd(idxpre,:);
Ye = Yd(idxest,:);
%% 绘图与检验
pic = Yd(:,1:6);
tiledlayout(2,3)
for j = 1:width(pic)
nexttile
plot(pic.time,pic{:,j})
title(pic.Properties.VariableNames(j))
end
% ADF检验
% True 则可以拒绝原假设
[h, pValue] = adftest(Ye);
%% 构建模型
% 基础VAR构建
numseries = numel(vars);
Mdls = varm(Constant=NaN(numseries,1),Lags=[1 2 3 4], …
SeriesNames=vars);
% threhold
tt = threshold(0,Type = "discrete");
tt.StateNames = ["Recession" "Expansion"];
% 构建tsVAR
Mdls2 = [Mdls Mdls];
tMdl = tsVAR(tt,Mdls2);
% 转换数据类型
Y00 = table2array(Y0);
Ye = table2array(Ye);
%%
EstMdl = estimate(tMdl,tt,Ye(:,1:6), Y0 = Y00(:,1:6),…
Z=Ye(:,1),Type="exogenous",IterationPlot=false);The logical index at position 1 contains a true value outside the array boundary
位置 1 处的逻辑索引包含一个在数组边界之外的 true 值。
Error tsVAR/estimate (line 826)
出错 tsVAR/estimate (第 826 行)
Ei = E(s == iii,:);
出错 TVAR_v1 (第 92 行)
EstMdl = estimate(tMdl,tt,Ye(:,1:6), Y0 = Y00(:,1:6),…
p = 4;
%%
% 加载数据
data = readtable(file_var);
year_quarter = data{:,1};
% 分解为年份和季度部分
year = floor(year_quarter);
quarter = round((year_quarter – year) * 4 + 1);
% 将季度转换为对应的月份
month = (quarter – 1) * 3 + 1;
% 创建一个 datetime 对象
dt = datetime(year, month, 1);
data{:,’time’} = dt;
data = table2timetable(data);
Y = data(:, vars);
%%
% 滤波用于判断经济周期
% one-sided HP filter
raw_data = Y; % 需滤波数据
lambda = 1600;
[Yt,Yc] = hpfilter(raw_data,lambda,FilterType="one-sided");
% 差分方法 去除趋势
Yd = diff(Y);
% 添加状态
Yd{:,"state"} = [NaN; Yc{1:end-1,"lrgdp"}];
%%
% 划分预样本和估计样本
maxp = 4;
T = height(Yd);
eT = T – maxp;
idxpre = 1:maxp;
idxest = (maxp+1):T;
Y0 = Yd(idxpre,:);
Ye = Yd(idxest,:);
%% 绘图与检验
pic = Yd(:,1:6);
tiledlayout(2,3)
for j = 1:width(pic)
nexttile
plot(pic.time,pic{:,j})
title(pic.Properties.VariableNames(j))
end
% ADF检验
% True 则可以拒绝原假设
[h, pValue] = adftest(Ye);
%% 构建模型
% 基础VAR构建
numseries = numel(vars);
Mdls = varm(Constant=NaN(numseries,1),Lags=[1 2 3 4], …
SeriesNames=vars);
% threhold
tt = threshold(0,Type = "discrete");
tt.StateNames = ["Recession" "Expansion"];
% 构建tsVAR
Mdls2 = [Mdls Mdls];
tMdl = tsVAR(tt,Mdls2);
% 转换数据类型
Y00 = table2array(Y0);
Ye = table2array(Ye);
%%
EstMdl = estimate(tMdl,tt,Ye(:,1:6), Y0 = Y00(:,1:6),…
Z=Ye(:,1),Type="exogenous",IterationPlot=false); The logical index at position 1 contains a true value outside the array boundary
位置 1 处的逻辑索引包含一个在数组边界之外的 true 值。
Error tsVAR/estimate (line 826)
出错 tsVAR/estimate (第 826 行)
Ei = E(s == iii,:);
出错 TVAR_v1 (第 92 行)
EstMdl = estimate(tMdl,tt,Ye(:,1:6), Y0 = Y00(:,1:6),…
p = 4;
%%
% 加载数据
data = readtable(file_var);
year_quarter = data{:,1};
% 分解为年份和季度部分
year = floor(year_quarter);
quarter = round((year_quarter – year) * 4 + 1);
% 将季度转换为对应的月份
month = (quarter – 1) * 3 + 1;
% 创建一个 datetime 对象
dt = datetime(year, month, 1);
data{:,’time’} = dt;
data = table2timetable(data);
Y = data(:, vars);
%%
% 滤波用于判断经济周期
% one-sided HP filter
raw_data = Y; % 需滤波数据
lambda = 1600;
[Yt,Yc] = hpfilter(raw_data,lambda,FilterType="one-sided");
% 差分方法 去除趋势
Yd = diff(Y);
% 添加状态
Yd{:,"state"} = [NaN; Yc{1:end-1,"lrgdp"}];
%%
% 划分预样本和估计样本
maxp = 4;
T = height(Yd);
eT = T – maxp;
idxpre = 1:maxp;
idxest = (maxp+1):T;
Y0 = Yd(idxpre,:);
Ye = Yd(idxest,:);
%% 绘图与检验
pic = Yd(:,1:6);
tiledlayout(2,3)
for j = 1:width(pic)
nexttile
plot(pic.time,pic{:,j})
title(pic.Properties.VariableNames(j))
end
% ADF检验
% True 则可以拒绝原假设
[h, pValue] = adftest(Ye);
%% 构建模型
% 基础VAR构建
numseries = numel(vars);
Mdls = varm(Constant=NaN(numseries,1),Lags=[1 2 3 4], …
SeriesNames=vars);
% threhold
tt = threshold(0,Type = "discrete");
tt.StateNames = ["Recession" "Expansion"];
% 构建tsVAR
Mdls2 = [Mdls Mdls];
tMdl = tsVAR(tt,Mdls2);
% 转换数据类型
Y00 = table2array(Y0);
Ye = table2array(Ye);
%%
EstMdl = estimate(tMdl,tt,Ye(:,1:6), Y0 = Y00(:,1:6),…
Z=Ye(:,1),Type="exogenous",IterationPlot=false); estimate, tsvar MATLAB Answers — New Questions
i have error in runge kutta 4 order.
Alpha1=1;
Alpha2=2;
S=1;
omega=1
gamma=1;
Sc=1;
Pr=1.0;
f_omega=0.4;
zeta=0;
k = 0.1;
h=0.05; % step size
eta = 0:h:100; % Calculates upto y(3)
H = zeros(1,length(eta));
g = zeros(1,length(eta));
F = zeros(1,length(eta));
z = zeros(1,length(eta));
G = zeros(1,length(eta));
x = zeros(1,length(eta));
theta = zeros(1,length(eta));
y = zeros(1,length(eta));
phi = zeros(1,length(eta));
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S +f_omega / Sc * y(1) ;
u1 = @(eta, H) (-2*F);
u2 = @(eta,F) g;
u3 = @(eta,F,g) (g*H – G.^2 +F.^2 – S(((eta+1)/2)*g + F) + k(z.^2 -g.^2)) / (1-2*F*k);
u4 = @(eta,G) z;
u5 = @(eta,G,z) ((H*z + 2*F*G – S(((eta+1)/2)*z + G) – 2*k*g*z)/(1-2*F*k));
u6 = @(eta, theta) x;
u7 = @(eta, theta , x) (Pr*(H*x + S(((rta+1)/2)*x + alpha1*theta) – 2*zeta*F*H*x)/(1-Pr*zeta));
u8 = @(eta, phi) y ;
u9 = @(eta, phi, y) (Sc*(H*y – S(((eta+1)/2)*y + alpha2*phi) +gamma*phi));
for i=1:(length(eta)-1) % calculation loop
k_1 =u1(eta(i),H(i));
l_1 =u2(eta(i),F(i));
m_1 =u3(eta(i),F(i),g(i));
n_1 =u4(eta(i),G(i));
o_1 =u5(eta(i),G(i),z(i));
p_1 =u6(eta(i),theta(i));
q_1 =u7(eta(i),theta(i),x(i));
r_1 =u8(eta(i),phi(i));
s_1 =u9(eta(i),phi(i),y(i));
k_2 = u1(eta(i)+0.5*h,H(i)+0.5*h*k_1);
l_2 = u2(eta(i)+0.5*h,F(i)+0.5*h*l_1);
m_2 = u3(eta(i)+0.5*h,F(i)+0.5*h*l_1,g(i)+0.5*h*m_1);
n_2 = u4(eta(i)+0.5*h,G(i)+0.5*h*n_1);
o_2 = u5(eta(i)+0.5*h,G(i)+0.5*h*n_1,z(i)+0.5*h*o_1);
p_2 = u6(eta(i)+0.5*h,theta(i)+0.5*h*p_1);
q_2 = u7(eta(i)+0.5*h,theta(i)+0.5*h*p_1,x(i)+0.5*h*q_1);
r_2 = u8(eta(i)+0.5*h,phi(i)+0.5*h*r_1);
s_2 = u9(eta(i)+0.5*h,phi(i)+0.5*h*r_1,x(i)+0.5*h*s_1);
k_3 = u1(eta(i)+0.5*h,H(i)+0.5*h*k_2);
l_3 = u2(eta(i)+0.5*h,F(i)+0.5*h*l_2);
m_3 = u3(eta(i)+0.5*h,F(i)+0.5*h*l_2,g(i)+0.5*h*m_2);
n_3 = u4(eta(i)+0.5*h,G(i)+0.5*h*n_2);
o_3 = u5(eta(i)+0.5*h,G(i)+0.5*h*n_2,z(i)+0.5*h*o_2);
p_3 = u6(eta(i)+0.5*h,theta(i)+0.5*h*p_2);
q_3 = u7(eta(i)+0.5*h,theta(i)+0.5*h*p_2,x(i)+0.5*h*q_2);
r_3 = u8(eta(i)+0.5*h,phi(i)+0.5*h*r_2);
s_3 = u9(eta(i)+0.5*h,phi(i)+0.5*h*r_2,x(i)+0.5*h*s_2);
k_4 = u1(eta(i)+h,H(i)+h*k_3);
l_4 = u2(eta(i)+h,F(i)+h*l_3);
m_4 = u3(eta(i)+h,F(i)+h*l_3,g(i)+h*m_3);
n_4 = u4(eta(i)+h,G(i)+h*n_3);
o_4 = u5(eta(i)+h,G(i)+h*n_3,z(i)+h*o_3);
p_4 = u6(eta(i)+h,theta(i)+0.5*h*p_2);
q_4 = u7(eta(i)+h,theta(i)+h*p_3,x(i)+h*q_3);
r_4 = u8(eta(i)+h,phi(i)+h*r_3);
s_4 = u9(eta(i)+h,phi(i)+h*r_3,x(i)+h*s_3);
H(i+1) = H(i) + (1/6)*(k_1+2*k_2+2*k_3+k_4)*h;
g(i+1) = g(i) + (1/6)*(l_1+2*l_2+2*l_3+l_4)*h;
F(i+1) = F(i) + (1/6)*(m_1+2*m_2+2*m_3+m_4)*h;
z(i+1) = z(i) + (1/6)*(n_1+2*n_2+2*n_3+n_4)*h;
G(i+1) = G(i) + (1/6)*(o_1+2*o_2+2*o_3+o_4)*h;
x(i+1) = x(i) + (1/6)*(p_1+2*p_2+2*p_3+p_4)*h;
theta(i+1) = theta(i) + (1/6)*(q_1+2*q_2+2*q_3+q_4)*h;
y(i+1) = y(i) + (1/6)*(r_1+2*r_2+2*r_3+r_4)*h;
phi(i+1) = phi(i) + (1/6)*(s_1+2*s_2+2*s_3+s_4)*h;
end
figure();
subplot(3,2,1);
plot(eta, F);
title(‘F vs eta’);
xlabel(‘eta’);
ylabel(‘F’);
subplot(3,2,2);
plot(eta, G);
title(‘G vs eta’);
xlabel(‘eta’);
ylabel(‘G’);
subplot(3,2,3);
plot(eta, theta);
title(‘theta vs eta’);
xlabel(‘eta’);
ylabel(‘theta’);
subplot(3,2,4);
plot(eta, phi);
title(‘phi vs eta’);
xlabel(‘eta’);
ylabel(‘phi’);
subplot(3,2,5);
plot(eta, H);
title(‘H vs eta’);
xlabel(‘eta’);
ylabel(‘H’);
error
Array indices must be positive integers or logical values.Alpha1=1;
Alpha2=2;
S=1;
omega=1
gamma=1;
Sc=1;
Pr=1.0;
f_omega=0.4;
zeta=0;
k = 0.1;
h=0.05; % step size
eta = 0:h:100; % Calculates upto y(3)
H = zeros(1,length(eta));
g = zeros(1,length(eta));
F = zeros(1,length(eta));
z = zeros(1,length(eta));
G = zeros(1,length(eta));
x = zeros(1,length(eta));
theta = zeros(1,length(eta));
y = zeros(1,length(eta));
phi = zeros(1,length(eta));
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S +f_omega / Sc * y(1) ;
u1 = @(eta, H) (-2*F);
u2 = @(eta,F) g;
u3 = @(eta,F,g) (g*H – G.^2 +F.^2 – S(((eta+1)/2)*g + F) + k(z.^2 -g.^2)) / (1-2*F*k);
u4 = @(eta,G) z;
u5 = @(eta,G,z) ((H*z + 2*F*G – S(((eta+1)/2)*z + G) – 2*k*g*z)/(1-2*F*k));
u6 = @(eta, theta) x;
u7 = @(eta, theta , x) (Pr*(H*x + S(((rta+1)/2)*x + alpha1*theta) – 2*zeta*F*H*x)/(1-Pr*zeta));
u8 = @(eta, phi) y ;
u9 = @(eta, phi, y) (Sc*(H*y – S(((eta+1)/2)*y + alpha2*phi) +gamma*phi));
for i=1:(length(eta)-1) % calculation loop
k_1 =u1(eta(i),H(i));
l_1 =u2(eta(i),F(i));
m_1 =u3(eta(i),F(i),g(i));
n_1 =u4(eta(i),G(i));
o_1 =u5(eta(i),G(i),z(i));
p_1 =u6(eta(i),theta(i));
q_1 =u7(eta(i),theta(i),x(i));
r_1 =u8(eta(i),phi(i));
s_1 =u9(eta(i),phi(i),y(i));
k_2 = u1(eta(i)+0.5*h,H(i)+0.5*h*k_1);
l_2 = u2(eta(i)+0.5*h,F(i)+0.5*h*l_1);
m_2 = u3(eta(i)+0.5*h,F(i)+0.5*h*l_1,g(i)+0.5*h*m_1);
n_2 = u4(eta(i)+0.5*h,G(i)+0.5*h*n_1);
o_2 = u5(eta(i)+0.5*h,G(i)+0.5*h*n_1,z(i)+0.5*h*o_1);
p_2 = u6(eta(i)+0.5*h,theta(i)+0.5*h*p_1);
q_2 = u7(eta(i)+0.5*h,theta(i)+0.5*h*p_1,x(i)+0.5*h*q_1);
r_2 = u8(eta(i)+0.5*h,phi(i)+0.5*h*r_1);
s_2 = u9(eta(i)+0.5*h,phi(i)+0.5*h*r_1,x(i)+0.5*h*s_1);
k_3 = u1(eta(i)+0.5*h,H(i)+0.5*h*k_2);
l_3 = u2(eta(i)+0.5*h,F(i)+0.5*h*l_2);
m_3 = u3(eta(i)+0.5*h,F(i)+0.5*h*l_2,g(i)+0.5*h*m_2);
n_3 = u4(eta(i)+0.5*h,G(i)+0.5*h*n_2);
o_3 = u5(eta(i)+0.5*h,G(i)+0.5*h*n_2,z(i)+0.5*h*o_2);
p_3 = u6(eta(i)+0.5*h,theta(i)+0.5*h*p_2);
q_3 = u7(eta(i)+0.5*h,theta(i)+0.5*h*p_2,x(i)+0.5*h*q_2);
r_3 = u8(eta(i)+0.5*h,phi(i)+0.5*h*r_2);
s_3 = u9(eta(i)+0.5*h,phi(i)+0.5*h*r_2,x(i)+0.5*h*s_2);
k_4 = u1(eta(i)+h,H(i)+h*k_3);
l_4 = u2(eta(i)+h,F(i)+h*l_3);
m_4 = u3(eta(i)+h,F(i)+h*l_3,g(i)+h*m_3);
n_4 = u4(eta(i)+h,G(i)+h*n_3);
o_4 = u5(eta(i)+h,G(i)+h*n_3,z(i)+h*o_3);
p_4 = u6(eta(i)+h,theta(i)+0.5*h*p_2);
q_4 = u7(eta(i)+h,theta(i)+h*p_3,x(i)+h*q_3);
r_4 = u8(eta(i)+h,phi(i)+h*r_3);
s_4 = u9(eta(i)+h,phi(i)+h*r_3,x(i)+h*s_3);
H(i+1) = H(i) + (1/6)*(k_1+2*k_2+2*k_3+k_4)*h;
g(i+1) = g(i) + (1/6)*(l_1+2*l_2+2*l_3+l_4)*h;
F(i+1) = F(i) + (1/6)*(m_1+2*m_2+2*m_3+m_4)*h;
z(i+1) = z(i) + (1/6)*(n_1+2*n_2+2*n_3+n_4)*h;
G(i+1) = G(i) + (1/6)*(o_1+2*o_2+2*o_3+o_4)*h;
x(i+1) = x(i) + (1/6)*(p_1+2*p_2+2*p_3+p_4)*h;
theta(i+1) = theta(i) + (1/6)*(q_1+2*q_2+2*q_3+q_4)*h;
y(i+1) = y(i) + (1/6)*(r_1+2*r_2+2*r_3+r_4)*h;
phi(i+1) = phi(i) + (1/6)*(s_1+2*s_2+2*s_3+s_4)*h;
end
figure();
subplot(3,2,1);
plot(eta, F);
title(‘F vs eta’);
xlabel(‘eta’);
ylabel(‘F’);
subplot(3,2,2);
plot(eta, G);
title(‘G vs eta’);
xlabel(‘eta’);
ylabel(‘G’);
subplot(3,2,3);
plot(eta, theta);
title(‘theta vs eta’);
xlabel(‘eta’);
ylabel(‘theta’);
subplot(3,2,4);
plot(eta, phi);
title(‘phi vs eta’);
xlabel(‘eta’);
ylabel(‘phi’);
subplot(3,2,5);
plot(eta, H);
title(‘H vs eta’);
xlabel(‘eta’);
ylabel(‘H’);
error
Array indices must be positive integers or logical values. Alpha1=1;
Alpha2=2;
S=1;
omega=1
gamma=1;
Sc=1;
Pr=1.0;
f_omega=0.4;
zeta=0;
k = 0.1;
h=0.05; % step size
eta = 0:h:100; % Calculates upto y(3)
H = zeros(1,length(eta));
g = zeros(1,length(eta));
F = zeros(1,length(eta));
z = zeros(1,length(eta));
G = zeros(1,length(eta));
x = zeros(1,length(eta));
theta = zeros(1,length(eta));
y = zeros(1,length(eta));
phi = zeros(1,length(eta));
F(1) = 0;
G(1) = omega;
theta(1) = 1;
phi(1) = 1;
H(1) = S +f_omega / Sc * y(1) ;
u1 = @(eta, H) (-2*F);
u2 = @(eta,F) g;
u3 = @(eta,F,g) (g*H – G.^2 +F.^2 – S(((eta+1)/2)*g + F) + k(z.^2 -g.^2)) / (1-2*F*k);
u4 = @(eta,G) z;
u5 = @(eta,G,z) ((H*z + 2*F*G – S(((eta+1)/2)*z + G) – 2*k*g*z)/(1-2*F*k));
u6 = @(eta, theta) x;
u7 = @(eta, theta , x) (Pr*(H*x + S(((rta+1)/2)*x + alpha1*theta) – 2*zeta*F*H*x)/(1-Pr*zeta));
u8 = @(eta, phi) y ;
u9 = @(eta, phi, y) (Sc*(H*y – S(((eta+1)/2)*y + alpha2*phi) +gamma*phi));
for i=1:(length(eta)-1) % calculation loop
k_1 =u1(eta(i),H(i));
l_1 =u2(eta(i),F(i));
m_1 =u3(eta(i),F(i),g(i));
n_1 =u4(eta(i),G(i));
o_1 =u5(eta(i),G(i),z(i));
p_1 =u6(eta(i),theta(i));
q_1 =u7(eta(i),theta(i),x(i));
r_1 =u8(eta(i),phi(i));
s_1 =u9(eta(i),phi(i),y(i));
k_2 = u1(eta(i)+0.5*h,H(i)+0.5*h*k_1);
l_2 = u2(eta(i)+0.5*h,F(i)+0.5*h*l_1);
m_2 = u3(eta(i)+0.5*h,F(i)+0.5*h*l_1,g(i)+0.5*h*m_1);
n_2 = u4(eta(i)+0.5*h,G(i)+0.5*h*n_1);
o_2 = u5(eta(i)+0.5*h,G(i)+0.5*h*n_1,z(i)+0.5*h*o_1);
p_2 = u6(eta(i)+0.5*h,theta(i)+0.5*h*p_1);
q_2 = u7(eta(i)+0.5*h,theta(i)+0.5*h*p_1,x(i)+0.5*h*q_1);
r_2 = u8(eta(i)+0.5*h,phi(i)+0.5*h*r_1);
s_2 = u9(eta(i)+0.5*h,phi(i)+0.5*h*r_1,x(i)+0.5*h*s_1);
k_3 = u1(eta(i)+0.5*h,H(i)+0.5*h*k_2);
l_3 = u2(eta(i)+0.5*h,F(i)+0.5*h*l_2);
m_3 = u3(eta(i)+0.5*h,F(i)+0.5*h*l_2,g(i)+0.5*h*m_2);
n_3 = u4(eta(i)+0.5*h,G(i)+0.5*h*n_2);
o_3 = u5(eta(i)+0.5*h,G(i)+0.5*h*n_2,z(i)+0.5*h*o_2);
p_3 = u6(eta(i)+0.5*h,theta(i)+0.5*h*p_2);
q_3 = u7(eta(i)+0.5*h,theta(i)+0.5*h*p_2,x(i)+0.5*h*q_2);
r_3 = u8(eta(i)+0.5*h,phi(i)+0.5*h*r_2);
s_3 = u9(eta(i)+0.5*h,phi(i)+0.5*h*r_2,x(i)+0.5*h*s_2);
k_4 = u1(eta(i)+h,H(i)+h*k_3);
l_4 = u2(eta(i)+h,F(i)+h*l_3);
m_4 = u3(eta(i)+h,F(i)+h*l_3,g(i)+h*m_3);
n_4 = u4(eta(i)+h,G(i)+h*n_3);
o_4 = u5(eta(i)+h,G(i)+h*n_3,z(i)+h*o_3);
p_4 = u6(eta(i)+h,theta(i)+0.5*h*p_2);
q_4 = u7(eta(i)+h,theta(i)+h*p_3,x(i)+h*q_3);
r_4 = u8(eta(i)+h,phi(i)+h*r_3);
s_4 = u9(eta(i)+h,phi(i)+h*r_3,x(i)+h*s_3);
H(i+1) = H(i) + (1/6)*(k_1+2*k_2+2*k_3+k_4)*h;
g(i+1) = g(i) + (1/6)*(l_1+2*l_2+2*l_3+l_4)*h;
F(i+1) = F(i) + (1/6)*(m_1+2*m_2+2*m_3+m_4)*h;
z(i+1) = z(i) + (1/6)*(n_1+2*n_2+2*n_3+n_4)*h;
G(i+1) = G(i) + (1/6)*(o_1+2*o_2+2*o_3+o_4)*h;
x(i+1) = x(i) + (1/6)*(p_1+2*p_2+2*p_3+p_4)*h;
theta(i+1) = theta(i) + (1/6)*(q_1+2*q_2+2*q_3+q_4)*h;
y(i+1) = y(i) + (1/6)*(r_1+2*r_2+2*r_3+r_4)*h;
phi(i+1) = phi(i) + (1/6)*(s_1+2*s_2+2*s_3+s_4)*h;
end
figure();
subplot(3,2,1);
plot(eta, F);
title(‘F vs eta’);
xlabel(‘eta’);
ylabel(‘F’);
subplot(3,2,2);
plot(eta, G);
title(‘G vs eta’);
xlabel(‘eta’);
ylabel(‘G’);
subplot(3,2,3);
plot(eta, theta);
title(‘theta vs eta’);
xlabel(‘eta’);
ylabel(‘theta’);
subplot(3,2,4);
plot(eta, phi);
title(‘phi vs eta’);
xlabel(‘eta’);
ylabel(‘phi’);
subplot(3,2,5);
plot(eta, H);
title(‘H vs eta’);
xlabel(‘eta’);
ylabel(‘H’);
error
Array indices must be positive integers or logical values. rashmi MATLAB Answers — New Questions
Office apps fail to open
Hey all . . . This problem began in the middle of doing regular work on my PC. All of a sudden, none of my Office apps would open. Also, Quic-Books wouldn’t open. Other apps opened fine. At that time, I couldn’t open Windows Security either. It was recommended to run a series of system scans & repairs on the CMD line, which took about 4 hours and had said it made some fixes. I can’t recall those specific processes now. I uninstalled and then re-installed Office365. I can now open Windows Security, but it continues that none of the Office apps will open. I get the following “access denied” message when I try to contact Microsoft Support.
Any suggestions? Thanks in advance for any and all help.
. . . Ed
Access Denied
You don’t have permission to access “http://support.microsoft.com/en-us/contactus” on this server.
Reference #18.2d48c817.1718541216.2b067779
https://errors.edgesuite.net/18.2d48c817.1718541216.2b067779
Hey all . . . This problem began in the middle of doing regular work on my PC. All of a sudden, none of my Office apps would open. Also, Quic-Books wouldn’t open. Other apps opened fine. At that time, I couldn’t open Windows Security either. It was recommended to run a series of system scans & repairs on the CMD line, which took about 4 hours and had said it made some fixes. I can’t recall those specific processes now. I uninstalled and then re-installed Office365. I can now open Windows Security, but it continues that none of the Office apps will open. I get the following “access denied” message when I try to contact Microsoft Support. Any suggestions? Thanks in advance for any and all help. . . . Ed Access DeniedYou don’t have permission to access “http://support.microsoft.com/en-us/contactus” on this server.Reference #18.2d48c817.1718541216.2b067779https://errors.edgesuite.net/18.2d48c817.1718541216.2b067779 Read More
Converting Virtual Machines running Linux from SCSI to NVMe
Introduction
In the ever-evolving world of cloud computing, maximizing performance and efficiency is crucial for businesses leveraging virtual machines (VMs) on platforms like Microsoft Azure, especially for high I/O workloads like SAP on Azure or database applications. One significant upgrade that can yield substantial performance improvements is converting your Azure VM from a SCSI (Small Computer System Interface) disk setup to NVMe (Non-Volatile Memory Express) using Azure Boost. This blog post will guide you through the process of making this conversion and explore the numerous advantages of NVMe over SCSI.
Advantages of Azure Boost
Azure Boost is a powerful enhancement tool for Azure VMs, offering the following advantages:
Accelerated Disk Performance: Azure Boost optimizes disk I/O operations, significantly increasing the speed and efficiency of your VM’s storage.
Seamless Integration: Easily integrates with existing Azure infrastructure, allowing for a smooth transition and immediate performance benefits.
Cost-Effective Optimization: By enhancing the performance of existing VMs, Azure Boost helps reduce the need for more expensive hardware upgrades or additional resources.
To learn more about Azure Boost visit our documentation or the announcement blog.
What is changing for your VM?
Changing the host interface from SCSI to NVMe will not change the remote storage (OS disk or data disks), but change the way the operating systems sees the disks.
SCSI enabled VM
NVMe enabled VM
OS disk
/dev/sda
/dev/nvme0n1
Temp Disk
/dev/sdb
/dev/sda
First Data Disk
/dev/sdc
/dev/nvme0n2
In the following sections, we’ll provide a step-by-step guide to converting your Azure VM from SCSI to NVMe using Azure Boost, ensuring you can take full advantage of these performance improvements and maintain a competitive edge in the cloud computing landscape.
Migrate your virtual machine (VM) from SCSI to NVMe
To migrate from SCSI to NVMe and benefit from higher performance some steps need to be followed:
Check if your virtual machine series supports NVMe
Check your operating system for NVMe readiness
Convert your virtual machine to NVMe
Check your operating system
1. Check if your virtual machine series supports NVMe
The supported virtual machine SKUs to support NVMe attached disks is available in our documentation and in the table below.
If your VM type is not listed below change the VM type.
Size Series
Series Type
Deployment Status
Dalsv6
General Purpose
Preview
Easv6
Memory Optimized
Preview
DCesv5
General Purpose
Preview
ECesv5
Memory Optimized
Preview
Mv3 Medium Memory
High Memory to CPU Optimized
Production
Falsv6/Famsv6
Compute Optimized
Preview
Dlsv5
General Purpose
Production
Dsv5
General Purpose
Production
Esv5
Memory Optimized
Production
Ebsv5
Managed disks optimized
Production
Lsv3
Local storage optimized
Production
Dplsv5
General Purpose
Production
Dpsv5
General Purpose
Production
Epsv5
Memory Optimized
Production
Nvadsv5
GPU/AI workload optimized
Production
HBv4
High Performance Compute (HPC)
Production
HX
High Performance Compute (HPC)
Production
As the list of supported VM families may change over time, please check the up-to-date documentation.
2. Check your operating system for NVMe readiness
The operating system needs to support NVMe devices, this includes e.g. device drivers and initrdm, the temporary file system used during boot, need to be prepared. In addition to that you need to validate the mount points of the file systems as those will check if you use the SCSI device name (/dev/sdX).
To make this process easier we created a bash script that does the prevalidation for you.
2.1 Check Controller Type of VM
2.1.1 Check Controller Type using PowerShell
PS C:Usersuser1> $vm = Get-AzVM -name nvme-conversion-vm
PS C:Usersuser1> $vm.StorageProfile.DiskControllerType
SCSI
PS C:Usersuser1>
2.1.2 Check Controller Type using Azure CLI
$ az vm show –name nvme-conversion-vm –resource-group nvme-conversion
{
“additionalCapabilities”: {
…
“storageProfile”: {
…
“diskControllerType”: “SCSI”,
…
2.1.3 Check Controller Type using Azure Portal
2.2 Run Preflight Check script
The bash script does not automatically change anything on your system, it will only provide recommendations for commands to run.
This includes
NVMe modules
GRUB configuration
/etc/fstab checks for devices
To start the script use the following command (curl):
curl -s -S -L https://raw.githubusercontent.com/Azure/SAP-on-Azure-Scripts-and-Utilities/main/NVMe-Preflight-Check/azure-nvme-preflight-check.sh | sh -s — -v
As an alternative you can also use wget:
wget –no-verbose -O – https://raw.githubusercontent.com/Azure/SAP-on-Azure-Scripts-and-Utilities/main/NVMe-Preflight-Check/azure-nvme-preflight-check.sh | sh -s — -v
Third option is to download the script from the GitHub repository and run it manually.
nvme-conversion-vm:/home/azureuser # curl -s -S -L https://raw.githubusercontent.com/Azure/SAP-on-Azure-Scripts-and-Utilities/main/NVMe-Preflight-Check/azure-nvme-preflight-check.sh | sh -s — -v
————————————————
START of script
————————————————
————————————————
OK NVMe Module is installed and available on your VM
————————————————
————————————————
ERROR NVMe Module is not loaded in the initramfs image.
mkdir -p /etc/dracut.conf.d
echo ‘add_drivers+=” nvme nvme-core nvme-fabrics nvme-fc nvme-rdma nvme-loop nvmet nvmet-fc nvme-tcp “‘ >/etc/dracut.conf.d/nvme.conf
dracut -f -v
————————————————
GRUB_CMDLINE_LINUX_DEFAULT=”console=ttyS0 net.ifnames=0 dis_ucode_ldr earlyprintk=ttyS0 multipath=off rootdelay=300 scsi_mod.use_blk_mq=1 USE_BY_UUID_DEVICE_NAMES=1 nvme_core.io_timeout=240″
————————————————
OK GRUB contains timeouts.
————————————————
————————————————
OK fstab file doesn’t contain device names
————————————————
Please crosscheck your /etc/fstab file
————————————————
END of script
————————————————
nvme-conversion-vm:/home/azureuser #
In this example initrd and the kernel are not ready for NVMe, running the dracut commands will enable the operating system.
nvme-conversion-vm:/home/azureuser # mkdir -p /etc/dracut.conf.d
nvme-conversion-vm:/home/azureuser # echo ‘add_drivers+=” nvme nvme-core nvme-fabrics nvme-fc nvme-rdma nvme-loop nvmet nvmet-fc nvme-tcp “‘ >/etc/dracut.conf.d/nvme.conf
nvme-conversion-vm:/home/azureuser # dracut -f -v
dracut: Executing: /usr/bin/dracut -f -v
…
dracut: *** Creating initramfs image file ‘/boot/initrd-5.14.21-150500.55.65-default’ done ***
nvme-conversion-vm:/home/azureuser # reboot
3. Convert your virtual machine to NVMe
To convert the operating system multiple steps are required.
Change the metadata of the OS disk to include NVMe capabilities
Change the SCSI controller to NVMe
This process has also been automated using a PowerShell script.
3.1 Download the PowerShell script
To download the PowerShell script from the GitHub repo use the following command:
Invoke-WebRequest -Uri “https://raw.githubusercontent.com/Azure/SAP-on-Azure-Scripts-and-Utilities/main/NVMe-Preflight-Check/azure-nvme-VM-update.ps1” -OutFile “.azure-nvme-VM-update.ps1”
3.2. Convert the Virtual Machine
To convert run the script, detailed documentation is also available on the GitHub repository.
You can decide if e.g. the VM should automatically be started after the reconfiguration.
.azure-nvme-VM-update.ps1 -subscription_id XXXXXXXX-a961-4fb7-88c0-757472230e6c -resource_group_name nvme-conversion -vm_name nvme-conversion-vm -disk_controller_change_to NVMe -vm_size_change_to Standard_E64bds_v5
INFO – OS Disk found
INFO – Access token generated
INFO – Getting VM info
INFO – Getting all VM SKUs available in Region swedencentral
INFO – This will take about a minute …
INFO – Found VM SKU – Checking for Capabilities
INFO – VM supports NVMe
INFO – Checking for TrustedLaunch
INFO – Checking if VM is stopped and deallocated
INFO – Stopping VM
Tenant: 72f988bf-86f1-41af-91ab-2d7cd011db47
SubscriptionName SubscriptionId Account Environment
—————- ————– ——- ———–
XX-XX-XX-XX XXXXXXX-a961-4fb7-88c0-757472230e6c xxxxxx@microsoft.com AzureCloud
OperationId : cf02d28c-c711-4fe5-89fc-854fba31b67a
Status : Succeeded
StartTime : 07.06.2024 15:18:35
EndTime : 07.06.2024 15:19:17
Error :
Name :
INFO – Setting OS Disk to SCSI/NVMe
INFO – Getting VM config to prepare new config
INFO – Setting new VM size
INFO – Setting disk controller for VM
INFO – Updating the VM configuration
RequestId :
IsSuccessStatusCode : True
StatusCode : OK
ReasonPhrase :
INFO – Not starting VM
3.3 Check the result
3.3.1 Check result in Azure Portal
3.3.2 Check result in PowerShell
PS C:Users> $vm = Get-AzVM -name nvme-conversion-vm
PS C:Users> $vm.StorageProfile.DiskControllerType
NVMe
PS C:Users>
4. Check your operating system
4.1 Check devices
You can check the devices using nvme command, if nvme command is missing install the “nvme-cli” package.
nvme list
The output should show the OS disk and the data disks.
4.2 Get udev file for NVMe (Optional)
On SCSI virtual machines the udev rules integrated in waagent (Azure agent) created links in /dev/disk/azure/scsi1/lunX to identify the data disks. As SCSI is not used anymore the rules do not apply.
With one of the two available options to deploy NVMe enabled udev rules you will see new symbolic links in the directory /dev/disk/azure/data/by-lun. This directory will be the replacement for /dev/disk/azure/scsi1.
nvme-conversion-vm:/usr/lib/udev/rules.d # ls -l /dev/disk/azure/data/by-lun/
total 0
lrwxrwxrwx 1 root root 19 Jun 7 13:52 0 -> ../../../../nvme0n2
lrwxrwxrwx 1 root root 19 Jun 7 13:52 1 -> ../../../../nvme0n3
nvme-conversion-vm:/usr/lib/udev/rules.d #
4.2.1 Manual download of udev file
To download the new udev rules file use this command:
curl https://raw.githubusercontent.com/Azure/SAP-on-Azure-Scripts-and-Utilities/main/NVMe-Preflight-Check/88-azure-data-disk.rules –output /usr/lib/udev/rules.d/88-azure-data-disk.rules
and then run
udevadm control –reload-rules && udevadm trigger
to reload the udev rules.
4.2.2 Ready to install packages using Azure NVMe utils (https://github.com/azure/azure-nvme-utils )
There are pre-compiled packages available on Index of /results/cjp256/azure-nvme-utils/ (copr.fedorainfracloud.org) for multiple distributions, we are working on enabling and integrating Azure NVMe utils in all major distributions.
Microsoft Tech Community – Latest Blogs –Read More
Immutable Backup for SAP databases using Azure NetApp Files and BlueXP
Immutable/Indelible Backups for SAP databases
Why immutable/indelible Backups
ANF snapshots are point-in-time, read-only copies of data that are stored in an ANF volume. They are by definition immutable, but it is possible to delete those snapshots. To protect such snapshots from deletion we can copy the “daily” snapshot (created from azacsnap) to an immutable and indelible Azure blob space. This Azure blob space must be configured with a data protection policy that prevents the deletion or change of the snapshot before its live time period is over.
Immutable backups are backups that cannot be changed or deleted for a certain period of time. They offer several benefits for data protection, such as:
Ransomware protection: Immutable backups are safe from malicious encryption or deletion by ransomware attacks.
Threat prevention: Immutable backups are also resistant to internal or external threats that may try to tamper with or destroy backup data.
Regulatory compliance: Immutable backups can help businesses meet data regulations that require preserving data integrity and authenticity.
Reliable disaster recovery: Immutable backups can ensure fast and accurate recovery of data in case of any data loss event.
Overview of immutable storage for blob data – Azure Storage | Microsoft Learn
Configure immutability policies for blob versions – Azure Storage | Microsoft Learn
Scenario
An ANF snapshot will be created on the production/primary side of your deployed SAP system(s). ANF CRR (Cross Region Replication) will copy the volume (incl. snapshots) over to the DR side. In the DR region, BlueXP will automatically copy the ./snapshot directory to an immutable and indelible (WORM) Azure blob. The lifecycle period of the immutable Azure Blov will determine the lifetime of the backup.
Preparation
Create an Azure storage account for the blob space
Here it is very important to select “Enable version-level immutability” to enable this function of an immutable backup.
Configure the access network for the storage account
Go to the Azure storage Account
Add a container
Add a directory where the backups will be stored
Data container
Create the BlueXP account
NetApp BlueXP is a unified control plane that lets you build, protect, and govern your hybrid multicloud data estate across multiple clouds and on-premises. It offers storage mobility, protection, analysis and control features for any workload, any cloud, and any data type.
Some of the benefits of NetApp BlueXP are:
Simplified management: You can discover, deploy, and operate storage resources on different platforms with a single interface and common policies.
Enhanced security: You can protect your data from ransomware, data tampering, and accidental deletion with immutable backups and encryption.
Cost efficiency: You can optimize your data placement and consumption with intelligent insights and automation.
Sustainability: You can reduce your carbon footprint and improve your data efficiency
https://console.bluexp.netapp.com
Please create a user or log in with your account.
Create your “working Environment”
Create the Credentials
Create the Azure credentials for the communication between BlueXP and the Azure storage account
The easiest way to get this information is from the azacsnap authentication file (Service principal). It is also possible to use an managed identity for the connection.
Return to Working Environments and create a new working environment
If you don’t have a data broker already, create one. I think it is better to create a data broker manually. This gives you the chance to select the OS vendor and also integrate the broker in your monitoring and management framework.
Simply deploy a D4s_v5 with ubuntu20.04 or similar in your environment and run the installation procedure on this VM. This maybe is the better option because you can define all the “required” settings for the VM by yourself.
After the data broker is created we can specify the volume and directory which we would like to backup.
For performance and high availability reasons it is highly recommended to create a data broker group of three or more data broker.
Now create the relationship for the backup.
Create the relationship. Drag and drop the relevant storage tile to the right config place.
This displays the configured relationship
Configure the source.
We now need to specify the .snapshot directory from the data volume. We only want to backup the snapshots and not the data volume as it is.
Now select the storage account we have created in the beginning.
Select and copy the connect string.
Paste the connect string into the blob target config.
We would recommend creating one container for each data volume (if you have more than one) and one for the log backup.
Create the schedule for the sync. We would recommend doing the daily backup once a day and the log backup every 10 minutes.
You can exclude snapshot names hire in this section. You must specify what you don’t want instead of what you want. I know…. This might get changed.
This is the sync relationship we just created.
The dashboard will show the latest information. Here it is also possible to download the sync log from the data broker.
This is the data container with all the synced backups.
Set the deletion Policy
To setup the deletion policy go to the storage account and select “Data Protection”
Now set “Manage Policy”
Here you setup the indelible time frame:
For my system I only protect the deletion for 2 days. Normally we see 14, 30 or 90 days.
Automatic Lifecycle Management of the Blob
Normally you would like to have an automatic deletion of the backups in place. This makes the housekeeping much easier.
To setup the deletion policy please go to: “Lifecycle Management” and create a new deletion rule.
+Add Rule
Now the new lifecycle management rule is created.
Restore
The easiest way to restore a backup is when you create a new BlueXP relationship but in the revers order. From Blob to a new Volume. Then you do not have to deal with azcopy or anything else. This is a very easy but time-consuming process.
Update the Databroker
Normally the data broker will run an automatic update once a new version is available.
In rare cases you can run the update like this:
sudo -s
pm2 stop all
chmod +x data_broker_installer.sh
./data_broker_installer.sh > data_broker_installer.log
pm2 start
Files > 4TB
With the default configuration a databroker can copy only file smaller than 4TB to the blob. With HANA it can happen, that datafiles are getting much larger. In this case we need to adjust the databroker blocksize.
Check Data Broker status:
https://console.bluexp.netapp.com/sync/manage
Expand the Data Broker Group and then expand the Data Broker.
Check Data Broker version.
The Data Broker should automatically be updated to the latest version as features are released.
To manually update the Data Broker version:
From the Data Broker VM
pm2 update
OR
pm2 stop all, and pm2 start all
Data Broker config files location:
cd /opt/netapp/databroker/config
To make changes to the buffer-size setting (this file is normally empty):
vi local.json
add the following:
{
“protocols”: {
“azure”: {
“buffer-size”: “120MB”
}
}
}
Microsoft Tech Community – Latest Blogs –Read More
please explain the function of each command used in this code. These commands are part of allan variance code.
avar = zeros(numel(m), 1);
for i = 1:numel(m)
mi = m(i);
avar(i,:) = sum((theta(1+2*mi:L) – 2*theta(1+mi:L-mi) + theta(1:L-2*mi)).^2, 1);
end
avar = avar ./ (2*tau.^2 .* (L – 2*m));
adev = sqrt(avar);avar = zeros(numel(m), 1);
for i = 1:numel(m)
mi = m(i);
avar(i,:) = sum((theta(1+2*mi:L) – 2*theta(1+mi:L-mi) + theta(1:L-2*mi)).^2, 1);
end
avar = avar ./ (2*tau.^2 .* (L – 2*m));
adev = sqrt(avar); avar = zeros(numel(m), 1);
for i = 1:numel(m)
mi = m(i);
avar(i,:) = sum((theta(1+2*mi:L) – 2*theta(1+mi:L-mi) + theta(1:L-2*mi)).^2, 1);
end
avar = avar ./ (2*tau.^2 .* (L – 2*m));
adev = sqrt(avar); algorithm, matlab function MATLAB Answers — New Questions
If I change my PC, can I re-install a Matlab license in the new PC (uninstalling from the old)?
I am planning to purchase a Matlab license, and I plan to change my PC next year.
Is the MatLab license tied to a single PC?
Once installed in a PC, if I change my PC can I re-install the license in this new PC (uninstalling the licence from the old PC)?I am planning to purchase a Matlab license, and I plan to change my PC next year.
Is the MatLab license tied to a single PC?
Once installed in a PC, if I change my PC can I re-install the license in this new PC (uninstalling the licence from the old PC)? I am planning to purchase a Matlab license, and I plan to change my PC next year.
Is the MatLab license tied to a single PC?
Once installed in a PC, if I change my PC can I re-install the license in this new PC (uninstalling the licence from the old PC)? reinstall MATLAB Answers — New Questions
Return empty cell when cells are empty
Hi,
=IF(ISBLANK(L5),TODAY()-B5,””)
when L5 and B5 are both empty the above formula is returning the value 45459 when it should be returning an empty cell.
what is going on here and how do I fix it?
Thankyou for taking a look
Hi,=IF(ISBLANK(L5),TODAY()-B5,””) when L5 and B5 are both empty the above formula is returning the value 45459 when it should be returning an empty cell. what is going on here and how do I fix it? Thankyou for taking a look Read More
Dynamically change formula when new data is added
Hi,
Each week I manually change the following formula by adding an additional cell to the range:
=AVERAGE(J10:J28)
At the moment I am changing the formula manually to:
=AVERAGE(J10:J29)
next week I will change it to:
=AVERAGE(J10:J30)
and so on……
is there a way to do this without having to manually do this?
Thank you for your interest.
Hi, Each week I manually change the following formula by adding an additional cell to the range: =AVERAGE(J10:J28) At the moment I am changing the formula manually to: =AVERAGE(J10:J29) next week I will change it to: =AVERAGE(J10:J30) and so on…… is there a way to do this without having to manually do this? Thank you for your interest. Read More
MS Authenticator drain battery Android
Hi
I have activated battery optimize, disabled forground activity, disabled background activity, disabled autostart.
Still the app is always in top 3 apps of draining battery.
How can this be?
Hi I have activated battery optimize, disabled forground activity, disabled background activity, disabled autostart. Still the app is always in top 3 apps of draining battery. How can this be? Read More
Counting instances across three columns not just one
Hi, I am trying to figure out how to code for the resulting tables #1 and #2 in the screenshot, based on the data table. Each publication can be characterized by 1 to 3 categories of humour in domain A and 1-3 categories of group in domain B. I manually created the tables I want to achieve (#1 and#2 in the screenshot) to demonstrate what I want to do. I can make a pivot table with publication type and one column of the humour categories, but I can’t figure out how to make a pivot table or use a function like COUNTIFS to do it across 3 columns. I could brute force a solution by copy/pasting all the responses into one big linear spreadsheet but there must be a more elegant way. (These are made up data to demonstrate what I am after). Thank you.
Hi, I am trying to figure out how to code for the resulting tables #1 and #2 in the screenshot, based on the data table. Each publication can be characterized by 1 to 3 categories of humour in domain A and 1-3 categories of group in domain B. I manually created the tables I want to achieve (#1 and#2 in the screenshot) to demonstrate what I want to do. I can make a pivot table with publication type and one column of the humour categories, but I can’t figure out how to make a pivot table or use a function like COUNTIFS to do it across 3 columns. I could brute force a solution by copy/pasting all the responses into one big linear spreadsheet but there must be a more elegant way. (These are made up data to demonstrate what I am after). Thank you. Read More
Fitting multiple curves with multiple data sets, partial and globally shared parameters using lsqcurvefit
Hello everyone, I hope you can help me with the following problem. I have 3 measurement data sets, consisting of x-values (e.g. x1) and 2 corresponding y-data sets (e.g. A1 and B1). The functions of these parameters have partially shared parameters. A simultaneous fit over both curves works so far. Now I want to run a global fit over all 3 measurement datasets simultaneously, where all 3 measurement datasets share one parameter (beta(10)). How do I do this? Previously, I received a value for beta (10) for each fit, but now I want to change this. My data and functions (non-linear) are very extensive, so I have created a simplified example.
b1 = 1; b2 = 0.85; b3 = 2.5;
b4 = 1.1; b5 = 2.2; b6 = 4.5;
b7 = 1.3; b8 = 7.2; b9 = 9.5;
b10 = 0.5;
%x data
x1 = linspace(0, 10, 20).’; x2 = linspace(0, 10, 23).’; x3 = linspace(0, 10, 14).’;
%constants
C1 = 3.7 ; C2 = 4.2; C3 = 20.2;
%measurement dataset 1
A1 = b1 + b2*x1 + C1 * b10 + rand(20,1);
B1 = b3 – b2*x1 + C1 * b10 + rand(20,1);
%measurement dataset 2
A2 = b4 + b5*x2 + C2 * b10 + rand(23,1);
B2 = b6 – b5*x2 + C2 * b10 + rand(23,1);
%measurement dataset 3
A3 = b7 + b8*x3 + C3 * b10 + rand(14,1);
B3 = b9 – b8*x3 + C3 * b10 + rand(14,1);
mdl1 = @(beta, x) [beta(1) + beta(2).*x + C1 .* beta(10) ,…
beta(3) – beta(2).*x + C1 .* beta(10)];
mdl2 = @(beta, x) [beta(4) + beta(5).*x + C2 .* beta(10) ,…
beta(6) – beta(5).*x + C2 .* beta(10)];
mdl3 = @(beta, x) [beta(7) + beta(8).*x + C3 .* beta(10) ,…
beta(9) – beta(8).*x + C3 .* beta(10)];
beta0 = [0.92, 0.8, 2, 0.7, 2, 4, 1, 7, 9, 1];
lb = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
ub = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15];
options = optimoptions(@lsqcurvefit,’Algorithm’,’levenberg-marquardt’);
beta1 = lsqcurvefit(mdl1,beta0,x1,[A1, B1],lb,ub,options);
beta2 = lsqcurvefit(mdl2,beta0,x2,[A2, B2],lb,ub,options);
beta3 = lsqcurvefit(mdl3,beta0,x3,[A3, B3],lb,ub,options);
A1_fit = beta1(1) + beta1(2)*x1 + C1 * beta1(10);
B1_fit = beta1(3) – beta1(2)*x1 + C1 * beta1(10);
A2_fit = beta2(4) + beta2(5)*x2 + C2 * beta2(10);
B2_fit = beta2(6) – beta2(5)*x2 + C2 * beta2(10);
A3_fit = beta3(7) + beta3(8)*x3 + C3 * beta3(10);
B3_fit = beta3(9) – beta3(8)*x3 + C3 * beta3(10);
figure(1);
subplot(2,1,1);
hold on;
plot(x1, A1,’s’);
plot(x1, A1_fit);
plot(x2, A2,’d’);
plot(x2, A2_fit);
plot(x3, A3,’p’);
plot(x3, A3_fit);
subplot(2,1,2);
hold on;
plot(x1, B1,’s’);
plot(x1, B1_fit);
plot(x2, B2,’d’);
plot(x2, B2_fit);
plot(x3, B3,’p’);
plot(x3, B3_fit);
hold offHello everyone, I hope you can help me with the following problem. I have 3 measurement data sets, consisting of x-values (e.g. x1) and 2 corresponding y-data sets (e.g. A1 and B1). The functions of these parameters have partially shared parameters. A simultaneous fit over both curves works so far. Now I want to run a global fit over all 3 measurement datasets simultaneously, where all 3 measurement datasets share one parameter (beta(10)). How do I do this? Previously, I received a value for beta (10) for each fit, but now I want to change this. My data and functions (non-linear) are very extensive, so I have created a simplified example.
b1 = 1; b2 = 0.85; b3 = 2.5;
b4 = 1.1; b5 = 2.2; b6 = 4.5;
b7 = 1.3; b8 = 7.2; b9 = 9.5;
b10 = 0.5;
%x data
x1 = linspace(0, 10, 20).’; x2 = linspace(0, 10, 23).’; x3 = linspace(0, 10, 14).’;
%constants
C1 = 3.7 ; C2 = 4.2; C3 = 20.2;
%measurement dataset 1
A1 = b1 + b2*x1 + C1 * b10 + rand(20,1);
B1 = b3 – b2*x1 + C1 * b10 + rand(20,1);
%measurement dataset 2
A2 = b4 + b5*x2 + C2 * b10 + rand(23,1);
B2 = b6 – b5*x2 + C2 * b10 + rand(23,1);
%measurement dataset 3
A3 = b7 + b8*x3 + C3 * b10 + rand(14,1);
B3 = b9 – b8*x3 + C3 * b10 + rand(14,1);
mdl1 = @(beta, x) [beta(1) + beta(2).*x + C1 .* beta(10) ,…
beta(3) – beta(2).*x + C1 .* beta(10)];
mdl2 = @(beta, x) [beta(4) + beta(5).*x + C2 .* beta(10) ,…
beta(6) – beta(5).*x + C2 .* beta(10)];
mdl3 = @(beta, x) [beta(7) + beta(8).*x + C3 .* beta(10) ,…
beta(9) – beta(8).*x + C3 .* beta(10)];
beta0 = [0.92, 0.8, 2, 0.7, 2, 4, 1, 7, 9, 1];
lb = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
ub = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15];
options = optimoptions(@lsqcurvefit,’Algorithm’,’levenberg-marquardt’);
beta1 = lsqcurvefit(mdl1,beta0,x1,[A1, B1],lb,ub,options);
beta2 = lsqcurvefit(mdl2,beta0,x2,[A2, B2],lb,ub,options);
beta3 = lsqcurvefit(mdl3,beta0,x3,[A3, B3],lb,ub,options);
A1_fit = beta1(1) + beta1(2)*x1 + C1 * beta1(10);
B1_fit = beta1(3) – beta1(2)*x1 + C1 * beta1(10);
A2_fit = beta2(4) + beta2(5)*x2 + C2 * beta2(10);
B2_fit = beta2(6) – beta2(5)*x2 + C2 * beta2(10);
A3_fit = beta3(7) + beta3(8)*x3 + C3 * beta3(10);
B3_fit = beta3(9) – beta3(8)*x3 + C3 * beta3(10);
figure(1);
subplot(2,1,1);
hold on;
plot(x1, A1,’s’);
plot(x1, A1_fit);
plot(x2, A2,’d’);
plot(x2, A2_fit);
plot(x3, A3,’p’);
plot(x3, A3_fit);
subplot(2,1,2);
hold on;
plot(x1, B1,’s’);
plot(x1, B1_fit);
plot(x2, B2,’d’);
plot(x2, B2_fit);
plot(x3, B3,’p’);
plot(x3, B3_fit);
hold off Hello everyone, I hope you can help me with the following problem. I have 3 measurement data sets, consisting of x-values (e.g. x1) and 2 corresponding y-data sets (e.g. A1 and B1). The functions of these parameters have partially shared parameters. A simultaneous fit over both curves works so far. Now I want to run a global fit over all 3 measurement datasets simultaneously, where all 3 measurement datasets share one parameter (beta(10)). How do I do this? Previously, I received a value for beta (10) for each fit, but now I want to change this. My data and functions (non-linear) are very extensive, so I have created a simplified example.
b1 = 1; b2 = 0.85; b3 = 2.5;
b4 = 1.1; b5 = 2.2; b6 = 4.5;
b7 = 1.3; b8 = 7.2; b9 = 9.5;
b10 = 0.5;
%x data
x1 = linspace(0, 10, 20).’; x2 = linspace(0, 10, 23).’; x3 = linspace(0, 10, 14).’;
%constants
C1 = 3.7 ; C2 = 4.2; C3 = 20.2;
%measurement dataset 1
A1 = b1 + b2*x1 + C1 * b10 + rand(20,1);
B1 = b3 – b2*x1 + C1 * b10 + rand(20,1);
%measurement dataset 2
A2 = b4 + b5*x2 + C2 * b10 + rand(23,1);
B2 = b6 – b5*x2 + C2 * b10 + rand(23,1);
%measurement dataset 3
A3 = b7 + b8*x3 + C3 * b10 + rand(14,1);
B3 = b9 – b8*x3 + C3 * b10 + rand(14,1);
mdl1 = @(beta, x) [beta(1) + beta(2).*x + C1 .* beta(10) ,…
beta(3) – beta(2).*x + C1 .* beta(10)];
mdl2 = @(beta, x) [beta(4) + beta(5).*x + C2 .* beta(10) ,…
beta(6) – beta(5).*x + C2 .* beta(10)];
mdl3 = @(beta, x) [beta(7) + beta(8).*x + C3 .* beta(10) ,…
beta(9) – beta(8).*x + C3 .* beta(10)];
beta0 = [0.92, 0.8, 2, 0.7, 2, 4, 1, 7, 9, 1];
lb = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
ub = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15];
options = optimoptions(@lsqcurvefit,’Algorithm’,’levenberg-marquardt’);
beta1 = lsqcurvefit(mdl1,beta0,x1,[A1, B1],lb,ub,options);
beta2 = lsqcurvefit(mdl2,beta0,x2,[A2, B2],lb,ub,options);
beta3 = lsqcurvefit(mdl3,beta0,x3,[A3, B3],lb,ub,options);
A1_fit = beta1(1) + beta1(2)*x1 + C1 * beta1(10);
B1_fit = beta1(3) – beta1(2)*x1 + C1 * beta1(10);
A2_fit = beta2(4) + beta2(5)*x2 + C2 * beta2(10);
B2_fit = beta2(6) – beta2(5)*x2 + C2 * beta2(10);
A3_fit = beta3(7) + beta3(8)*x3 + C3 * beta3(10);
B3_fit = beta3(9) – beta3(8)*x3 + C3 * beta3(10);
figure(1);
subplot(2,1,1);
hold on;
plot(x1, A1,’s’);
plot(x1, A1_fit);
plot(x2, A2,’d’);
plot(x2, A2_fit);
plot(x3, A3,’p’);
plot(x3, A3_fit);
subplot(2,1,2);
hold on;
plot(x1, B1,’s’);
plot(x1, B1_fit);
plot(x2, B2,’d’);
plot(x2, B2_fit);
plot(x3, B3,’p’);
plot(x3, B3_fit);
hold off lsqcurvefit, fitting multiple curves MATLAB Answers — New Questions
Up-sampling in convolutional neural network
Hi everyone,
for a project at university I am trying to rebuild a NN described in a paper. It was orininally designed in Keras (I don’t have any code, only its rough describtion) and I’m struggling with one specific layer they’re using. To up-sample their data, they use a layer which takes a single entry of its input and replicates it to a 2×2-region of the output. This results in a matrix with doubled dimensions, without zero-entries (assuming there was none in input) and same entry in each 2×2-block. It is an approximation to the inverse of the maxPooling-Layer of MATLAB. It is similar, but NOT the same as maxUnpooling-Layer, which keeps the position of an maximum-entry and fills up with zeros. For this specific "up-sampling-operation", there is no explicit NN-layer in MATLAB.
Does someone have an idea how I can do this operation?
An idea I had in mind: Just using the given maxUnpooling-Layer and hope there will be no big difference. I tried this and prepared my maxPooling-Layers with "HasUnpoolingOutputs", but it seems that maxUnpooling-Layer has to follow immediately after the maxPooling-Layer. I get unused outputs for my maxPooling-Layers and missing outputs for my maxUnpooling-Layers (seen via analyzeNetwork) as I use convolution-layers in between (see code for example).
layers = [
imageInputLayer([32 32 1])
convolution2dLayer(filterSize, 32, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
maxPooling2dLayer(2,’Stride’,2,’HasUnpoolingOutputs’,true) %
convolution2dLayer(filterSize, 64, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
maxUnpooling2dLayer() %
convolution2dLayer(filterSize, 32, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
fullyConnectedLayer(32)
regressionLayer
];
So in this case, one has to bring the outputs "indices" and "size" of the maxPooling-layer to the maxUnpooling-layer. But I don’t know how this can be achieved :/
I’d be very thankful for any ideas.Hi everyone,
for a project at university I am trying to rebuild a NN described in a paper. It was orininally designed in Keras (I don’t have any code, only its rough describtion) and I’m struggling with one specific layer they’re using. To up-sample their data, they use a layer which takes a single entry of its input and replicates it to a 2×2-region of the output. This results in a matrix with doubled dimensions, without zero-entries (assuming there was none in input) and same entry in each 2×2-block. It is an approximation to the inverse of the maxPooling-Layer of MATLAB. It is similar, but NOT the same as maxUnpooling-Layer, which keeps the position of an maximum-entry and fills up with zeros. For this specific "up-sampling-operation", there is no explicit NN-layer in MATLAB.
Does someone have an idea how I can do this operation?
An idea I had in mind: Just using the given maxUnpooling-Layer and hope there will be no big difference. I tried this and prepared my maxPooling-Layers with "HasUnpoolingOutputs", but it seems that maxUnpooling-Layer has to follow immediately after the maxPooling-Layer. I get unused outputs for my maxPooling-Layers and missing outputs for my maxUnpooling-Layers (seen via analyzeNetwork) as I use convolution-layers in between (see code for example).
layers = [
imageInputLayer([32 32 1])
convolution2dLayer(filterSize, 32, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
maxPooling2dLayer(2,’Stride’,2,’HasUnpoolingOutputs’,true) %
convolution2dLayer(filterSize, 64, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
maxUnpooling2dLayer() %
convolution2dLayer(filterSize, 32, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
fullyConnectedLayer(32)
regressionLayer
];
So in this case, one has to bring the outputs "indices" and "size" of the maxPooling-layer to the maxUnpooling-layer. But I don’t know how this can be achieved :/
I’d be very thankful for any ideas. Hi everyone,
for a project at university I am trying to rebuild a NN described in a paper. It was orininally designed in Keras (I don’t have any code, only its rough describtion) and I’m struggling with one specific layer they’re using. To up-sample their data, they use a layer which takes a single entry of its input and replicates it to a 2×2-region of the output. This results in a matrix with doubled dimensions, without zero-entries (assuming there was none in input) and same entry in each 2×2-block. It is an approximation to the inverse of the maxPooling-Layer of MATLAB. It is similar, but NOT the same as maxUnpooling-Layer, which keeps the position of an maximum-entry and fills up with zeros. For this specific "up-sampling-operation", there is no explicit NN-layer in MATLAB.
Does someone have an idea how I can do this operation?
An idea I had in mind: Just using the given maxUnpooling-Layer and hope there will be no big difference. I tried this and prepared my maxPooling-Layers with "HasUnpoolingOutputs", but it seems that maxUnpooling-Layer has to follow immediately after the maxPooling-Layer. I get unused outputs for my maxPooling-Layers and missing outputs for my maxUnpooling-Layers (seen via analyzeNetwork) as I use convolution-layers in between (see code for example).
layers = [
imageInputLayer([32 32 1])
convolution2dLayer(filterSize, 32, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
maxPooling2dLayer(2,’Stride’,2,’HasUnpoolingOutputs’,true) %
convolution2dLayer(filterSize, 64, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
maxUnpooling2dLayer() %
convolution2dLayer(filterSize, 32, ‘Padding’, ‘same’)
batchNormalizationLayer()
reluLayer()
fullyConnectedLayer(32)
regressionLayer
];
So in this case, one has to bring the outputs "indices" and "size" of the maxPooling-layer to the maxUnpooling-layer. But I don’t know how this can be achieved :/
I’d be very thankful for any ideas. neural network MATLAB Answers — New Questions
Simulation Crash Issue with Current Limiter and Motor Drive System
Hello MATLAB Community,
I am currently working on a Simscape model where a battery is connected to a current limiter and subsequently to a "motor and drive" system block. I am experiencing an issue where the simulation crashes as soon as the current limiter attempts to limit the current.
Error Details:
Error:An error occurred during simulation and the simulation was terminated
Caused by:
[‘Model_Name/Solver’]: Transient initialization at time 0.04421663720467431, solving for consistent states and modes, failed to converge.
Nonlinear solver: failed to converge, residual norm too large.
Here is the set of components with unconverged equations:
‘Model_Name/Current Limiter’
Equation location is:
‘/Applications/MATLAB_R2024a.app/toolbox/physmod/elec/library/m/+ee/+semiconductors/current_limiter_base.sscp'(no line number info)
What I Have Tried
Solver Configuration: I have tried using stiff solvers such as ode15s and ode23t, and adjusted the tolerances.
Initialization: Ensured that all initial conditions are set correctly for the battery, current limiter, and motor system.
Current Limiter Settings: Reviewed and adjusted the current limiter parameters to avoid abrupt changes.
Simulation Step Size: Reduced the step size to capture transient behaviors more accurately.
Zero-Crossing Detection: Enabled zero-crossing detection to handle state changes more smoothly.
Component Parameters: Verified that all component parameters are realistic and consistent.
Protective Measures: Tried introducing capacitors and resistors to smooth out voltage drops and dampen sudden changes.
Despite these efforts, the simulation still crashes. I believe the issue might be related to the current limiter’s interaction with the motor and drive system.
Reference Model
I am using the model configuration similar to the one available here: Battery Electric Vehicle with Motor Cooling in Simscape.
Request for Assistance
I am seeking advice on how to effectively limit the current to the motor and drive system without causing the simulation to crash. Any insights or suggestions on how to resolve this issue would be greatly appreciated.
Thank you in advance for your help!
Best regards, AlexHello MATLAB Community,
I am currently working on a Simscape model where a battery is connected to a current limiter and subsequently to a "motor and drive" system block. I am experiencing an issue where the simulation crashes as soon as the current limiter attempts to limit the current.
Error Details:
Error:An error occurred during simulation and the simulation was terminated
Caused by:
[‘Model_Name/Solver’]: Transient initialization at time 0.04421663720467431, solving for consistent states and modes, failed to converge.
Nonlinear solver: failed to converge, residual norm too large.
Here is the set of components with unconverged equations:
‘Model_Name/Current Limiter’
Equation location is:
‘/Applications/MATLAB_R2024a.app/toolbox/physmod/elec/library/m/+ee/+semiconductors/current_limiter_base.sscp'(no line number info)
What I Have Tried
Solver Configuration: I have tried using stiff solvers such as ode15s and ode23t, and adjusted the tolerances.
Initialization: Ensured that all initial conditions are set correctly for the battery, current limiter, and motor system.
Current Limiter Settings: Reviewed and adjusted the current limiter parameters to avoid abrupt changes.
Simulation Step Size: Reduced the step size to capture transient behaviors more accurately.
Zero-Crossing Detection: Enabled zero-crossing detection to handle state changes more smoothly.
Component Parameters: Verified that all component parameters are realistic and consistent.
Protective Measures: Tried introducing capacitors and resistors to smooth out voltage drops and dampen sudden changes.
Despite these efforts, the simulation still crashes. I believe the issue might be related to the current limiter’s interaction with the motor and drive system.
Reference Model
I am using the model configuration similar to the one available here: Battery Electric Vehicle with Motor Cooling in Simscape.
Request for Assistance
I am seeking advice on how to effectively limit the current to the motor and drive system without causing the simulation to crash. Any insights or suggestions on how to resolve this issue would be greatly appreciated.
Thank you in advance for your help!
Best regards, Alex Hello MATLAB Community,
I am currently working on a Simscape model where a battery is connected to a current limiter and subsequently to a "motor and drive" system block. I am experiencing an issue where the simulation crashes as soon as the current limiter attempts to limit the current.
Error Details:
Error:An error occurred during simulation and the simulation was terminated
Caused by:
[‘Model_Name/Solver’]: Transient initialization at time 0.04421663720467431, solving for consistent states and modes, failed to converge.
Nonlinear solver: failed to converge, residual norm too large.
Here is the set of components with unconverged equations:
‘Model_Name/Current Limiter’
Equation location is:
‘/Applications/MATLAB_R2024a.app/toolbox/physmod/elec/library/m/+ee/+semiconductors/current_limiter_base.sscp'(no line number info)
What I Have Tried
Solver Configuration: I have tried using stiff solvers such as ode15s and ode23t, and adjusted the tolerances.
Initialization: Ensured that all initial conditions are set correctly for the battery, current limiter, and motor system.
Current Limiter Settings: Reviewed and adjusted the current limiter parameters to avoid abrupt changes.
Simulation Step Size: Reduced the step size to capture transient behaviors more accurately.
Zero-Crossing Detection: Enabled zero-crossing detection to handle state changes more smoothly.
Component Parameters: Verified that all component parameters are realistic and consistent.
Protective Measures: Tried introducing capacitors and resistors to smooth out voltage drops and dampen sudden changes.
Despite these efforts, the simulation still crashes. I believe the issue might be related to the current limiter’s interaction with the motor and drive system.
Reference Model
I am using the model configuration similar to the one available here: Battery Electric Vehicle with Motor Cooling in Simscape.
Request for Assistance
I am seeking advice on how to effectively limit the current to the motor and drive system without causing the simulation to crash. Any insights or suggestions on how to resolve this issue would be greatly appreciated.
Thank you in advance for your help!
Best regards, Alex simscape, battery_system_management MATLAB Answers — New Questions
Hi, why am I getting an error?
it gives me an error on the plot function. The error message is:
Error using LinearModel/plot
Wrong number of arguments.
load (‘DATI_PAZ1’);
LV_1=LV;
lat_1=lat;
sept_1=sept;
time_1=time;
load (‘DATI_PAZ2’);
LV_2=LV;
lat_2=lat;
ant_2=ant;
time_2=time;
figure
plot(time_1,LV_1,’k’)
hold on
plot(time_1,lat_1,’b’)
hold on
plot(time_1,sept_1,’r’)
grid on
xlabel(‘time [s]’),ylabel(‘colpi/(s*voxel)’)
title(‘Conc. FDG – CASO I’)
legend(‘ventr.sx’,’laterale’,’setto’)
figure
plot(time_2,LV_2,’k’)
hold on
plot(time_2,lat_2,’b’)
hold on
plot(time_2,ant_2,’r’)
grid on
xlabel(‘time [s]’),ylabel(‘colpi/(s*voxel)’)
title(‘Conc. FDG – CASO II’)
legend(‘ventr.sx’,’laterale’,’anteriore’)
y_lat_1=lat_1./LV_1;
y_sept_1=sept_1./LV_1;
x_1=cumtrapz(time_1,LV_1)./LV_1;
figure
subplot(1,2,1)
plot(x_1,y_lat_1,’*b’)
hold on
plot(x_1,y_sept_1,’*r’)
title(‘Patlak graph – CASO I’)
F_sept_1=fitlm(x_1(18:24,1),y_sept_1(18:24,1),’poly1′);
hold on
plot(F_sept_1,’r’) %error
F_lat_1=fitlm(x_1(18:24,1),y_lat_1(18:24,1),’poly1′);
hold on
plot(F_lat_1,’b’) %error
legend(‘parete laterale’,’setto’)
xlabel(‘trapz( C_p(t) dt)/C_p(t) [s]’),ylabel(‘C_t(t)/C_p(t) [adimensionale]’)
m_setto_1=F_sept_1.p1;
m_laterale_1=F_lat_1.p1;it gives me an error on the plot function. The error message is:
Error using LinearModel/plot
Wrong number of arguments.
load (‘DATI_PAZ1’);
LV_1=LV;
lat_1=lat;
sept_1=sept;
time_1=time;
load (‘DATI_PAZ2’);
LV_2=LV;
lat_2=lat;
ant_2=ant;
time_2=time;
figure
plot(time_1,LV_1,’k’)
hold on
plot(time_1,lat_1,’b’)
hold on
plot(time_1,sept_1,’r’)
grid on
xlabel(‘time [s]’),ylabel(‘colpi/(s*voxel)’)
title(‘Conc. FDG – CASO I’)
legend(‘ventr.sx’,’laterale’,’setto’)
figure
plot(time_2,LV_2,’k’)
hold on
plot(time_2,lat_2,’b’)
hold on
plot(time_2,ant_2,’r’)
grid on
xlabel(‘time [s]’),ylabel(‘colpi/(s*voxel)’)
title(‘Conc. FDG – CASO II’)
legend(‘ventr.sx’,’laterale’,’anteriore’)
y_lat_1=lat_1./LV_1;
y_sept_1=sept_1./LV_1;
x_1=cumtrapz(time_1,LV_1)./LV_1;
figure
subplot(1,2,1)
plot(x_1,y_lat_1,’*b’)
hold on
plot(x_1,y_sept_1,’*r’)
title(‘Patlak graph – CASO I’)
F_sept_1=fitlm(x_1(18:24,1),y_sept_1(18:24,1),’poly1′);
hold on
plot(F_sept_1,’r’) %error
F_lat_1=fitlm(x_1(18:24,1),y_lat_1(18:24,1),’poly1′);
hold on
plot(F_lat_1,’b’) %error
legend(‘parete laterale’,’setto’)
xlabel(‘trapz( C_p(t) dt)/C_p(t) [s]’),ylabel(‘C_t(t)/C_p(t) [adimensionale]’)
m_setto_1=F_sept_1.p1;
m_laterale_1=F_lat_1.p1; it gives me an error on the plot function. The error message is:
Error using LinearModel/plot
Wrong number of arguments.
load (‘DATI_PAZ1’);
LV_1=LV;
lat_1=lat;
sept_1=sept;
time_1=time;
load (‘DATI_PAZ2’);
LV_2=LV;
lat_2=lat;
ant_2=ant;
time_2=time;
figure
plot(time_1,LV_1,’k’)
hold on
plot(time_1,lat_1,’b’)
hold on
plot(time_1,sept_1,’r’)
grid on
xlabel(‘time [s]’),ylabel(‘colpi/(s*voxel)’)
title(‘Conc. FDG – CASO I’)
legend(‘ventr.sx’,’laterale’,’setto’)
figure
plot(time_2,LV_2,’k’)
hold on
plot(time_2,lat_2,’b’)
hold on
plot(time_2,ant_2,’r’)
grid on
xlabel(‘time [s]’),ylabel(‘colpi/(s*voxel)’)
title(‘Conc. FDG – CASO II’)
legend(‘ventr.sx’,’laterale’,’anteriore’)
y_lat_1=lat_1./LV_1;
y_sept_1=sept_1./LV_1;
x_1=cumtrapz(time_1,LV_1)./LV_1;
figure
subplot(1,2,1)
plot(x_1,y_lat_1,’*b’)
hold on
plot(x_1,y_sept_1,’*r’)
title(‘Patlak graph – CASO I’)
F_sept_1=fitlm(x_1(18:24,1),y_sept_1(18:24,1),’poly1′);
hold on
plot(F_sept_1,’r’) %error
F_lat_1=fitlm(x_1(18:24,1),y_lat_1(18:24,1),’poly1′);
hold on
plot(F_lat_1,’b’) %error
legend(‘parete laterale’,’setto’)
xlabel(‘trapz( C_p(t) dt)/C_p(t) [s]’),ylabel(‘C_t(t)/C_p(t) [adimensionale]’)
m_setto_1=F_sept_1.p1;
m_laterale_1=F_lat_1.p1; error using linearmodel/plot, wrong number of arguments MATLAB Answers — New Questions