Month: June 2024
Error in demodulation QAM-16 signal
% This code, after demodulation, produces a sequence of 4 values, although the number of values should be equal to the modulation factor M. What could be the problem?
clc
close all
clear all
M = 16;
L=10000;
T=10;
W=43; %SNR
bits1 = randi([0 M-1], 1, L);
bits2 = randi([0 3], 1, L/T);
mod1 = qammod(bits1, M,’UnitAveragePower’, true);
% scatterplot(mod1)
mod2 = qammod(bits2, 4, ‘UnitAveragePower’,true);
% scatterplot(mod2)
for i = 1:length(bits2)
sym(i,:)=[mod1((i-1)*T+1:i*T) mod2(i)];
end
f=0;
for k=1:L/T
for j=1:T+1
f=f+1;
symbols(f)=sym(k,j);
end
end
% scatterplot(symbols)
% symbols = awgn(symbols,W,"measured");
pnoise = comm.PhaseNoise(‘Level’,[-70 -104 -110],’FrequencyOffset’,[1e4 1e5 2e5], ‘SampleRate’, 28e6);
symbols2 = pnoise([zeros(1e5,1);symbols’]);
% symbols2 = pnoise(symbols);
fc = 1e6; % Carrier frequency in Hz
fs = 28e6; % Sample rate in Hz.
phNzLevel = [-70 -104 -110]; % in dBc/Hz
phNzFreqOff = [1e4 1e5 2e5]; % in Hz
Nspf = 6e6; % Number of Samples per frame
freqSpan = 400e3; % in Hz, for spectrum computation
sinewave = dsp.SineWave( …
Amplitude=1, …
Frequency=fc, …
SampleRate=fs, …
SamplesPerFrame=Nspf, …
ComplexOutput=true);
pnoise = comm.PhaseNoise( …
Level=phNzLevel, …
FrequencyOffset=phNzFreqOff, …
SampleRate=fs);
sascopeRBW100 = spectrumAnalyzer( …
SampleRate=fs, …
Method="welch", …
FrequencySpan="Span and center frequency", …
CenterFrequency=fc, …
Span=freqSpan, …
RBWSource="Property", …
RBW=100, …
SpectrumType="Power density", …
SpectralAverages=10, …
SpectrumUnits="dBW", …
YLimits=[-150 10], …
Title="Resolution Bandwidth 100 Hz", …
ChannelNames={‘signal’,’signal with phase noise’}, …
Position=[79 147 605 374]);
x = sinewave();
y = pnoise(x);
sascopeRBW100(x,y)
symbols2 = symbols2(1e5+1:end);
prim(1,:)=symbols2(1:T);
for i = 1:length(bits2)-1
prim(i+1,:)=symbols2(i*T+i+1:i*T+i+T);
end
for b = 1:length(mod2)
qam4(b)=symbols2((T+1)*b);
end
h=0;
for u=1:L/T
for l=1:T
h=h+1;
priem(h)=prim(u,l);
end
end
for g = 1:L/T
phase_error(g) = angle(qam4(g) / mod2(g));
compensated4(g) = qam4(g) .* exp(-1i * phase_error(g));
end
for v = 1:L/T
phase_errorM((v-1)*T+1:v*T)=phase_error(v);
end
for f = 1:L
compensatedM(f) = priem(f) .* exp(-1i*phase_errorM(f));
end
demod=qamdemod(compensatedM, M, ‘bin’,’OutputType’,’bit’);
% scatterplot(qam4)
% scatterplot(symbols2)
% scatterplot(compensatedM)
[number,ratio]=biterr(bits1,demod);
evm = lteEVM(demod,bits1);
figure(‘Position’,[200 200 1080 540])
subplot(1,2,1)
scatter(real(symbols2),imag(symbols2),300,".")
subplot(1,2,2)
scatter(real(compensatedM),imag(compensatedM),300,".")% This code, after demodulation, produces a sequence of 4 values, although the number of values should be equal to the modulation factor M. What could be the problem?
clc
close all
clear all
M = 16;
L=10000;
T=10;
W=43; %SNR
bits1 = randi([0 M-1], 1, L);
bits2 = randi([0 3], 1, L/T);
mod1 = qammod(bits1, M,’UnitAveragePower’, true);
% scatterplot(mod1)
mod2 = qammod(bits2, 4, ‘UnitAveragePower’,true);
% scatterplot(mod2)
for i = 1:length(bits2)
sym(i,:)=[mod1((i-1)*T+1:i*T) mod2(i)];
end
f=0;
for k=1:L/T
for j=1:T+1
f=f+1;
symbols(f)=sym(k,j);
end
end
% scatterplot(symbols)
% symbols = awgn(symbols,W,"measured");
pnoise = comm.PhaseNoise(‘Level’,[-70 -104 -110],’FrequencyOffset’,[1e4 1e5 2e5], ‘SampleRate’, 28e6);
symbols2 = pnoise([zeros(1e5,1);symbols’]);
% symbols2 = pnoise(symbols);
fc = 1e6; % Carrier frequency in Hz
fs = 28e6; % Sample rate in Hz.
phNzLevel = [-70 -104 -110]; % in dBc/Hz
phNzFreqOff = [1e4 1e5 2e5]; % in Hz
Nspf = 6e6; % Number of Samples per frame
freqSpan = 400e3; % in Hz, for spectrum computation
sinewave = dsp.SineWave( …
Amplitude=1, …
Frequency=fc, …
SampleRate=fs, …
SamplesPerFrame=Nspf, …
ComplexOutput=true);
pnoise = comm.PhaseNoise( …
Level=phNzLevel, …
FrequencyOffset=phNzFreqOff, …
SampleRate=fs);
sascopeRBW100 = spectrumAnalyzer( …
SampleRate=fs, …
Method="welch", …
FrequencySpan="Span and center frequency", …
CenterFrequency=fc, …
Span=freqSpan, …
RBWSource="Property", …
RBW=100, …
SpectrumType="Power density", …
SpectralAverages=10, …
SpectrumUnits="dBW", …
YLimits=[-150 10], …
Title="Resolution Bandwidth 100 Hz", …
ChannelNames={‘signal’,’signal with phase noise’}, …
Position=[79 147 605 374]);
x = sinewave();
y = pnoise(x);
sascopeRBW100(x,y)
symbols2 = symbols2(1e5+1:end);
prim(1,:)=symbols2(1:T);
for i = 1:length(bits2)-1
prim(i+1,:)=symbols2(i*T+i+1:i*T+i+T);
end
for b = 1:length(mod2)
qam4(b)=symbols2((T+1)*b);
end
h=0;
for u=1:L/T
for l=1:T
h=h+1;
priem(h)=prim(u,l);
end
end
for g = 1:L/T
phase_error(g) = angle(qam4(g) / mod2(g));
compensated4(g) = qam4(g) .* exp(-1i * phase_error(g));
end
for v = 1:L/T
phase_errorM((v-1)*T+1:v*T)=phase_error(v);
end
for f = 1:L
compensatedM(f) = priem(f) .* exp(-1i*phase_errorM(f));
end
demod=qamdemod(compensatedM, M, ‘bin’,’OutputType’,’bit’);
% scatterplot(qam4)
% scatterplot(symbols2)
% scatterplot(compensatedM)
[number,ratio]=biterr(bits1,demod);
evm = lteEVM(demod,bits1);
figure(‘Position’,[200 200 1080 540])
subplot(1,2,1)
scatter(real(symbols2),imag(symbols2),300,".")
subplot(1,2,2)
scatter(real(compensatedM),imag(compensatedM),300,".") % This code, after demodulation, produces a sequence of 4 values, although the number of values should be equal to the modulation factor M. What could be the problem?
clc
close all
clear all
M = 16;
L=10000;
T=10;
W=43; %SNR
bits1 = randi([0 M-1], 1, L);
bits2 = randi([0 3], 1, L/T);
mod1 = qammod(bits1, M,’UnitAveragePower’, true);
% scatterplot(mod1)
mod2 = qammod(bits2, 4, ‘UnitAveragePower’,true);
% scatterplot(mod2)
for i = 1:length(bits2)
sym(i,:)=[mod1((i-1)*T+1:i*T) mod2(i)];
end
f=0;
for k=1:L/T
for j=1:T+1
f=f+1;
symbols(f)=sym(k,j);
end
end
% scatterplot(symbols)
% symbols = awgn(symbols,W,"measured");
pnoise = comm.PhaseNoise(‘Level’,[-70 -104 -110],’FrequencyOffset’,[1e4 1e5 2e5], ‘SampleRate’, 28e6);
symbols2 = pnoise([zeros(1e5,1);symbols’]);
% symbols2 = pnoise(symbols);
fc = 1e6; % Carrier frequency in Hz
fs = 28e6; % Sample rate in Hz.
phNzLevel = [-70 -104 -110]; % in dBc/Hz
phNzFreqOff = [1e4 1e5 2e5]; % in Hz
Nspf = 6e6; % Number of Samples per frame
freqSpan = 400e3; % in Hz, for spectrum computation
sinewave = dsp.SineWave( …
Amplitude=1, …
Frequency=fc, …
SampleRate=fs, …
SamplesPerFrame=Nspf, …
ComplexOutput=true);
pnoise = comm.PhaseNoise( …
Level=phNzLevel, …
FrequencyOffset=phNzFreqOff, …
SampleRate=fs);
sascopeRBW100 = spectrumAnalyzer( …
SampleRate=fs, …
Method="welch", …
FrequencySpan="Span and center frequency", …
CenterFrequency=fc, …
Span=freqSpan, …
RBWSource="Property", …
RBW=100, …
SpectrumType="Power density", …
SpectralAverages=10, …
SpectrumUnits="dBW", …
YLimits=[-150 10], …
Title="Resolution Bandwidth 100 Hz", …
ChannelNames={‘signal’,’signal with phase noise’}, …
Position=[79 147 605 374]);
x = sinewave();
y = pnoise(x);
sascopeRBW100(x,y)
symbols2 = symbols2(1e5+1:end);
prim(1,:)=symbols2(1:T);
for i = 1:length(bits2)-1
prim(i+1,:)=symbols2(i*T+i+1:i*T+i+T);
end
for b = 1:length(mod2)
qam4(b)=symbols2((T+1)*b);
end
h=0;
for u=1:L/T
for l=1:T
h=h+1;
priem(h)=prim(u,l);
end
end
for g = 1:L/T
phase_error(g) = angle(qam4(g) / mod2(g));
compensated4(g) = qam4(g) .* exp(-1i * phase_error(g));
end
for v = 1:L/T
phase_errorM((v-1)*T+1:v*T)=phase_error(v);
end
for f = 1:L
compensatedM(f) = priem(f) .* exp(-1i*phase_errorM(f));
end
demod=qamdemod(compensatedM, M, ‘bin’,’OutputType’,’bit’);
% scatterplot(qam4)
% scatterplot(symbols2)
% scatterplot(compensatedM)
[number,ratio]=biterr(bits1,demod);
evm = lteEVM(demod,bits1);
figure(‘Position’,[200 200 1080 540])
subplot(1,2,1)
scatter(real(symbols2),imag(symbols2),300,".")
subplot(1,2,2)
scatter(real(compensatedM),imag(compensatedM),300,".") qam16, demodulation, ber MATLAB Answers — New Questions
Sending HoloLens 2 video stream through Roboflow API
Hello everyone,
I’m currently working on a mixed reality project for the HoloLens 2, which involves the use of a computer vision model for the recognition of some shop-floor equipment and parts. My team has trained this model in Roboflow, using the data we’ve collected in a factory.
However, we’re not sure how to integrate this model to the HoloLens. We thought it could be a good idea to access the HoloLens’ video stream in order to send it to the CV model through the Roboflow API, and get the result back, in runtime. So we’re looking at Microsoft’s CV samples for the HoloLens 2, which includes a “StreamRecorder” sample. However, this sample saves the stream in a raw format, which would need to be converted before sending it to the CV model.
We’re actually not even sure if using this sample as a basis is the best way to do what we want, so we’re a bit lost at the moment. Has anyone here tried accessing the Roboflow API from a HoloLens 2? How would be the best way to go about it?
Thanks in advance.
Hello everyone, I’m currently working on a mixed reality project for the HoloLens 2, which involves the use of a computer vision model for the recognition of some shop-floor equipment and parts. My team has trained this model in Roboflow, using the data we’ve collected in a factory. However, we’re not sure how to integrate this model to the HoloLens. We thought it could be a good idea to access the HoloLens’ video stream in order to send it to the CV model through the Roboflow API, and get the result back, in runtime. So we’re looking at Microsoft’s CV samples for the HoloLens 2, which includes a “StreamRecorder” sample. However, this sample saves the stream in a raw format, which would need to be converted before sending it to the CV model. We’re actually not even sure if using this sample as a basis is the best way to do what we want, so we’re a bit lost at the moment. Has anyone here tried accessing the Roboflow API from a HoloLens 2? How would be the best way to go about it? Thanks in advance. Read More
Show a Plan as a Tab inside Teams Channel is no more working using Graph API, any advice?
I have this work flow which create a new Team Channel + create a new Planner Plan + show the Planner Plan as a tab inside the Team Channel. this was working well for around 6 months, but recently it stop working as expected.
Here is my workflow which uses Graph API:-
here is the “Body of the request” for showing the plan as a tab inside channel action:-
{
“displayName”: “@{outputs(‘Compose_-_Friendly_Planner_Name’)}”,
“email address removed for privacy reasons”: “https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.planner”,
“configuration”: {
“entityId”: “@{body(‘Invoke_an_HTTP_request_-_Create_new_Channel’)?[‘id’]}”,
“contentUrl”: “https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=7&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=@{variables(‘PlannerID’)}&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}”,
“removeUrl”: “https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=13&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=@{variables(‘PlannerID’)}&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}”,
“websiteUrl”: “https://tasks.office.com/{tid}/Home/PlanViews/@{variables(‘PlannerID’)}?Type=PlanLink&Channel=TeamsTab”
}
}
Currently when i click on the new tab i will not get the new planner tasks, i will rather get “My Tasks”,as follow:-
previously i use to get the related Planner tasks as follow:-
any advice, why this is no loner working as it use to be?
Thanks
I have this work flow which create a new Team Channel + create a new Planner Plan + show the Planner Plan as a tab inside the Team Channel. this was working well for around 6 months, but recently it stop working as expected. Here is my workflow which uses Graph API:- here is the “Body of the request” for showing the plan as a tab inside channel action:-{
“displayName”: “@{outputs(‘Compose_-_Friendly_Planner_Name’)}”,
“email address removed for privacy reasons”: “https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.planner”,
“configuration”: {
“entityId”: “@{body(‘Invoke_an_HTTP_request_-_Create_new_Channel’)?[‘id’]}”,
“contentUrl”: “https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=7&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=@{variables(‘PlannerID’)}&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}”,
“removeUrl”: “https://tasks.teams.microsoft.com/teamsui/{tid}/Home/PlannerFrame?page=13&auth_pvr=OrgId&auth_upn={userPrincipalName}&groupId={groupId}&planId=@{variables(‘PlannerID’)}&channelId={channelId}&entityId={entityId}&tid={tid}&userObjectId={userObjectId}&subEntityId={subEntityId}&sessionId={sessionId}&theme={theme}&mkt={locale}&ringId={ringId}&PlannerRouteHint={tid}”,
“websiteUrl”: “https://tasks.office.com/{tid}/Home/PlanViews/@{variables(‘PlannerID’)}?Type=PlanLink&Channel=TeamsTab”
}
} Currently when i click on the new tab i will not get the new planner tasks, i will rather get “My Tasks”,as follow:- previously i use to get the related Planner tasks as follow:- any advice, why this is no loner working as it use to be? Thanks Read More
How we can filter all the tasks from all the Plans based on the assgined user
We have a Teams which contain around 40++ planner plans. The managers are facing troubles when they want to see all the tasks from all the planner plans assigned to certain user. Currently to do this, they need to go to each individual plan and do the filter, is there any built-in or using sharepoint web parts to be able to filter all the tasks from different plans based on the assigned to user?
Thanks
We have a Teams which contain around 40++ planner plans. The managers are facing troubles when they want to see all the tasks from all the planner plans assigned to certain user. Currently to do this, they need to go to each individual plan and do the filter, is there any built-in or using sharepoint web parts to be able to filter all the tasks from different plans based on the assigned to user? Thanks Read More
Web part to filter planner plans based on the Assigned To user?
We have a Teams which contain around 40++ planner plans. The managers are facing troubles when they want to see all the tasks from all the planner plans assigned to certain user. Currently to do this, they need to go to each individual plan and do the filter, is there any built-in or using sharepoint web parts to be able to filter all the tasks from different plans based on the assigned to user?
can we for example benefit from modern search web part to achieve this? or any other web parts?
We have a Teams which contain around 40++ planner plans. The managers are facing troubles when they want to see all the tasks from all the planner plans assigned to certain user. Currently to do this, they need to go to each individual plan and do the filter, is there any built-in or using sharepoint web parts to be able to filter all the tasks from different plans based on the assigned to user? can we for example benefit from modern search web part to achieve this? or any other web parts? Read More
Forgotten Password to unlock Excel Spreadsheet
Help Please!
We must have typed in the wrong password (twice??) to lock an Excel spreadsheet.
How do I get back in???
It must have been mis-typed twice, but we can’t recover it now, and have tried all variations of the regular password. 🙁
THANK YOU!
Help Please!We must have typed in the wrong password (twice??) to lock an Excel spreadsheet.How do I get back in???It must have been mis-typed twice, but we can’t recover it now, and have tried all variations of the regular password. 🙁 THANK YOU! Read More
Updates from the 162.3 release of SqlPackage and the DacFx ecosystem
The quarterly release cadence for SqlPackage and DacFx continues with the 162.3.563 release on June 6, 2024. The most notable change in this version is the preview release of a target platform for Fabric mirrored SQL databases. The 162.3.563 release also includes fixes related to script parsing (ScriptDOM) and deployments. Read more about the fixes in the SqlPackage release notes.
Target platforms in SQL projects
SQL projects are a logical framework around your database code and this sets the foundation for two development capabilities:
Build-time validation of references between objects and the syntax against a specific version of SQL
Deployment of the build artifact to new or existing databases
When a SQL project is built, the relationships between objects contained in the project files are validated. For example, the columns or tables referenced in a view definition must exist in the SQL project.
Additionally, a SQL project contains a property called the “target platform” in the DSP element of the .sqlproj file. This setting is used during the build process to validate that the functions and T-SQL syntax is supported in the specified version of SQL. For example, the JSON functions added in SQL Server 2022 cannot be used in a SQL project set to the SQL Server 2017 (Sql140DatabaseSchemaProvider) target platform.
Mirroring your SQL database to Microsoft Fabric provides a streamlined experience to avoid complex ETL (Extract Transform Load) and integrate existing your Azure SQL Database estate with the rest of your data in Microsoft Fabric. In the new target platform for “Fabric mirrored SQL database (preview)” (SqlDbFabricDatabaseSchemaProvider) added in DacFx 162.3.563, the tables in the SQL project are validated for compatibility with mirroring to Microsoft Fabric. Having a target platform for a mirrored SQL database means that you can develop your Azure SQL application with confidence that the application’s data will be available for analytics with minimal additional effort.
The target platform is available immediately for use with SDK-style projects with the Microsoft.Build.Sql project SDK version 0.1.19-preview. Your existing SDK-style SQL projects can be moved from the Azure SQL Database target platform to the Fabric mirrored SQL database (preview) target platform by updating the version of the Sdk to 0.1.19-preview (line 3 below) and the DSP (target platform) to SqlDbFabricDatabaseSchemaProvider (line 7 below). For a walkthrough of mirroring your Azure SQL Database to Microsoft Fabric, check out the tutorial.
The “Fabric mirrored SQL database (preview)” target platform will be available directly in the SQL projects extension for VS Code and Azure Data Studio as well as Visual Studio in the upcoming months. In the meantime, SQL projects can be built and deployed with the new target platform from the command line with dotnet build and SqlPackage.
SqlPackage and SQL projects on arm64
GitHub recently announced arm64 actions runners with the initial availability in public preview of images built on Ubuntu 22.04. Whether you’re using the recently launched arm64 runners, an Apple M-series workstation, or one of the arm-powered Surface devices the base requirements for working with SqlPackage and SDK-style SQL projects remain the same – the .NET SDK must be installed. The current Ubuntu 22.04 arm64 preview image includes the .NET SDK.
With the .NET SDK installed in an arm64 environment such as the GitHub actions arm64 runners, your SQL development workflow can leverage the same commands as x64 environments. Dotnet build is still used to create a dacpac from a SQL project, but you may need to install SqlPackage as a dotnet tool to perform additional actions:
dotnet install -g microsoft.sqlpackage
Once SqlPackage is installed it can be used as usual, including deploying (publish) a dacpac to update the schema a database or to extract the objects in a database out to files.
# publish
sqlpackage /Action:Publish /SourceFile:bin/Debug/AdventureWorks.dacpac /TargetConnectionString:<YourConnectionString>
# extract
sqlpackage /Action:Extract /SourceConnectionString:<YourConnectionString> /TargetFile:AdventureWorks /p:ExtractTarget=SchemaObjectType
For developers interested in continuing to use the original SQL projects in Visual Studio, we also note that SQL Server Data Tools (SSDT) has been released for Visual Studio on arm64.
.gitignore with SQL projects
You may recall about a year ago we introduced project templates for quickly starting a new SQL project from the command line. Earlier this year an option was added to the templates (-g) which includes a default gitignore file with a new SQL project. With a .gitignore file you can avoid accidentally checking cached binaries in the bin and obj folders into source control and minimize noise in your source control history.
Installing the SQL project templates and creating a new SQL project with the Fabric mirrored SQL database (preview) target platform and a gitignore file is completed with these two commands:
dotnet new install Microsoft.Build.Sql.Templates
dotnet new sqlproj -n “AdventureWorksLT” -tp “SqlDbFabric” -g
Ways to get involved
In early 2024, we added preview releases of SqlPackage to the dotnet tool feed, such that not only do you have early access to DacFx changes but you can directly test SqlPackage as well. Eagle-eyed readers will notice that the last preview release prior to the full release only differs by a single patch build. Get the quick instructions on installing and updating the preview releases in the SqlPackage documentation.
All are welcome to stop by the GitHub repository to provide feedback, whether it is bug reports, questions, or enhancement suggestions. Here are a few recent feature suggestions you might want to weigh in on:
Support for dotnet publish https://github.com/microsoft/DacFx/issues/447
Composite projects in schema comparison https://github.com/microsoft/DacFx/issues/437
Automatic skipping of Windows logins https://github.com/microsoft/DacFx/issues/426
Microsoft Tech Community – Latest Blogs –Read More
Serdes toolbox adapted results log
I generated an IBIS-AMI model using the serdes toolbox. After running the model in Keysight ADS, i can’t figureout where the final CTLE and DFE adapted values are logged. How can I find out to what value the CTLE and DFE converged too?
ThanksI generated an IBIS-AMI model using the serdes toolbox. After running the model in Keysight ADS, i can’t figureout where the final CTLE and DFE adapted values are logged. How can I find out to what value the CTLE and DFE converged too?
Thanks I generated an IBIS-AMI model using the serdes toolbox. After running the model in Keysight ADS, i can’t figureout where the final CTLE and DFE adapted values are logged. How can I find out to what value the CTLE and DFE converged too?
Thanks serdes, serdes toolbox, ibis-ami MATLAB Answers — New Questions
Plotting the Evolution of Spatially Localized Initial Conditions for Discrete Klein-Gordon Equation
Ιn continuation of the study with which I have been fascinated Numerical Simulation of a Damped, Driven Nonlinear Wave System with Spatially Extended Initial Conditions
Now we examine the role of damping in the structure of the branches of equilibrium points. In this study, we consider localized initial conditions of the form:
where is the distance between the nodes, and is the amplitude. We assume zero initial velocity
We also note that if we consider an infinite chain, the initial conditions $(1)$ satisfy the Dirichlet boundary conditions only asymptotically. However, since the smallest half-length of the chain has been set to $ L/2 = 100$, the error is of the order of $ 10^{-44} $, which does not affect numerical computations.
The figure shows the dynamics of the initial condition (1) for parameters: and . In the first image of Figure, we observe the profile of the initial condition.
The subsequent images show the dynamics of the system for different values of the damping force . For , the convergence takes place at the equilibrium point which is the basic state.
I want to create the red and the blue plots
Now I have tried but as you can see the result are different. What should I change?
% Parameters
L = 200; % Length of the system
K = 99; % Number of spatial points
omega_d = 1; % Characteristic frequency
beta = 1; % Nonlinearity parameter
delta_values = [0.1, 0.05, 0.01]; % Damping coefficients
% Spatial grid
h = L / (K + 1);
n = linspace(-L/2, L/2, K+1); % Spatial points
N = length(n);
omegaDScaled = h * omega_d;
% Time parameters
dt = 1; % Time step
tmax = 3000; % Maximum time
tspan = 0:dt:tmax; % Time vector
% Values of amplitude ‘a’ to iterate over
a_values = [2]; % Initial amplitude for the initial condition plot
% Differential equation solver function
function dYdt = odefun(~, Y, N, h, omegaDScaled, deltaScaled, beta)
U = Y(1:N);
Udot = Y(N+1:end);
Uddot = zeros(size(U));
% Laplacian (discrete second derivative)
for k = 2:N-1
Uddot(k) = (U(k+1) – 2 * U(k) + U(k-1)) ;
end
% System of equations
dUdt = Udot;
dUdotdt = Uddot – deltaScaled * Udot + omegaDScaled^2 * (U – beta * U.^3);
% Pack derivatives
dYdt = [dUdt; dUdotdt];
end
% Create a figure for subplots
figure;
% Loop through each value of ‘delta’ and generate the plot
for i = 1:length(delta_values)
delta = delta_values(i);
deltaScaled = h * delta;
a = a_values(1);
% Initial conditions
U0 = a * sech(-L/2 + n*h); % Initial displacement
U0(1) = 0; % Boundary condition at n = 0
U0(end) = 0; % Boundary condition at n = K+1
Udot0 = zeros(size(U0)); % Initial velocity
% Pack initial conditions
Y0 = [U0, Udot0];
% Solve ODE
opts = odeset(‘RelTol’, 1e-5, ‘AbsTol’, 1e-6);
[t, Y] = ode45(@(t, Y) odefun(t, Y, N, h, omegaDScaled, deltaScaled, beta), tspan, Y0, opts);
% Extract solutions
U = Y(:, 1:N);
Udot = Y(:, N+1:end);
% Plot final displacement profile
subplot(2, 2, i+1);
plot(n, U(end,:), ‘b.-‘, ‘LineWidth’, 1.5, ‘MarkerSize’, 10); % Line and marker plot
xlabel(‘$x_n$’, ‘Interpreter’, ‘latex’);
ylabel(‘$U_n$’, ‘Interpreter’, ‘latex’);
title([‘$t=3000$, $delta=’, num2str(delta), ‘$’], ‘Interpreter’, ‘latex’);
set(gca, ‘FontSize’, 12, ‘FontName’, ‘Times’);
xlim([-L/2 L/2]);
ylim([-2 2]);
grid on;
end
% Initial plot
subplot(2, 2, 1);
a_init = 2; % Example initial amplitude for the initial condition plot
U0_init = a_init * sech(-L/2 + n*h); % Initial displacement
U0_init(1) = 0; % Boundary condition at n = 0
U0_init(end) = 0; % Boundary condition at n = K+1
plot(n, U0_init, ‘r.-‘, ‘LineWidth’, 1.5, ‘MarkerSize’, 10); % Line and marker plot
xlabel(‘$x_n$’, ‘Interpreter’, ‘latex’);
ylabel(‘$U_n$’, ‘Interpreter’, ‘latex’);
title(‘$t=0$’, ‘Interpreter’, ‘latex’);
set(gca, ‘FontSize’, 12, ‘FontName’, ‘Times’);
xlim([-L/2 L/2]);
ylim([-3 3]);
grid on;
% Adjust layout
set(gcf, ‘Position’, [100, 100, 1200, 900]); % Adjust figure size as neededΙn continuation of the study with which I have been fascinated Numerical Simulation of a Damped, Driven Nonlinear Wave System with Spatially Extended Initial Conditions
Now we examine the role of damping in the structure of the branches of equilibrium points. In this study, we consider localized initial conditions of the form:
where is the distance between the nodes, and is the amplitude. We assume zero initial velocity
We also note that if we consider an infinite chain, the initial conditions $(1)$ satisfy the Dirichlet boundary conditions only asymptotically. However, since the smallest half-length of the chain has been set to $ L/2 = 100$, the error is of the order of $ 10^{-44} $, which does not affect numerical computations.
The figure shows the dynamics of the initial condition (1) for parameters: and . In the first image of Figure, we observe the profile of the initial condition.
The subsequent images show the dynamics of the system for different values of the damping force . For , the convergence takes place at the equilibrium point which is the basic state.
I want to create the red and the blue plots
Now I have tried but as you can see the result are different. What should I change?
% Parameters
L = 200; % Length of the system
K = 99; % Number of spatial points
omega_d = 1; % Characteristic frequency
beta = 1; % Nonlinearity parameter
delta_values = [0.1, 0.05, 0.01]; % Damping coefficients
% Spatial grid
h = L / (K + 1);
n = linspace(-L/2, L/2, K+1); % Spatial points
N = length(n);
omegaDScaled = h * omega_d;
% Time parameters
dt = 1; % Time step
tmax = 3000; % Maximum time
tspan = 0:dt:tmax; % Time vector
% Values of amplitude ‘a’ to iterate over
a_values = [2]; % Initial amplitude for the initial condition plot
% Differential equation solver function
function dYdt = odefun(~, Y, N, h, omegaDScaled, deltaScaled, beta)
U = Y(1:N);
Udot = Y(N+1:end);
Uddot = zeros(size(U));
% Laplacian (discrete second derivative)
for k = 2:N-1
Uddot(k) = (U(k+1) – 2 * U(k) + U(k-1)) ;
end
% System of equations
dUdt = Udot;
dUdotdt = Uddot – deltaScaled * Udot + omegaDScaled^2 * (U – beta * U.^3);
% Pack derivatives
dYdt = [dUdt; dUdotdt];
end
% Create a figure for subplots
figure;
% Loop through each value of ‘delta’ and generate the plot
for i = 1:length(delta_values)
delta = delta_values(i);
deltaScaled = h * delta;
a = a_values(1);
% Initial conditions
U0 = a * sech(-L/2 + n*h); % Initial displacement
U0(1) = 0; % Boundary condition at n = 0
U0(end) = 0; % Boundary condition at n = K+1
Udot0 = zeros(size(U0)); % Initial velocity
% Pack initial conditions
Y0 = [U0, Udot0];
% Solve ODE
opts = odeset(‘RelTol’, 1e-5, ‘AbsTol’, 1e-6);
[t, Y] = ode45(@(t, Y) odefun(t, Y, N, h, omegaDScaled, deltaScaled, beta), tspan, Y0, opts);
% Extract solutions
U = Y(:, 1:N);
Udot = Y(:, N+1:end);
% Plot final displacement profile
subplot(2, 2, i+1);
plot(n, U(end,:), ‘b.-‘, ‘LineWidth’, 1.5, ‘MarkerSize’, 10); % Line and marker plot
xlabel(‘$x_n$’, ‘Interpreter’, ‘latex’);
ylabel(‘$U_n$’, ‘Interpreter’, ‘latex’);
title([‘$t=3000$, $delta=’, num2str(delta), ‘$’], ‘Interpreter’, ‘latex’);
set(gca, ‘FontSize’, 12, ‘FontName’, ‘Times’);
xlim([-L/2 L/2]);
ylim([-2 2]);
grid on;
end
% Initial plot
subplot(2, 2, 1);
a_init = 2; % Example initial amplitude for the initial condition plot
U0_init = a_init * sech(-L/2 + n*h); % Initial displacement
U0_init(1) = 0; % Boundary condition at n = 0
U0_init(end) = 0; % Boundary condition at n = K+1
plot(n, U0_init, ‘r.-‘, ‘LineWidth’, 1.5, ‘MarkerSize’, 10); % Line and marker plot
xlabel(‘$x_n$’, ‘Interpreter’, ‘latex’);
ylabel(‘$U_n$’, ‘Interpreter’, ‘latex’);
title(‘$t=0$’, ‘Interpreter’, ‘latex’);
set(gca, ‘FontSize’, 12, ‘FontName’, ‘Times’);
xlim([-L/2 L/2]);
ylim([-3 3]);
grid on;
% Adjust layout
set(gcf, ‘Position’, [100, 100, 1200, 900]); % Adjust figure size as needed Ιn continuation of the study with which I have been fascinated Numerical Simulation of a Damped, Driven Nonlinear Wave System with Spatially Extended Initial Conditions
Now we examine the role of damping in the structure of the branches of equilibrium points. In this study, we consider localized initial conditions of the form:
where is the distance between the nodes, and is the amplitude. We assume zero initial velocity
We also note that if we consider an infinite chain, the initial conditions $(1)$ satisfy the Dirichlet boundary conditions only asymptotically. However, since the smallest half-length of the chain has been set to $ L/2 = 100$, the error is of the order of $ 10^{-44} $, which does not affect numerical computations.
The figure shows the dynamics of the initial condition (1) for parameters: and . In the first image of Figure, we observe the profile of the initial condition.
The subsequent images show the dynamics of the system for different values of the damping force . For , the convergence takes place at the equilibrium point which is the basic state.
I want to create the red and the blue plots
Now I have tried but as you can see the result are different. What should I change?
% Parameters
L = 200; % Length of the system
K = 99; % Number of spatial points
omega_d = 1; % Characteristic frequency
beta = 1; % Nonlinearity parameter
delta_values = [0.1, 0.05, 0.01]; % Damping coefficients
% Spatial grid
h = L / (K + 1);
n = linspace(-L/2, L/2, K+1); % Spatial points
N = length(n);
omegaDScaled = h * omega_d;
% Time parameters
dt = 1; % Time step
tmax = 3000; % Maximum time
tspan = 0:dt:tmax; % Time vector
% Values of amplitude ‘a’ to iterate over
a_values = [2]; % Initial amplitude for the initial condition plot
% Differential equation solver function
function dYdt = odefun(~, Y, N, h, omegaDScaled, deltaScaled, beta)
U = Y(1:N);
Udot = Y(N+1:end);
Uddot = zeros(size(U));
% Laplacian (discrete second derivative)
for k = 2:N-1
Uddot(k) = (U(k+1) – 2 * U(k) + U(k-1)) ;
end
% System of equations
dUdt = Udot;
dUdotdt = Uddot – deltaScaled * Udot + omegaDScaled^2 * (U – beta * U.^3);
% Pack derivatives
dYdt = [dUdt; dUdotdt];
end
% Create a figure for subplots
figure;
% Loop through each value of ‘delta’ and generate the plot
for i = 1:length(delta_values)
delta = delta_values(i);
deltaScaled = h * delta;
a = a_values(1);
% Initial conditions
U0 = a * sech(-L/2 + n*h); % Initial displacement
U0(1) = 0; % Boundary condition at n = 0
U0(end) = 0; % Boundary condition at n = K+1
Udot0 = zeros(size(U0)); % Initial velocity
% Pack initial conditions
Y0 = [U0, Udot0];
% Solve ODE
opts = odeset(‘RelTol’, 1e-5, ‘AbsTol’, 1e-6);
[t, Y] = ode45(@(t, Y) odefun(t, Y, N, h, omegaDScaled, deltaScaled, beta), tspan, Y0, opts);
% Extract solutions
U = Y(:, 1:N);
Udot = Y(:, N+1:end);
% Plot final displacement profile
subplot(2, 2, i+1);
plot(n, U(end,:), ‘b.-‘, ‘LineWidth’, 1.5, ‘MarkerSize’, 10); % Line and marker plot
xlabel(‘$x_n$’, ‘Interpreter’, ‘latex’);
ylabel(‘$U_n$’, ‘Interpreter’, ‘latex’);
title([‘$t=3000$, $delta=’, num2str(delta), ‘$’], ‘Interpreter’, ‘latex’);
set(gca, ‘FontSize’, 12, ‘FontName’, ‘Times’);
xlim([-L/2 L/2]);
ylim([-2 2]);
grid on;
end
% Initial plot
subplot(2, 2, 1);
a_init = 2; % Example initial amplitude for the initial condition plot
U0_init = a_init * sech(-L/2 + n*h); % Initial displacement
U0_init(1) = 0; % Boundary condition at n = 0
U0_init(end) = 0; % Boundary condition at n = K+1
plot(n, U0_init, ‘r.-‘, ‘LineWidth’, 1.5, ‘MarkerSize’, 10); % Line and marker plot
xlabel(‘$x_n$’, ‘Interpreter’, ‘latex’);
ylabel(‘$U_n$’, ‘Interpreter’, ‘latex’);
title(‘$t=0$’, ‘Interpreter’, ‘latex’);
set(gca, ‘FontSize’, 12, ‘FontName’, ‘Times’);
xlim([-L/2 L/2]);
ylim([-3 3]);
grid on;
% Adjust layout
set(gcf, ‘Position’, [100, 100, 1200, 900]); % Adjust figure size as needed differential equations, plotting, subplot, plot, equation, mathematics MATLAB Answers — New Questions
FFT for analog read from Arduino Uno
I was able to obtain correct analog values through the Arduino Uno using Matlab Simulink, and I want to calculate FFT and THD, how to do itI was able to obtain correct analog values through the Arduino Uno using Matlab Simulink, and I want to calculate FFT and THD, how to do it I was able to obtain correct analog values through the Arduino Uno using Matlab Simulink, and I want to calculate FFT and THD, how to do it fft MATLAB Answers — New Questions
Tasks and Plans from ToDo not in Planner
My Tasks and Plans from ToDo do not show up in Planner. I can see the ToDo Plans in Teams but the tasks assigned to those plans do not show up in My Tasks in Teams. Any idea why?
My Tasks and Plans from ToDo do not show up in Planner. I can see the ToDo Plans in Teams but the tasks assigned to those plans do not show up in My Tasks in Teams. Any idea why? Read More
New Feedback Opportunity: Microsoft Defender for Cloud DevOps Security Survey
If you work for a small or medium company and if you’re already using Microsoft Defender for Cloud and you have Defender CSPM we want to hear your thoughts about DevOps security capabilities: https://learn.microsoft.com/en-us/azure/defender-for-cloud/devops-support#azure-devops
Your opinion is instrumental in shaping the future of how Microsoft approaches the Defender for Cloud (MDC) product, for small and medium customers (SMC).
We sincerely appreciate your dedication to helping us deliver a world-class security solution that aligns with your needs.
If you work for a small or medium company and if you’re already using Microsoft Defender for Cloud and you have Defender CSPM we want to hear your thoughts about DevOps security capabilities: https://learn.microsoft.com/en-us/azure/defender-for-cloud/devops-support#azure-devops Your opinion is instrumental in shaping the future of how Microsoft approaches the Defender for Cloud (MDC) product, for small and medium customers (SMC). We sincerely appreciate your dedication to helping us deliver a world-class security solution that aligns with your needs.
Take the survey here! Read More
BLOG: What deprecation means in practical terms for Windows and Windows Server
What deprecation means in practical terms?!
An important and careful read every time.
Each release of Windows / Windows Server doesn’t only come with enhanced features and fixes, but also deprecation notices you have to consider.
What’s deprecation?
It’s a tag on a role or feature that longer under development.
And it marks the start of getting stale or even being removed completely from the OS. Most of the time all deprecated features will become optional features, first.
Karl, how do you deal with deprecated features?
I personally try to consult customers to remove inbox Optional Features. In this case they may not accidently use these, or otherwise notice they are in use when missing in the first place.
Feature removals are quite rare but that’s exactly why you should really consider watching the space of deprecation notices.
Are deprecated features generally removed?
Clear no. But there’s a risk of that. You should not build a business around or on deprecated features.
Removals can occour quickly, usually rather planned, when a security concern arises and no fix can be made, or a feature, by telemetry is rarely used in the first place.
Are deprecated features supported?
It depends. Every feature in-box is under the support policy of the product. So far the rules.
Do not expect up to par Microsoft support for deprecated features. Same as with OS versions outside the mainstream support (extended support), like Windows Server 2016 / 2019, both widely spread, at the time of writing.
Keep an eye on the product support matrix and the support conditions. Microsoft used to call these Lifecycle Policies, of each product.
Also other (Microsoft) products you are running on top of an OS. Speaking for the OS, the Microsoft support team might advice you to move on when for break / fix situation, no remediation can be found, and the product is deprecated or outside mainstream support.
References
Windows Server 2025 preview removed and deprecated features
Windows 11
https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features?wt.mc_id=MVP_338345
Microsoft’s terminology (binding)
https://learn.microsoft.com/en-us/windows/whats-new/feature-lifecycle#terminology?wt.mc_id=MVP_338345
Microsoft Lifecycle Policies and product support lookup
https://learn.microsoft.com/en-us/lifecycle/?wt.mc_id=MVP_338345
What deprecation means in practical terms?! An important and careful read every time. Each release of Windows / Windows Server doesn’t only come with enhanced features and fixes, but also deprecation notices you have to consider.What’s deprecation? It’s a tag on a role or feature that longer under development. And it marks the start of getting stale or even being removed completely from the OS. Most of the time all deprecated features will become optional features, first. Karl, how do you deal with deprecated features?I personally try to consult customers to remove inbox Optional Features. In this case they may not accidently use these, or otherwise notice they are in use when missing in the first place. Feature removals are quite rare but that’s exactly why you should really consider watching the space of deprecation notices.Are deprecated features generally removed? Clear no. But there’s a risk of that. You should not build a business around or on deprecated features. Removals can occour quickly, usually rather planned, when a security concern arises and no fix can be made, or a feature, by telemetry is rarely used in the first place.Are deprecated features supported?It depends. Every feature in-box is under the support policy of the product. So far the rules.Do not expect up to par Microsoft support for deprecated features. Same as with OS versions outside the mainstream support (extended support), like Windows Server 2016 / 2019, both widely spread, at the time of writing.Keep an eye on the product support matrix and the support conditions. Microsoft used to call these Lifecycle Policies, of each product. Also other (Microsoft) products you are running on top of an OS. Speaking for the OS, the Microsoft support team might advice you to move on when for break / fix situation, no remediation can be found, and the product is deprecated or outside mainstream support.References
Windows Server 2025 preview removed and deprecated features
https://learn.microsoft.com/en-us/windows-server/get-started/removed-deprecated-features-windows-server-2025?wt.mc_id=MVP_338345
Windows 11https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features?wt.mc_id=MVP_338345Microsoft’s terminology (binding)https://learn.microsoft.com/en-us/windows/whats-new/feature-lifecycle#terminology?wt.mc_id=MVP_338345Microsoft Lifecycle Policies and product support lookuphttps://learn.microsoft.com/en-us/lifecycle/?wt.mc_id=MVP_338345 Read More
Windows 11 Memory Compression
I am currently running Windows 11 Professional version 23H2 (OS Build 22631.3593).
I am looking as Task Manager, Memory to see the following:
As you can see, my workstation has 192GB of total RAM. Only 20GB is in use with plenty available. I am noticing that Windows has decided to compress memory even though I have plenty available. On-the-fly compression has a cost. Why would Windows randomly decide to waste processing time compressing when it is absolutely unnecessary?
I am currently running Windows 11 Professional version 23H2 (OS Build 22631.3593). I am looking as Task Manager, Memory to see the following: As you can see, my workstation has 192GB of total RAM. Only 20GB is in use with plenty available. I am noticing that Windows has decided to compress memory even though I have plenty available. On-the-fly compression has a cost. Why would Windows randomly decide to waste processing time compressing when it is absolutely unnecessary? Read More
Pivot tables, more than one person/unit assigned to a task.
Hi, I have the example table below. How do I create a pivot table that lists the tasks each Unit is responsible for? I would like it to look like:
Policy Unit
Task 1
Task 8
Task 9
Compliance Unit
Task 2
Task 3
Task 5
Task 7 etc…
Basically wondering how can I combine Unit and Unit2 to use in my pivot table. Or how do I create a pivot table that would list tasks by each owner, John is responsible for Task 1, and 9.
I am stuck when a task is completed by more than one Unit or person?
#TaskUnit Unit2Task Owners1Task 1PolicyOperationsJohn, Linda2Task 2OperationsComplianceLinda, Mary3Task 3Compliance Mary4Task 4Enforcement Lydia, Steve5Task 5Compliance Mary6Task 6Operations Linda7Task 7EnforcementComplianceLydia, Mary8Task 8EnforcementPolicyLydia9Task 9Policy John
Hi, I have the example table below. How do I create a pivot table that lists the tasks each Unit is responsible for? I would like it to look like: Policy UnitTask 1Task 8Task 9Compliance UnitTask 2Task 3Task 5Task 7 etc… Basically wondering how can I combine Unit and Unit2 to use in my pivot table. Or how do I create a pivot table that would list tasks by each owner, John is responsible for Task 1, and 9. I am stuck when a task is completed by more than one Unit or person? #TaskUnit Unit2Task Owners1Task 1PolicyOperationsJohn, Linda2Task 2OperationsComplianceLinda, Mary3Task 3Compliance Mary4Task 4Enforcement Lydia, Steve5Task 5Compliance Mary6Task 6Operations Linda7Task 7EnforcementComplianceLydia, Mary8Task 8EnforcementPolicyLydia9Task 9Policy John Read More
Is there a way to use existing c++ interfaces wrapped in differing namespaces in Stateflow without redefining them to C-Style enums?
*Problem Description:*
Given a large project with interfaces defined in the form:
namespace ns1
{
class MyClass
{
public:
enum myEnum : int8
{
FOO = 0,
BAR = 1,
FOOBAR = 2
};
myEnum m_myEnum;
}
}
namespace ns2
{
class MyOtherClass
{
enum myOtherEnum : int8
{
FOO = 0,
BAR = 1,
FOOBAR = 2
};
myOtherEnum m_myOtherEnum;
}
}
Within C++, the value of the first enum could be accessed using ns1::MyClass::myEnum. In order to write on variables using these interfaces from a Stateflow generated C-File, I only came up with one solution so far: to have the Code Generator redefine both interfaces in C-Style, based on the values entered within Stateflow:
typedef enum
{
NS2_MYCLASS_MY_ENUM_FOO = 0,
NS2_MYCLASS_MY_ENUM_BAR = 1,
NS2_MYCLASS_MY_ENUM_FOOBAR = 2,
} MY_ENUM
typedef enum
{
NS2_MYOTHERCLASS_MY_OTHER_ENUM_FOO = 0,
NS2_MYOTHERCLASS_MY_OTHER_ENUM_BAR = 1,
NS2_MYOTHERCLASS_MY_OTHER_ENUM_FOOBAR = 2,
} MY_OTHER_ENUM
To get these values back on variables, defined in the form of the original enums, there have to be static casts implemented like e.g.
instanceOfMyClass.m_myEnum = static_cast<ns1::MyClass::myEnum>(MY_ENUM)
instanceOfMyOtherClass.m_myOtherEnum = static_cast<ns2::MyOtherClass::myOtherEnum>(MY_OTHER_ENUM)
The disadvantages are:
* redefinition is extra work, prone to errors and a lot of work to keep in sync
* static casting is dangerous, especially, when e.g. the order of the values within the enumeration changes
* the principle of single source of truth is violated which leads to these disadvantages
*Question:*
* Is there a way to directly use the original, C++-Style enums without recreating them and having all the stated disadvantages?
* I’m thinking about a solution where I can enter the names and paths of the original interfaces directly within StateFlow and generating C++ code that is therefore already integrated – without any wrapping and extra, error prone work.*Problem Description:*
Given a large project with interfaces defined in the form:
namespace ns1
{
class MyClass
{
public:
enum myEnum : int8
{
FOO = 0,
BAR = 1,
FOOBAR = 2
};
myEnum m_myEnum;
}
}
namespace ns2
{
class MyOtherClass
{
enum myOtherEnum : int8
{
FOO = 0,
BAR = 1,
FOOBAR = 2
};
myOtherEnum m_myOtherEnum;
}
}
Within C++, the value of the first enum could be accessed using ns1::MyClass::myEnum. In order to write on variables using these interfaces from a Stateflow generated C-File, I only came up with one solution so far: to have the Code Generator redefine both interfaces in C-Style, based on the values entered within Stateflow:
typedef enum
{
NS2_MYCLASS_MY_ENUM_FOO = 0,
NS2_MYCLASS_MY_ENUM_BAR = 1,
NS2_MYCLASS_MY_ENUM_FOOBAR = 2,
} MY_ENUM
typedef enum
{
NS2_MYOTHERCLASS_MY_OTHER_ENUM_FOO = 0,
NS2_MYOTHERCLASS_MY_OTHER_ENUM_BAR = 1,
NS2_MYOTHERCLASS_MY_OTHER_ENUM_FOOBAR = 2,
} MY_OTHER_ENUM
To get these values back on variables, defined in the form of the original enums, there have to be static casts implemented like e.g.
instanceOfMyClass.m_myEnum = static_cast<ns1::MyClass::myEnum>(MY_ENUM)
instanceOfMyOtherClass.m_myOtherEnum = static_cast<ns2::MyOtherClass::myOtherEnum>(MY_OTHER_ENUM)
The disadvantages are:
* redefinition is extra work, prone to errors and a lot of work to keep in sync
* static casting is dangerous, especially, when e.g. the order of the values within the enumeration changes
* the principle of single source of truth is violated which leads to these disadvantages
*Question:*
* Is there a way to directly use the original, C++-Style enums without recreating them and having all the stated disadvantages?
* I’m thinking about a solution where I can enter the names and paths of the original interfaces directly within StateFlow and generating C++ code that is therefore already integrated – without any wrapping and extra, error prone work. *Problem Description:*
Given a large project with interfaces defined in the form:
namespace ns1
{
class MyClass
{
public:
enum myEnum : int8
{
FOO = 0,
BAR = 1,
FOOBAR = 2
};
myEnum m_myEnum;
}
}
namespace ns2
{
class MyOtherClass
{
enum myOtherEnum : int8
{
FOO = 0,
BAR = 1,
FOOBAR = 2
};
myOtherEnum m_myOtherEnum;
}
}
Within C++, the value of the first enum could be accessed using ns1::MyClass::myEnum. In order to write on variables using these interfaces from a Stateflow generated C-File, I only came up with one solution so far: to have the Code Generator redefine both interfaces in C-Style, based on the values entered within Stateflow:
typedef enum
{
NS2_MYCLASS_MY_ENUM_FOO = 0,
NS2_MYCLASS_MY_ENUM_BAR = 1,
NS2_MYCLASS_MY_ENUM_FOOBAR = 2,
} MY_ENUM
typedef enum
{
NS2_MYOTHERCLASS_MY_OTHER_ENUM_FOO = 0,
NS2_MYOTHERCLASS_MY_OTHER_ENUM_BAR = 1,
NS2_MYOTHERCLASS_MY_OTHER_ENUM_FOOBAR = 2,
} MY_OTHER_ENUM
To get these values back on variables, defined in the form of the original enums, there have to be static casts implemented like e.g.
instanceOfMyClass.m_myEnum = static_cast<ns1::MyClass::myEnum>(MY_ENUM)
instanceOfMyOtherClass.m_myOtherEnum = static_cast<ns2::MyOtherClass::myOtherEnum>(MY_OTHER_ENUM)
The disadvantages are:
* redefinition is extra work, prone to errors and a lot of work to keep in sync
* static casting is dangerous, especially, when e.g. the order of the values within the enumeration changes
* the principle of single source of truth is violated which leads to these disadvantages
*Question:*
* Is there a way to directly use the original, C++-Style enums without recreating them and having all the stated disadvantages?
* I’m thinking about a solution where I can enter the names and paths of the original interfaces directly within StateFlow and generating C++ code that is therefore already integrated – without any wrapping and extra, error prone work. stateflow, c++, enum, namespace, class MATLAB Answers — New Questions
Create ‘siteviewer’ object without displaying it?
Hello,
Is there a way to create a ‘siteviewer’ object without actually displaying it? I know there’s the option of running the command siteviewer(‘Visible’,’off’), but this command does display the object, even if it closes it inmediataely after. Is there some way to just create the object and have no display of it at all?
Thanks in advance,
GuillemHello,
Is there a way to create a ‘siteviewer’ object without actually displaying it? I know there’s the option of running the command siteviewer(‘Visible’,’off’), but this command does display the object, even if it closes it inmediataely after. Is there some way to just create the object and have no display of it at all?
Thanks in advance,
Guillem Hello,
Is there a way to create a ‘siteviewer’ object without actually displaying it? I know there’s the option of running the command siteviewer(‘Visible’,’off’), but this command does display the object, even if it closes it inmediataely after. Is there some way to just create the object and have no display of it at all?
Thanks in advance,
Guillem siteviewer, site, viewer, matlab, matlab gui, raytrace MATLAB Answers — New Questions
Turn Off the “Try Copilot Pro” Ad at the top of Word
I have removed Copilot completely from my PC through the registry settings. That worked and I don’t see Copilot anywhere now; however, I still see this little “Try Copilot Pro” at the top of my Word documents. I realize Microsoft has long had frequent problems with the whole “No Means No” thing and likes to go deaf when it comes to their users and their preferences, but how do I disable this? I got rid of Copilot for a reason and don’t want it constantly shoved in my face.
I have removed Copilot completely from my PC through the registry settings. That worked and I don’t see Copilot anywhere now; however, I still see this little “Try Copilot Pro” at the top of my Word documents. I realize Microsoft has long had frequent problems with the whole “No Means No” thing and likes to go deaf when it comes to their users and their preferences, but how do I disable this? I got rid of Copilot for a reason and don’t want it constantly shoved in my face. Read More
NEW digital event! Introduction to Copilot Partner-Led Immersion Experience – June 19th
Join us for a 45-minute session on June 19, 2024 on how to use the recently launched Partner-led Copilot Immersion Experience, providing partners the ability to demo and help customers with hands-on experiences.
In this session, we will walk you through each of the assets to drive adoption of Copilot for Microsoft 365 by role/persona and provide you guidance on the best way to utilize and demo with your customers–showcasing how Copilot can help businesses solve common problems and achieve more.
What is included?
Simulated click-thru demos for Sales, Marketing, HR, and Exec personas for each of the M365 apps. Finance, Legal, and Consulting personas are coming soon.
Facilitator Guide to help partners deliver a great experience
Participant Guide for end-users to follow along
How does it work?
Our guidance is to invite an entire department to a training session where you can spend 15 minutes showing what’s possible with Copilot using click-thru demos, 15 minutes for customers to try themselves with dummy content, and 15 minutes for customers to progress their own projects by bringing their own files.
Register today to get started! (Two sessions available, Americas/EMEA & APAC)
—
Demos and webinars are great..but do you need more; such as technical consultations from a level 100 to level 400 across Microsoft workloads, a comprehensive growth and success plan built with a Micrsoft account manager, or services and benefits that can monetized without requiring increased headcount? Speak with a Partner Success expert about Premier and Advanced Support for Partners, paid service offerings that drive growth and partner success.
Premier Support for Partners (PSfP) and Advanced Support for Partners (ASfP) are paid partner offerings at Microsoft that provide unmatched value through a wide range of Partner benefits including account management, direct-from-Microsoft advisory consultations, the highest level of reactive support available including up to 15-minute response times on critical cases, and coverage across cloud, hybrid, and on-prem.
Please review these resources to learn more and consider booking a meeting to speak directly with our teams for a better understanding of the value-added benefits of PSfP and ASfP.
Book a meeting with a PSfP Specialist
Book a meeting with an ASfP Evangelist
Visit the ASfP Website
Download the ASfP Fact Sheet
View the ASfP Impact Slide
Stop by the ASfP Partner Community
Register here.
Join us for a 45-minute session on June 19, 2024 on how to use the recently launched Partner-led Copilot Immersion Experience, providing partners the ability to demo and help customers with hands-on experiences. In this session, we will walk you through each of the assets to drive adoption of Copilot for Microsoft 365 by role/persona and provide you guidance on the best way to utilize and demo with your customers–showcasing how Copilot can help businesses solve common problems and achieve more. What is included?
Simulated click-thru demos for Sales, Marketing, HR, and Exec personas for each of the M365 apps. Finance, Legal, and Consulting personas are coming soon.
Facilitator Guide to help partners deliver a great experience
Participant Guide for end-users to follow along
How does it work?Our guidance is to invite an entire department to a training session where you can spend 15 minutes showing what’s possible with Copilot using click-thru demos, 15 minutes for customers to try themselves with dummy content, and 15 minutes for customers to progress their own projects by bringing their own files.
Register today to get started! (Two sessions available, Americas/EMEA & APAC)
—
Demos and webinars are great..but do you need more; such as technical consultations from a level 100 to level 400 across Microsoft workloads, a comprehensive growth and success plan built with a Micrsoft account manager, or services and benefits that can monetized without requiring increased headcount? Speak with a Partner Success expert about Premier and Advanced Support for Partners, paid service offerings that drive growth and partner success.
Premier Support for Partners (PSfP) and Advanced Support for Partners (ASfP) are paid partner offerings at Microsoft that provide unmatched value through a wide range of Partner benefits including account management, direct-from-Microsoft advisory consultations, the highest level of reactive support available including up to 15-minute response times on critical cases, and coverage across cloud, hybrid, and on-prem.
Please review these resources to learn more and consider booking a meeting to speak directly with our teams for a better understanding of the value-added benefits of PSfP and ASfP.
Book a meeting with a PSfP Specialist
Visit the PSfP Website
Book a meeting with an ASfP Evangelist
Visit the ASfP Website
Download the ASfP Fact Sheet
View the ASfP Impact Slide
Stop by the ASfP Partner Community
AVD Authentication Type
I have just completed a setup with Azure AVD for remote desktop and an application and I’d like to know if there’s a way to change the authentication or login type when using Azure AVD. Or if a prompt can be enabled in the settings of AVD. We only have 10 users spread across 2 AVD VMs. I have a Windows Server AD virtual machine running in my Azure tenant on the same vnet as the AVD setup. These were domain joined using the AVD deployment process and assigned to a specific OU in my domain. My Active Directory is using .local usernames and my Azure tenant does have an authenticated and valid domain for users and email. I did expand my AD to include the UPN alternative suffixes and I’ve adjusted the accounts so that my Office365 tenant logins match the AD logins. However, when I connect to my AVD workspace using Remote Desktop App, I cannot connect and it sends an error of 0x83886163 during the configuring gateway process. The Session Desktop and my app is published properly to the Remote Desktop App, but I simply cannot connect.
Basically, is it possible to adjust AVD to prompt for a username once I click on the Session Desktop or my published application? I did locate some authentication settings in the RDP properties and connection information of the host pool.
Thanks for any suggestions or input.
I have just completed a setup with Azure AVD for remote desktop and an application and I’d like to know if there’s a way to change the authentication or login type when using Azure AVD. Or if a prompt can be enabled in the settings of AVD. We only have 10 users spread across 2 AVD VMs. I have a Windows Server AD virtual machine running in my Azure tenant on the same vnet as the AVD setup. These were domain joined using the AVD deployment process and assigned to a specific OU in my domain. My Active Directory is using .local usernames and my Azure tenant does have an authenticated and valid domain for users and email. I did expand my AD to include the UPN alternative suffixes and I’ve adjusted the accounts so that my Office365 tenant logins match the AD logins. However, when I connect to my AVD workspace using Remote Desktop App, I cannot connect and it sends an error of 0x83886163 during the configuring gateway process. The Session Desktop and my app is published properly to the Remote Desktop App, but I simply cannot connect. Basically, is it possible to adjust AVD to prompt for a username once I click on the Session Desktop or my published application? I did locate some authentication settings in the RDP properties and connection information of the host pool. Thanks for any suggestions or input. Read More