Month: September 2024
Purview Extension not working
Seems Purview extension deployed/enforced via GPO not working for some devices.
in Chrome message below appears:
Any idea??
Seems Purview extension deployed/enforced via GPO not working for some devices.in Chrome message below appears:Any idea?? Read More
Latest Threat Intelligence (September 2024)
Microsoft Defender for IoT has released the September 2024 Threat Intelligence package. The package is available for download from the Microsoft Defender for IoT portal (click Updates, then Download file).
Threat Intelligence updates reflect the combined impact of proprietary research and threat intelligence carried out by Microsoft security teams. Each package contains the latest CVEs (Common Vulnerabilities and Exposures), IOCs (Indicators of Compromise), and other indicators applicable to IoT/ICS/OT networks (published during the past month) researched and implemented by Microsoft Threat Intelligence Research – CPS.
The CVE scores are aligned with the National Vulnerability Database (NVD). Starting with the August 2023 threat intelligence updates, CVSSv3 scores are shown if they are relevant; otherwise the CVSSv2 scores are shown.
Guidance
Customers are recommended to update their systems with the latest TI package in order to detect potential exposure risks and vulnerabilities in their networks and on their devices. Threat Intelligence packages are updated every month with the most up-to-date security information available, ensuring that Microsoft Defender for IoT can identify malicious actors and behaviors on devices.
Update your system with the latest TI package
The package is available for download from the Microsoft Defender for IoT portal (click Updates, then Download file), for more information, please review Update threat intelligence data | Microsoft Docs.
MD5 Hash: 1f2ebc6fe76113338b3dc11bbe1d288d
For cloud connected sensors, Microsoft Defender for IoT can automatically update new threat intelligence packages following their release, click here for more information. Read More
I’d like to set an automatic redirect of a URL for SharePoint to direct it to a new page.
I’d like to set an automatic redirect of a URL for SharePoint to direct it to a new page.
Anyone who clicks this link: https://test.sharepoint.com/SitePages/TestValues.aspx
To get automatically redirected to this link: https://test.sharepoint.com/sites/testingtest/SitePages/Home.aspx
How to do this.
I’d like to set an automatic redirect of a URL for SharePoint to direct it to a new page.Anyone who clicks this link: https://test.sharepoint.com/SitePages/TestValues.aspxTo get automatically redirected to this link: https://test.sharepoint.com/sites/testingtest/SitePages/Home.aspx How to do this. Read More
Create options are greyed out in windows 365 blade.
Hello, I am new to windows 365 services, I usually work on azure virtual desktop.
We are planning to test windows 365, so I have got the windows 365 administrator role to start with.
When I go to windows 365 blade in intune, I see the create options under all the tabs (provisioning policies, custom images, ANC and user settings) greyed out, I see in the document that windows 365 administrator role is enough to start with.
Am I missing anything here.
Appreciate your help.
BR
Naveen. S
Hello, I am new to windows 365 services, I usually work on azure virtual desktop.We are planning to test windows 365, so I have got the windows 365 administrator role to start with.When I go to windows 365 blade in intune, I see the create options under all the tabs (provisioning policies, custom images, ANC and user settings) greyed out, I see in the document that windows 365 administrator role is enough to start with.Am I missing anything here.Appreciate your help. BRNaveen. S Read More
Intune device limit
Hi,
How many (maximum) devices we can enroll with intune ?
Hi,How many (maximum) devices we can enroll with intune ? Read More
code folding in live scripts
Is code folding in live scripts possible as in .m?Is code folding in live scripts possible as in .m? Is code folding in live scripts possible as in .m? live script MATLAB Answers — New Questions
Bounding box example with image
Hi,
Can someone give a picture example / link for bounding box for image processing / computer vision?
Regards,Hi,
Can someone give a picture example / link for bounding box for image processing / computer vision?
Regards, Hi,
Can someone give a picture example / link for bounding box for image processing / computer vision?
Regards, image processing, computer vision MATLAB Answers — New Questions
Creating TuningGoals for delay margin and multivariable margin.
I want to use systune to tune gains for my Simulink model, using the slTuner interface. I am trying to set up a non-smooth, multi-objective optimization problem that can be solved by systune. However, I am having a difficult time figuring out how to set up two of the hard constraints.
The optimization problem is stated as follows:
minimize
subject to <
<
>
> 0.3
I think I have the soft constraints and first two hard constraints correctly implemented now, using TuningGoal.Variance. However, I have no idea how to properly set up the last two hard constraints. These are the dynamic margin (generalized delay margin) at and the multivarible module margin of . Where is the complementary sensitivity function and is the sensitivity function.
mdl = "TestVehicleModel";
open_system(mdl);
st0 = slTuner(mdl,"TuneGain");
Softreq1 = TuningGoal.Variance("u1","y1",1);
Softreq2 = TuningGoal.Variance("u2","y1",1);
Softreq3 = TuningGoal.Variance("u1","y2",1);
Softreq4 = TuningGoal.Variance("u2","y2",1);
Hardreq1 = TuningGoal.Variance("u1","y3",0.5);
Hardreq2 = TuningGoal.Variance("u2","y3",0.5);
[st, fSoft, gHard] = systune(st0,[Softreq1,Softreq2,Softreq3,Softreq4],[Hardreq1,Hardreq2]);
Can anyone help me with this? I know that it should be possible, as some researches have done it before in previous versions of MATLAB, probably 2018a.I want to use systune to tune gains for my Simulink model, using the slTuner interface. I am trying to set up a non-smooth, multi-objective optimization problem that can be solved by systune. However, I am having a difficult time figuring out how to set up two of the hard constraints.
The optimization problem is stated as follows:
minimize
subject to <
<
>
> 0.3
I think I have the soft constraints and first two hard constraints correctly implemented now, using TuningGoal.Variance. However, I have no idea how to properly set up the last two hard constraints. These are the dynamic margin (generalized delay margin) at and the multivarible module margin of . Where is the complementary sensitivity function and is the sensitivity function.
mdl = "TestVehicleModel";
open_system(mdl);
st0 = slTuner(mdl,"TuneGain");
Softreq1 = TuningGoal.Variance("u1","y1",1);
Softreq2 = TuningGoal.Variance("u2","y1",1);
Softreq3 = TuningGoal.Variance("u1","y2",1);
Softreq4 = TuningGoal.Variance("u2","y2",1);
Hardreq1 = TuningGoal.Variance("u1","y3",0.5);
Hardreq2 = TuningGoal.Variance("u2","y3",0.5);
[st, fSoft, gHard] = systune(st0,[Softreq1,Softreq2,Softreq3,Softreq4],[Hardreq1,Hardreq2]);
Can anyone help me with this? I know that it should be possible, as some researches have done it before in previous versions of MATLAB, probably 2018a. I want to use systune to tune gains for my Simulink model, using the slTuner interface. I am trying to set up a non-smooth, multi-objective optimization problem that can be solved by systune. However, I am having a difficult time figuring out how to set up two of the hard constraints.
The optimization problem is stated as follows:
minimize
subject to <
<
>
> 0.3
I think I have the soft constraints and first two hard constraints correctly implemented now, using TuningGoal.Variance. However, I have no idea how to properly set up the last two hard constraints. These are the dynamic margin (generalized delay margin) at and the multivarible module margin of . Where is the complementary sensitivity function and is the sensitivity function.
mdl = "TestVehicleModel";
open_system(mdl);
st0 = slTuner(mdl,"TuneGain");
Softreq1 = TuningGoal.Variance("u1","y1",1);
Softreq2 = TuningGoal.Variance("u2","y1",1);
Softreq3 = TuningGoal.Variance("u1","y2",1);
Softreq4 = TuningGoal.Variance("u2","y2",1);
Hardreq1 = TuningGoal.Variance("u1","y3",0.5);
Hardreq2 = TuningGoal.Variance("u2","y3",0.5);
[st, fSoft, gHard] = systune(st0,[Softreq1,Softreq2,Softreq3,Softreq4],[Hardreq1,Hardreq2]);
Can anyone help me with this? I know that it should be possible, as some researches have done it before in previous versions of MATLAB, probably 2018a. sltuner, optimization, non-smooth, multi-objective, systune, tuninggoal, simulink, matlab, hinfinity, margin MATLAB Answers — New Questions
Plot time on x axis for 24 hours duration
How can i plot my data against time on x axis which is 24 hours duration split every two hours.
Sample has been attached here.How can i plot my data against time on x axis which is 24 hours duration split every two hours.
Sample has been attached here. How can i plot my data against time on x axis which is 24 hours duration split every two hours.
Sample has been attached here. plot MATLAB Answers — New Questions
Only show rows that contain links
Hello everyone,
I have an excel sheet with 2400 rows in column A. 60% of these rows are hyperlinks. That’s the only data I want to see. Would that be possible?
So I don’t want to extract the hyperlink and turn it into text, I just want the rows that contain the hyperlinks to stay. The rest can be deleted. See the following example:
Ps. I am using Excel on a Mac. Hope someone can help, thank you!
Hello everyone, I have an excel sheet with 2400 rows in column A. 60% of these rows are hyperlinks. That’s the only data I want to see. Would that be possible? So I don’t want to extract the hyperlink and turn it into text, I just want the rows that contain the hyperlinks to stay. The rest can be deleted. See the following example: Ps. I am using Excel on a Mac. Hope someone can help, thank you! Read More
How to connect a Subsystem’s outputPorts (more than 5) to “Bus Creator” programmatically (from scripting)
Hi, Suppose I have Subsystems block which has outputs more than 5.
I have added "Bus Creator" using:
add_block("simulink/Commonly Used Blocks/Bus Creator","testing_bus/Bus Creator")
This is creating Bus in testing_bus model with only 2 input ports. Is there a way to create a "Bus Creator" with number of inputs = Size of Subsystem’s Outputports?
(or)
edit the number of input port of "Bus Creator" so that later using for loop, for connections by:
add_line(‘testing_bus’,’Subsystem/1′,’Bus Creator/1′);Hi, Suppose I have Subsystems block which has outputs more than 5.
I have added "Bus Creator" using:
add_block("simulink/Commonly Used Blocks/Bus Creator","testing_bus/Bus Creator")
This is creating Bus in testing_bus model with only 2 input ports. Is there a way to create a "Bus Creator" with number of inputs = Size of Subsystem’s Outputports?
(or)
edit the number of input port of "Bus Creator" so that later using for loop, for connections by:
add_line(‘testing_bus’,’Subsystem/1′,’Bus Creator/1′); Hi, Suppose I have Subsystems block which has outputs more than 5.
I have added "Bus Creator" using:
add_block("simulink/Commonly Used Blocks/Bus Creator","testing_bus/Bus Creator")
This is creating Bus in testing_bus model with only 2 input ports. Is there a way to create a "Bus Creator" with number of inputs = Size of Subsystem’s Outputports?
(or)
edit the number of input port of "Bus Creator" so that later using for loop, for connections by:
add_line(‘testing_bus’,’Subsystem/1′,’Bus Creator/1′); bus creator, bus, script, simulink MATLAB Answers — New Questions
my code wont display figure
% Parameters
L = 1; % Length of the string
c = 1; % Wave speed
num_segments = 200; % Number of segments
dx = L / num_segments; % Discretization step
dt = 0.005; % Time step
num_steps = 10 / dt; % Number of time steps
% Initial wave parameters
left_wave_length = 0.15 * L;
right_wave_length = 0.25 * L;
% Initialize the wave function
x = 0:dx:L;
u = sin(pi * x / left_wave_length) + sin(2 * pi * x / right_wave_length);
% Time integration
for step = 1:num_steps
% Compute second spatial derivative using finite differences
u_xx = (u(1:end-2) – 2*u(2:end-1) + u(3:end)) / dx^2;
% Update the wave equation using finite differences
u_new = 2*u(2:end-1) – u(2:end-1) + c^2 * dt^2 * u_xx;
% Update boundary conditions
u_new1 = [0, u_new, 0];
% Update the wave function
u = u_new1;
end
% Plot at t = 0
figure;
plot(x, u);
title(‘Wave Equation at t = 0’);
xlabel(‘Position [L]’);
ylabel(‘Amplitude’);
xlim([0, L]);
% Plot at t = 10 [t]
figure;
plot(x, u);
title(‘Wave Equation at t = 10 [t]’);
xlabel(‘Position [L]’);
ylabel(‘Amplitude’);
xlim([0, L]);% Parameters
L = 1; % Length of the string
c = 1; % Wave speed
num_segments = 200; % Number of segments
dx = L / num_segments; % Discretization step
dt = 0.005; % Time step
num_steps = 10 / dt; % Number of time steps
% Initial wave parameters
left_wave_length = 0.15 * L;
right_wave_length = 0.25 * L;
% Initialize the wave function
x = 0:dx:L;
u = sin(pi * x / left_wave_length) + sin(2 * pi * x / right_wave_length);
% Time integration
for step = 1:num_steps
% Compute second spatial derivative using finite differences
u_xx = (u(1:end-2) – 2*u(2:end-1) + u(3:end)) / dx^2;
% Update the wave equation using finite differences
u_new = 2*u(2:end-1) – u(2:end-1) + c^2 * dt^2 * u_xx;
% Update boundary conditions
u_new1 = [0, u_new, 0];
% Update the wave function
u = u_new1;
end
% Plot at t = 0
figure;
plot(x, u);
title(‘Wave Equation at t = 0’);
xlabel(‘Position [L]’);
ylabel(‘Amplitude’);
xlim([0, L]);
% Plot at t = 10 [t]
figure;
plot(x, u);
title(‘Wave Equation at t = 10 [t]’);
xlabel(‘Position [L]’);
ylabel(‘Amplitude’);
xlim([0, L]); % Parameters
L = 1; % Length of the string
c = 1; % Wave speed
num_segments = 200; % Number of segments
dx = L / num_segments; % Discretization step
dt = 0.005; % Time step
num_steps = 10 / dt; % Number of time steps
% Initial wave parameters
left_wave_length = 0.15 * L;
right_wave_length = 0.25 * L;
% Initialize the wave function
x = 0:dx:L;
u = sin(pi * x / left_wave_length) + sin(2 * pi * x / right_wave_length);
% Time integration
for step = 1:num_steps
% Compute second spatial derivative using finite differences
u_xx = (u(1:end-2) – 2*u(2:end-1) + u(3:end)) / dx^2;
% Update the wave equation using finite differences
u_new = 2*u(2:end-1) – u(2:end-1) + c^2 * dt^2 * u_xx;
% Update boundary conditions
u_new1 = [0, u_new, 0];
% Update the wave function
u = u_new1;
end
% Plot at t = 0
figure;
plot(x, u);
title(‘Wave Equation at t = 0’);
xlabel(‘Position [L]’);
ylabel(‘Amplitude’);
xlim([0, L]);
% Plot at t = 10 [t]
figure;
plot(x, u);
title(‘Wave Equation at t = 10 [t]’);
xlabel(‘Position [L]’);
ylabel(‘Amplitude’);
xlim([0, L]); matlab MATLAB Answers — New Questions
How do i plot this solutions?
Hello,
I want to plot the theta2 values on the x and presures (P2_ALL) on a plot. It seems my pressures are in symbolic form so Im using fplot to plot. When I do this it gives me an error. Does anyone know how to fix this?
clc; clearvars
format short g
M1 = 3 ;
P1 = 1 ;
theta2 = 1:1:30 ;
gamma = 1.4 ;
phi = 4.8 ;
syms beta2
tantheta2 = tand(theta2 );
x = 2*cotd(beta2)*((M1^2*((sind(beta2)).^2)-1 ));
y = M1^2*(gamma+cosd(2*beta2))+2 ;
eqn2 = x/y ;
b0=1 ;
for ii=1:numel(theta2 )
T = tantheta2(ii );
clearvars result2
syms beta2
result2 = vpasolve(T== eqn2, beta2,b0 );
beta2 = vpa(result2 );
Mn1 = M1*sind(beta2); % Eqn 4.7 from Anderson’s
p2p1 = 1+((2*gamma)/(gamma+1))*(Mn1^2-1); % Eqn 4.9 from Anderson’s
Mn2sq= (Mn1^2+(2/(gamma-1)))/((2*gamma/(gamma-1))*Mn1^2-1);% Eqn 4.10 from Anderson’s
Mn2 = sqrt(Mn2sq );
M2 = Mn2/sind(beta2-theta2(ii ));
P2 = p2p1*P1 ;
P2_ALL{ii}=vpa(P2) ;
end
fplot(theta2,P2_ALL)Hello,
I want to plot the theta2 values on the x and presures (P2_ALL) on a plot. It seems my pressures are in symbolic form so Im using fplot to plot. When I do this it gives me an error. Does anyone know how to fix this?
clc; clearvars
format short g
M1 = 3 ;
P1 = 1 ;
theta2 = 1:1:30 ;
gamma = 1.4 ;
phi = 4.8 ;
syms beta2
tantheta2 = tand(theta2 );
x = 2*cotd(beta2)*((M1^2*((sind(beta2)).^2)-1 ));
y = M1^2*(gamma+cosd(2*beta2))+2 ;
eqn2 = x/y ;
b0=1 ;
for ii=1:numel(theta2 )
T = tantheta2(ii );
clearvars result2
syms beta2
result2 = vpasolve(T== eqn2, beta2,b0 );
beta2 = vpa(result2 );
Mn1 = M1*sind(beta2); % Eqn 4.7 from Anderson’s
p2p1 = 1+((2*gamma)/(gamma+1))*(Mn1^2-1); % Eqn 4.9 from Anderson’s
Mn2sq= (Mn1^2+(2/(gamma-1)))/((2*gamma/(gamma-1))*Mn1^2-1);% Eqn 4.10 from Anderson’s
Mn2 = sqrt(Mn2sq );
M2 = Mn2/sind(beta2-theta2(ii ));
P2 = p2p1*P1 ;
P2_ALL{ii}=vpa(P2) ;
end
fplot(theta2,P2_ALL) Hello,
I want to plot the theta2 values on the x and presures (P2_ALL) on a plot. It seems my pressures are in symbolic form so Im using fplot to plot. When I do this it gives me an error. Does anyone know how to fix this?
clc; clearvars
format short g
M1 = 3 ;
P1 = 1 ;
theta2 = 1:1:30 ;
gamma = 1.4 ;
phi = 4.8 ;
syms beta2
tantheta2 = tand(theta2 );
x = 2*cotd(beta2)*((M1^2*((sind(beta2)).^2)-1 ));
y = M1^2*(gamma+cosd(2*beta2))+2 ;
eqn2 = x/y ;
b0=1 ;
for ii=1:numel(theta2 )
T = tantheta2(ii );
clearvars result2
syms beta2
result2 = vpasolve(T== eqn2, beta2,b0 );
beta2 = vpa(result2 );
Mn1 = M1*sind(beta2); % Eqn 4.7 from Anderson’s
p2p1 = 1+((2*gamma)/(gamma+1))*(Mn1^2-1); % Eqn 4.9 from Anderson’s
Mn2sq= (Mn1^2+(2/(gamma-1)))/((2*gamma/(gamma-1))*Mn1^2-1);% Eqn 4.10 from Anderson’s
Mn2 = sqrt(Mn2sq );
M2 = Mn2/sind(beta2-theta2(ii ));
P2 = p2p1*P1 ;
P2_ALL{ii}=vpa(P2) ;
end
fplot(theta2,P2_ALL) fplot, solutions, ploting MATLAB Answers — New Questions
How to create an LC parametric attenuation circuit in simulink.
The terminals are LC only, L=0.1H and C=0.25F with an initial voltage of 1V. The variable capacitor has an initial capacitance of 0.25F and is increased by 0.25F each time the voltage takes an extreme value. The judgment of the extreme value is made by the derivative block, which outputs an impulse signal when hitcrossing becomes 0. Q=CV, and since Q is conserved, C is increased so that V is attenuated.The circuit I am currently working on is as follows, but it does not work well.
The ideal graph is as follows.The terminals are LC only, L=0.1H and C=0.25F with an initial voltage of 1V. The variable capacitor has an initial capacitance of 0.25F and is increased by 0.25F each time the voltage takes an extreme value. The judgment of the extreme value is made by the derivative block, which outputs an impulse signal when hitcrossing becomes 0. Q=CV, and since Q is conserved, C is increased so that V is attenuated.The circuit I am currently working on is as follows, but it does not work well.
The ideal graph is as follows. The terminals are LC only, L=0.1H and C=0.25F with an initial voltage of 1V. The variable capacitor has an initial capacitance of 0.25F and is increased by 0.25F each time the voltage takes an extreme value. The judgment of the extreme value is made by the derivative block, which outputs an impulse signal when hitcrossing becomes 0. Q=CV, and since Q is conserved, C is increased so that V is attenuated.The circuit I am currently working on is as follows, but it does not work well.
The ideal graph is as follows. simulink, variable capacitor, lc MATLAB Answers — New Questions
How to save the graph obtained with Simulink’s scope as numerical data
I have plotted voltage and current using the scope. I want to save the waveforms as a table of time and voltage values with a sampling time of 0.001 seconds.I have plotted voltage and current using the scope. I want to save the waveforms as a table of time and voltage values with a sampling time of 0.001 seconds. I have plotted voltage and current using the scope. I want to save the waveforms as a table of time and voltage values with a sampling time of 0.001 seconds. simulink MATLAB Answers — New Questions
How to effectively solve the problem of incompatibility of AppDesigner using symbol toolkit syms after packaging and publishing into exe and other executable files?
%How to effectively solve the problem of incompatibility of AppDesigner using symbol toolkit syms after packaging and publishing into exe and other executable files? And how can I change it in my code
cla(app.UIAxes)
P=app.PEditField.Value
P=P.*pi/180;
c=app.CKPaEditField.Value;
K=app.KEditField.Value;%侧压力系数
P_ya=app.P_yaEditField.Value;
F=app.FEditField.Value;
y=app.yKNm3EditField.Value;
R = app.RmEditField.Value;
L=app.LmEditField.Value;
L_s=app.L_smEditField.Value;
syms pha H
term1 = 9 – 12 * (1 – P_ya .* F ./ (y .* H));
term2 = R .* sqrt(term1) – 3 .* R;
denominator = 2 .* H;
% 计算 pha
pha = atan(term2 ./ denominator);
% 显示结果
% disp(pha);
pha_rad=rad2deg(pha);
H_vals = linspace(50, 250, 50);
pha_vals = double(subs(pha_rad, H, H_vals));
% Plot H versus pha
% figure(1);
plot(app.UIAxes,H_vals, pha_vals, ‘b-‘, ‘LineWidth’, 2);
xlabel(app.UIAxes,’H’);
ylabel(app.UIAxes,’pha’);
title(app.UIAxes,’Plot of pha vs H’);
% grid on;
% disp(pha_rad);
%修正破裂角计算
if K <= 1
pha_rad = 45 – P / 2;
elseif K <= 2
pha_rad = 45;
else
pha_rad = 45 + P / 2;
end
% 限制 pha_rad 的值在 15° 和 65° 之间
pha_rad = max(15, min(pha_rad, 65));
pha_rad = pha_rad * (pi / 180);
switch app.DropDown.Value
case ‘竖直滑面法’
if app.Button_2.Value==1
Vc2=4.*pi.*R.^3+pi.*R.^2*(L-2.*R);%体积
Ac2=pi.*R.^2+(L-2.*R).*2.*R;
Lc2=2*pi.*R+(L-2*R).*2;%周长
sigma2=Lc2.*H.*K.*y.*H./2;
Fbc2=Vc2.*10;%
Fbr2=Ac2.*10.*(H-L_s);
F2=Ac2.*P_ya;
Wr2=y.*H.*Ac2;%
t2=Lc2.*c.*H+sigma2.*tan(P)
eq=Wr2+t2==F.*(F2+Fbc2+Fbr2)
H_solution = double(solve(eq, H));
positiveValues = H_solution(H_solution > 0);
app.HEditField.Value=positiveValues;
app.Image.ImageSource = ‘竖直滑面法示意图.png’; % 直接用路径
app.Image_2.ImageSource = ‘竖直滑面法示意图2.png’; % 直接用路径
elseif app.Button.Value==1
Vc1=4.*pi.*R.^3;%体积
Ac1=pi.*R.^2;%表面积
Lc1=2*pi.*R;%周长
sigma1=Lc1.*H.*K.*y.*H./2;%水平应力和∑σh
Fbc1=Vc1.*10;%硐室浮力
Fbr1=Ac1.*10.*(H-L_s);%岩体浮力
F1=Ac1.*P_ya;%上抬力
Wr1=y.*H.*Ac1;%重量
t1=Lc1.*c.*H+sigma1.*tan(P)
eq=Wr1+t1==F.*(F1+Fbc1+Fbr1)
H_solution = double(solve(eq, H));
positiveValues = H_solution(H_solution > 0);
app.HEditField.Value=positiveValues;
app.Image.ImageSource = ‘竖直滑面法示意图.png’; % 直接用路径
app.Image_2.ImageSource = ‘竖直滑面法示意图2.png’; % 直接用路径
end%How to effectively solve the problem of incompatibility of AppDesigner using symbol toolkit syms after packaging and publishing into exe and other executable files? And how can I change it in my code
cla(app.UIAxes)
P=app.PEditField.Value
P=P.*pi/180;
c=app.CKPaEditField.Value;
K=app.KEditField.Value;%侧压力系数
P_ya=app.P_yaEditField.Value;
F=app.FEditField.Value;
y=app.yKNm3EditField.Value;
R = app.RmEditField.Value;
L=app.LmEditField.Value;
L_s=app.L_smEditField.Value;
syms pha H
term1 = 9 – 12 * (1 – P_ya .* F ./ (y .* H));
term2 = R .* sqrt(term1) – 3 .* R;
denominator = 2 .* H;
% 计算 pha
pha = atan(term2 ./ denominator);
% 显示结果
% disp(pha);
pha_rad=rad2deg(pha);
H_vals = linspace(50, 250, 50);
pha_vals = double(subs(pha_rad, H, H_vals));
% Plot H versus pha
% figure(1);
plot(app.UIAxes,H_vals, pha_vals, ‘b-‘, ‘LineWidth’, 2);
xlabel(app.UIAxes,’H’);
ylabel(app.UIAxes,’pha’);
title(app.UIAxes,’Plot of pha vs H’);
% grid on;
% disp(pha_rad);
%修正破裂角计算
if K <= 1
pha_rad = 45 – P / 2;
elseif K <= 2
pha_rad = 45;
else
pha_rad = 45 + P / 2;
end
% 限制 pha_rad 的值在 15° 和 65° 之间
pha_rad = max(15, min(pha_rad, 65));
pha_rad = pha_rad * (pi / 180);
switch app.DropDown.Value
case ‘竖直滑面法’
if app.Button_2.Value==1
Vc2=4.*pi.*R.^3+pi.*R.^2*(L-2.*R);%体积
Ac2=pi.*R.^2+(L-2.*R).*2.*R;
Lc2=2*pi.*R+(L-2*R).*2;%周长
sigma2=Lc2.*H.*K.*y.*H./2;
Fbc2=Vc2.*10;%
Fbr2=Ac2.*10.*(H-L_s);
F2=Ac2.*P_ya;
Wr2=y.*H.*Ac2;%
t2=Lc2.*c.*H+sigma2.*tan(P)
eq=Wr2+t2==F.*(F2+Fbc2+Fbr2)
H_solution = double(solve(eq, H));
positiveValues = H_solution(H_solution > 0);
app.HEditField.Value=positiveValues;
app.Image.ImageSource = ‘竖直滑面法示意图.png’; % 直接用路径
app.Image_2.ImageSource = ‘竖直滑面法示意图2.png’; % 直接用路径
elseif app.Button.Value==1
Vc1=4.*pi.*R.^3;%体积
Ac1=pi.*R.^2;%表面积
Lc1=2*pi.*R;%周长
sigma1=Lc1.*H.*K.*y.*H./2;%水平应力和∑σh
Fbc1=Vc1.*10;%硐室浮力
Fbr1=Ac1.*10.*(H-L_s);%岩体浮力
F1=Ac1.*P_ya;%上抬力
Wr1=y.*H.*Ac1;%重量
t1=Lc1.*c.*H+sigma1.*tan(P)
eq=Wr1+t1==F.*(F1+Fbc1+Fbr1)
H_solution = double(solve(eq, H));
positiveValues = H_solution(H_solution > 0);
app.HEditField.Value=positiveValues;
app.Image.ImageSource = ‘竖直滑面法示意图.png’; % 直接用路径
app.Image_2.ImageSource = ‘竖直滑面法示意图2.png’; % 直接用路径
end %How to effectively solve the problem of incompatibility of AppDesigner using symbol toolkit syms after packaging and publishing into exe and other executable files? And how can I change it in my code
cla(app.UIAxes)
P=app.PEditField.Value
P=P.*pi/180;
c=app.CKPaEditField.Value;
K=app.KEditField.Value;%侧压力系数
P_ya=app.P_yaEditField.Value;
F=app.FEditField.Value;
y=app.yKNm3EditField.Value;
R = app.RmEditField.Value;
L=app.LmEditField.Value;
L_s=app.L_smEditField.Value;
syms pha H
term1 = 9 – 12 * (1 – P_ya .* F ./ (y .* H));
term2 = R .* sqrt(term1) – 3 .* R;
denominator = 2 .* H;
% 计算 pha
pha = atan(term2 ./ denominator);
% 显示结果
% disp(pha);
pha_rad=rad2deg(pha);
H_vals = linspace(50, 250, 50);
pha_vals = double(subs(pha_rad, H, H_vals));
% Plot H versus pha
% figure(1);
plot(app.UIAxes,H_vals, pha_vals, ‘b-‘, ‘LineWidth’, 2);
xlabel(app.UIAxes,’H’);
ylabel(app.UIAxes,’pha’);
title(app.UIAxes,’Plot of pha vs H’);
% grid on;
% disp(pha_rad);
%修正破裂角计算
if K <= 1
pha_rad = 45 – P / 2;
elseif K <= 2
pha_rad = 45;
else
pha_rad = 45 + P / 2;
end
% 限制 pha_rad 的值在 15° 和 65° 之间
pha_rad = max(15, min(pha_rad, 65));
pha_rad = pha_rad * (pi / 180);
switch app.DropDown.Value
case ‘竖直滑面法’
if app.Button_2.Value==1
Vc2=4.*pi.*R.^3+pi.*R.^2*(L-2.*R);%体积
Ac2=pi.*R.^2+(L-2.*R).*2.*R;
Lc2=2*pi.*R+(L-2*R).*2;%周长
sigma2=Lc2.*H.*K.*y.*H./2;
Fbc2=Vc2.*10;%
Fbr2=Ac2.*10.*(H-L_s);
F2=Ac2.*P_ya;
Wr2=y.*H.*Ac2;%
t2=Lc2.*c.*H+sigma2.*tan(P)
eq=Wr2+t2==F.*(F2+Fbc2+Fbr2)
H_solution = double(solve(eq, H));
positiveValues = H_solution(H_solution > 0);
app.HEditField.Value=positiveValues;
app.Image.ImageSource = ‘竖直滑面法示意图.png’; % 直接用路径
app.Image_2.ImageSource = ‘竖直滑面法示意图2.png’; % 直接用路径
elseif app.Button.Value==1
Vc1=4.*pi.*R.^3;%体积
Ac1=pi.*R.^2;%表面积
Lc1=2*pi.*R;%周长
sigma1=Lc1.*H.*K.*y.*H./2;%水平应力和∑σh
Fbc1=Vc1.*10;%硐室浮力
Fbr1=Ac1.*10.*(H-L_s);%岩体浮力
F1=Ac1.*P_ya;%上抬力
Wr1=y.*H.*Ac1;%重量
t1=Lc1.*c.*H+sigma1.*tan(P)
eq=Wr1+t1==F.*(F1+Fbc1+Fbr1)
H_solution = double(solve(eq, H));
positiveValues = H_solution(H_solution > 0);
app.HEditField.Value=positiveValues;
app.Image.ImageSource = ‘竖直滑面法示意图.png’; % 直接用路径
app.Image_2.ImageSource = ‘竖直滑面法示意图2.png’; % 直接用路径
end matlab gui MATLAB Answers — New Questions
Can anyone help me in understanding of deconvolution based on toeplitz matrix?
First of all, d is a trace whose size is (1,2500), p is a trace whose size is (1,2500).
For d*w=p, which is Dw=p, where D is Toeplitz matrix made by d. Take d and p as an example [1 2 3 4 5].
I construct D that the first column is [1 2 3 4 5 0 0 0 0], the first row is [1 0 0 0 0], which means d lags 2 time step up and 2 time step down, the 0 time lag is place 3 when the first place is 1.
To find w, I use deconvolution, therefore, w=((D^T)D)^(-1)(D^T)p
Confusion comes in here. the number of row of D is 9, however, the p is (1,5) size, how should I concatenate p using 0? Just under the last element of p or two 0 before and two 0 behind?
What I really want to know is the exact form of deconvoution in programs. Really Really appraciate it if anyone could help. Please!First of all, d is a trace whose size is (1,2500), p is a trace whose size is (1,2500).
For d*w=p, which is Dw=p, where D is Toeplitz matrix made by d. Take d and p as an example [1 2 3 4 5].
I construct D that the first column is [1 2 3 4 5 0 0 0 0], the first row is [1 0 0 0 0], which means d lags 2 time step up and 2 time step down, the 0 time lag is place 3 when the first place is 1.
To find w, I use deconvolution, therefore, w=((D^T)D)^(-1)(D^T)p
Confusion comes in here. the number of row of D is 9, however, the p is (1,5) size, how should I concatenate p using 0? Just under the last element of p or two 0 before and two 0 behind?
What I really want to know is the exact form of deconvoution in programs. Really Really appraciate it if anyone could help. Please! First of all, d is a trace whose size is (1,2500), p is a trace whose size is (1,2500).
For d*w=p, which is Dw=p, where D is Toeplitz matrix made by d. Take d and p as an example [1 2 3 4 5].
I construct D that the first column is [1 2 3 4 5 0 0 0 0], the first row is [1 0 0 0 0], which means d lags 2 time step up and 2 time step down, the 0 time lag is place 3 when the first place is 1.
To find w, I use deconvolution, therefore, w=((D^T)D)^(-1)(D^T)p
Confusion comes in here. the number of row of D is 9, however, the p is (1,5) size, how should I concatenate p using 0? Just under the last element of p or two 0 before and two 0 behind?
What I really want to know is the exact form of deconvoution in programs. Really Really appraciate it if anyone could help. Please! deconvolution, toeplitz matrix, digital signal processing MATLAB Answers — New Questions
stepper motor control
hi to all,
i am currently doing a project on robotic arm. i have successfully connect and run my motor through serial port. but now i need to control the robotic arm to move to a desired position..can someone give me any idea on how to do that??..do i need to control the speed as well??
thanks a lot in advancehi to all,
i am currently doing a project on robotic arm. i have successfully connect and run my motor through serial port. but now i need to control the robotic arm to move to a desired position..can someone give me any idea on how to do that??..do i need to control the speed as well??
thanks a lot in advance hi to all,
i am currently doing a project on robotic arm. i have successfully connect and run my motor through serial port. but now i need to control the robotic arm to move to a desired position..can someone give me any idea on how to do that??..do i need to control the speed as well??
thanks a lot in advance gui, robot, power_electronics_control, electric_motor_control MATLAB Answers — New Questions
Getting list of sharepoint pages in a collection returns 403
I have these permissions on a service account:
1. With this service account’s clientId and clientSecret, I call GET https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/token to get an access_token.
2. I use this access_token to call POST https://<domain>.sharepoint.com/sites/<siteCollection>/_api/web but get a 401.
{
“error_description”: “Exception of type ‘Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException’ was thrown.”
}
So I have two questions:
1. Do I not have the right permissions? The Sites.Selected should include the <sitecollection>.
2. What permissions do I need to get a 200?
I have these permissions on a service account:1. With this service account’s clientId and clientSecret, I call GET https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/token to get an access_token.2. I use this access_token to call POST https://<domain>.sharepoint.com/sites/<siteCollection>/_api/web but get a 401.{“error_description”: “Exception of type ‘Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException’ was thrown.”}So I have two questions:1. Do I not have the right permissions? The Sites.Selected should include the <sitecollection>.2. What permissions do I need to get a 200? Read More
Range borders in Excel
Hi,
Trying to add a simple Border around a table in Excel using Graph.
i tried multiple combinations from API docs but i cant get it to work 😞
any help would be greatly appreciated.
Trying this command (i know its not documented on the api page, but almost non of them are when it comes to sharepoint access)
Hi, Trying to add a simple Border around a table in Excel using Graph. i tried multiple combinations from API docs but i cant get it to work 😞 any help would be greatly appreciated. Trying this command (i know its not documented on the api page, but almost non of them are when it comes to sharepoint access) $url= “https://graph.microsoft.com/v1.0/drives/{drv}/items/{id}/workbook/worksheets/sheet1/range(address=’B3:C4′)/format/borders(edgeLeft)” pushing this simple body $body='[{“color”:”#000000″,”style”:”Continuous”,”weight”:”Medium”}]’ getting a BadRequest Back… i’m sure its a small detail i’m missing…. Read More