Category: News
Easily detect CVE-2024-21427 with Microsoft Defender for Identity
The recently published CVE-2024-21427 Windows Kerberos Security Feature Bypass Vulnerability fixed the potential bypass of authentication policies configured in Active Directory. We strongly recommend that you deploy the latest security updates, including the most recent patch, to your servers and devices to help ensure you have the latest protections available.
As with every vulnerability or attack surface disclosure, our research teams actively investigate possible exploits, working to patch potential issues and provide out-of-the-box detection methods. Before being made generally available, these detections undergo rigorous testing in our lab environments as well as experimental deployments to ensure they meet our performance and accuracy standards. Additionally in this instance, the Microsoft Defender for Identity team has added a new activity to the Advanced Hunting experience in the Defender portal which can help you spot potential attempts to exploit this vulnerability.
Using the advanced hunting activity:
To help you better identify whether this vulnerability has been exploited in your environment and alert you to future attempts we added a new activity within Advanced Hunting that monitors Kerberos AS authentication. With this data customers can now easily create their own custom detection rules within Microsoft Defender XDR and automatically trigger alerts for this type of activity.
We recommend using the query below to monitor Kerberos AS authentication and use the following custom detection rule to trigger an alert:
Access Defender XDR portal -> Advanced Hunting -> Queries -> Community queries -> Kerberos AS authentication
Now, click on “Create detection rule” and fill in the details.
For example:
The advanced hunting query:
IdentityLogonEvents
| where Application == “Active Directory”
| where Protocol == “Kerberos”
| where LogonType in(“Resource access”, “Failed logon”)
| extend Error = AdditionalFields[“Error”]
| extend KerberosType = AdditionalFields[‘KerberosType’]
| where KerberosType == “KerberosAs”
| extend Spns = AdditionalFields[“Spns”]
| extend DestinationDC = AdditionalFields[“TO.DEVICE”]
| where Spns !contains “krbtgt” and Spns !contains “kadmin”
| project Timestamp, ActionType, LogonType, AccountUpn, AccountSid, IPAddress, DeviceName, KerberosType, Spns, Error, DestinationDC, DestinationIPAddress, ReportId
An example of an alert triggered by this custom detection:
For more information on this vulnerability please check back on the MSRC page and to stay on top of the latest Defender for Identity capabilities follow our What’s New documentation page.
Microsoft Tech Community – Latest Blogs –Read More
Slash Your Azure Bill: Top Tips for Startups
Understanding Azure Reservations and Savings Plans
For bootstrapped startups, every dollar counts. Wasting money on cloud resources can stifle your growth. But fear not, cloud ninjas! This post dives into two powerful tools – Azure Reservations and Savings Plans – that can help you slash your Azure bill and optimize your cloud spending.
Imagine getting a discount on your favorite takeout app… but only if you order the same thing every week from the same location. That’s kind of like Azure Reservations. You commit to using a specific amount of Azure resources for a set period (think virtual machines) and get a sweet discount (up to 72% off!).
Azure Savings Plans are more flexible. It’s like a pre-paid gift card for your cloud resources. You commit to spending a certain amount per hour for one or three years, and you get discounts (up to 65% off!) on eligible compute costs across different regions and instance types.
Choosing the Right Option
Here’s a breakdown of the advantages, drawbacks, ideal use cases, and penalties for each option to help you decide which is best for you:
Azure Reservations (Learn more about Azure Reservations)
Advantages:
Cost Savings: Up to 72% off compared to pay-as-you-go pricing.
Predictable Billing: Provides a predictable expenditure model.
Automatic Application: Discounts automatically apply to matching resources.
Drawbacks:
Limited Flexibility: Best for stable, predictable workloads.
Resource Specificity: Tied to specific regions and instance families.
Penalties: “Use-it-or-lose-it” – unused resources are forfeited. Limited cancellation and exchange options (Azure Reservations Exchange Policy).
Ideal Use Cases:
Consistent, uninterrupted workloads with minimal variation (e.g., core web server).
Azure Savings Plans (Learn more about Azure Savings Plans)
Advantages:
Flexible Savings: Applies across a wide range of compute resources.
Global Application: Works across different regions and instance families.
Drawbacks:
Limited Scope: Discounts only apply to compute costs, not storage, network, or licensing.
Non-Cancellable Commitment: Purchases are final, with no cancellation or exchange options (Canceling Azure Savings Plans).
Ideal Use Cases:
Fluctuating workloads, varied instance families, or workloads spanning multiple regions.
Bonus Tip: Don’t forget the Free Tier!
Azure has a generous free tier with a ton of services that are perfect for getting started. Check it out before you dive into Reservations or Savings Plans.
By leveraging these tools and the free tier, you can build a scalable and cost-efficient cloud infrastructure that fuels your startup’s growth. Ready to explore? Check out Microsoft’s cost calculators to see how much you can save!
Here are some additional resources:
Microsoft Azure Reservations: https://azure.microsoft.com/en-us/pricing/reservations
Microsoft Azure Savings Plans: https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/
Microsoft Azure Pricing Calculator: https://learn.microsoft.com/en-us/azure/cost-management-billing/cost
Microsoft Tech Community – Latest Blogs –Read More
Discover Azure Programmable Connectivity: A developer’s gateway to innovative mobile applications
As the digital world continuously evolves, the convergence of networks and applications is creating unprecedented opportunities for mobile application developers. Microsoft’s Azure Programmable Connectivity (APC) stands at the forefront of this revolution, providing a powerful platform that simplifies the integration of network capabilities into mobile apps.
What is Azure Programmable Connectivity?
APC transforms traditional telecom networks into programmable platforms that are directly accessible through APIs. This innovation allows developers to harness the advanced capabilities of telecom networks, like 5G, to enhance application performance, improve security, and unlock new functionalities. With APC, developers can ensure that applications remain robust and adaptable, even as underlying network technologies evolve.
Figure 1: Azure Programmable Connectivity
Key benefits for developers
Unified API interface: APC offers a standard, simplified interface across multiple operator networks globally. This abstraction layer saves you from the complexities of individual network APIs and ensures code consistency and reliability.
Easy access and integration: Accessible directly within the Azure portal, APC’s gateway manages API calls, credential handling, and proper routing to the appropriate mobile operator. This integration reduces overhead, allowing you to focus more on innovation and less on configuration.
Flexible API consumption methods: APC offers SDKs for .NET/C# and Python, with JavaScript SDKs coming soon, allowing for seamless integration into your applications. For broader compatibility, developers can also access APC APIs as HTTP REST APIs, enabling use across any programming language that supports HTTP service calls.
A rich ecosystem of operators: APC proudly collaborates with an expansive array of global telecom operators, constructing a vast ecosystem of network APIs. This rich network provides access to a wide range of advanced network functionalities.
Support for modern connected applications: Whether it’s enhancing real-time interactions with live-streaming capabilities or improving security measures through SIM swap detection, APC will enable you to build the next generation of connected applications.
APIs available with APC
APC, in its initial phase, offers three anti-fraud APIs that enhance security for mobile applications. These include telephone number verification, SIM swap detection, and device location verification. The following code snippet illustrates the straightforward process of using the APC SDK to validate a device’s location coordinates.
string ApcGatewayId = “/subscriptions/your_subscription_id/resourceGroups/dev-testing-eastus/providers/Microsoft.programmableconnectivity/gateways/apcg-eastus”;
Uri endpoint = new Uri(“https://your-endpoint-here.com“);
TokenCredential credential = new DefaultAzureCredential();
ProgrammableConnectivityClient baseClient = new ProgrammableConnectivityClient(endpoint, credential);
var client = baseClient.GetDeviceLocationClient();
var deviceLocationVerificationContent = new DeviceLocationVerificationContent(
new NetworkIdentifier(“NetworkCode”,
“Your_Telco_Operator_ID”),
latitude:80.0, longitude:85.1,
accuracy:10,
new LocationDevice
{
PhoneNumber = “+349876543210”,
});
Response<DeviceLocationVerificationResult> result =
client.Verify(ApcGatewayId,deviceLocationVerificationContent);
var verificationResult = result.Value.VerificationResult;
Figure 2: SDK code validating device location
Developing code with these APIs is straightforward and secure. Verification is handled by the mobile operator, ensuring that the process is tamper-proof.
Join Us at Microsoft Build
We at Microsoft are excited to invite all developers to join us at the upcoming Microsoft Build 2024. Come and explore how APC is redefining connectivity and opening up new possibilities for mobile application development:
Register for Microsoft Build—in-person or digital options are available.
Visit our booth at the Partner Hub area to get a firsthand look at APC in action and discuss how you can take advantage of this platform to elevate your applications.
Watch* our technical “Build network-aware mobile apps“ on demand session to learn more about APC and how to use anti-fraud APIs. You must be registered to view this link.
Watch* the programmable networks discussion with experts from GSMA, Microsoft, Telefónica and Deutsche Telekom.
*Microsoft Build on demand sessions will be available starting on May 21st, 2024 @ 8:30 AM PST
Join the public preview
APC is available in public preview! We encourage you to sign up and explore its capabilities. Get early access to the latest features and contribute to shaping this cutting-edge technology. Apply for public preview here.
Learn more and start building today
APC is not just a tool; it’s a gateway to the future of mobile applications. With its robust features and growing global network ecosystem, APC enables developers to transcend traditional app-development boundaries and venture into new realms of innovation and functionality. Join us in this journey to unleash the potential of modern connected applications and redefine what your apps can do with APC at Microsoft Build!
Dive deeper into the possibilities with APC and discover comprehensive guides and tutorials to help you start integrating network APIs into your applications smoothly and efficiently. Explore Azure Programmable Connectivity, access technical documentation, and if you haven’t already, sign up for public preview.
Get started developing apps with APC with GitHub. Grab the open-source “APC-Demo-App” for an end-to-end comprehensive example of a mobile app with a complementary, hands-on lab.
Microsoft Tech Community – Latest Blogs –Read More
Does I properly translate the equations in matlab code?
lambda = 2.75; %2.18; % Example initial guess for lambda
kappa_init = 0.0371; % 0.2; %0.0269; % 0.05 % Example initial guess for kappa
theta_k_init = 0.48; %0.3748; %*0.01745; %/0.0175;% 180/10; % 0.0007778*(pi/180); % Example initial guess for theta_k in radians
R_init = 450;% 347.3092; % 328.0456; %851.6597; % 349.4944; %362.4145; % Example initial guess for R
rout = 76.3; %76.3; %74.1783;%76.4; % Define rout
% Calculate omega_m and omega_p
omega_m = @(lambda, kappa, theta_k) sqrt(kappa / (2 * (lambda + 1))) * sqrt((lambda + 2) * cos(theta_k) – sqrt((lambda + 2)^2 * cos(theta_k)^2 – 4 * (lambda + 1)));
omega_p = @(lambda, kappa, theta_k) sqrt(kappa / (2 * (lambda + 1))) * sqrt((lambda + 2) * cos(theta_k) + sqrt((lambda + 2)^2 * cos(theta_k)^2 – 4 * (lambda + 1)));
% Define A1 and B1
A1 = @(R, kappa, lambda, theta_k, rout) ((8 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2)) / ((rout^2 – 4 * R^2)^2 * (kappa^2 + omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2))) * …
(-2 * (omega_m(lambda, kappa, theta_k)^2 + omega_p(lambda, kappa, theta_k)^2) / (omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2) …
+ rout * omega_m(lambda, kappa, theta_k)^2 * (kappa^2 – omega_p(lambda, kappa, theta_k)^4) / (kappa^2 * omega_p(lambda, kappa, theta_k) * (omega_m(lambda, kappa, theta_k)^2 – omega_p(lambda, kappa, theta_k)^2) * besselj(1, rout * omega_p(lambda, kappa, theta_k))) …
– rout * omega_p(lambda, kappa, theta_k)^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^4) / (kappa^2 * omega_m(lambda, kappa, theta_k) * (omega_m(lambda, kappa, theta_k)^2 – omega_p(lambda, kappa, theta_k)^2) * besselj(1, rout * omega_m(lambda, kappa, theta_k))));
B1 = @(R, kappa, lambda, theta_k, rout)((8 * R^2 * (kappa^2 – omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2) * sqrt((kappa^2 – omega_m(kappa, theta_k, lambda)^4) * (kappa^2 – omega_p(kappa, theta_k, lambda)^4))) / …
((rout^2 – 4 * R^2)^2 * (kappa^2 + omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2))) * …
(2 / (omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2 * kappa) + rout / (kappa * omega_m(kappa, theta_k, lambda) * (omega_m(kappa, theta_k, lambda)^2 – omega_p(kappa, theta_k, lambda)^2) * besselj(1, rout * omega_m(kappa, theta_k, lambda))) …
– rout / (kappa * omega_p(kappa, theta_k, lambda) * (omega_m(kappa, theta_k, lambda)^2 – omega_p(kappa, theta_k, lambda)^2) * besselj(1, rout * omega_p(kappa, theta_k, lambda))));
dr = @(r_values, kappa,theta_k,R) …
(2 * besselj(1, r_values * omega_p(lambda, kappa, theta_k)) ./ …
((omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2) * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2))) .* …
((omega_m(lambda, kappa, theta_k)^2 * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_p(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa^2 * omega_p(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + (B1(R, kappa, lambda, theta_k, rout) …
* omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k) .* …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ kappa) …
– (2 * besselj(1, r_values * omega_m(lambda, kappa, theta_k)) ./ …
((omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2) * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2))) .* …
((omega_p(lambda, kappa, theta_k)^2 * …
(kappa^2 – omega_m(lambda, kappa, theta_k)^4)) ./ …
omega_m(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa^2 * omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + (B1(R, kappa, lambda, theta_k, rout) …
* omega_m(lambda, kappa, theta_k) * …
omega_p(lambda, kappa, theta_k)^2 .* …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ kappa) …
– (16 * r_values * R^2 * (omega_m(lambda, kappa, theta_k)^2 + …
omega_p(lambda, kappa, theta_k)^2) .* …
(kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(omega_p(lambda, kappa, theta_k)^2 * …
omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2 * (kappa^2 + …
omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2));
dtheta = @(r_values, kappa,theta_k,R) …
(2 * besselj(1, r_values * omega_p(lambda, kappa, theta_k)) ./ …
((kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2) * …
(omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2))) .* …
(-sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_p(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) * kappa + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 …
* omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa * omega_p(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) – B1(R, kappa, lambda, theta_k, rout) …
* omega_p(lambda, kappa, theta_k) * …
(kappa^2 – omega_m(lambda, kappa, theta_k)^4)) …
+ (2 * besselj(1, r_values * omega_m(lambda, kappa, theta_k)) ./ …
((kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2) * …
(omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2))) .* …
(sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_m(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) * kappa + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa * omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + B1(R, kappa, lambda, theta_k, rout) * …
omega_m(lambda, kappa, theta_k) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) …
+ (16 * r_values * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 …
* omega_p(lambda, kappa, theta_k)^2) * …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ …
(kappa * omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2 * (rout^2 – 4 * R^2)^2 * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2));
% Plotting data
r_values = linspace(2.16, 75.6, 100).’; % specifying the range for r_values
% Plotting
figure;
Why at the boundary both the dr and dtheta are not reaching to zero? However, the analytical soln of the equations satisfied zero boundary condition. Did I make any mistake to translate those eqns (attached here in a separate file) in maltab code? Please someone suggest me the possible error (including brackets misplaced etc).lambda = 2.75; %2.18; % Example initial guess for lambda
kappa_init = 0.0371; % 0.2; %0.0269; % 0.05 % Example initial guess for kappa
theta_k_init = 0.48; %0.3748; %*0.01745; %/0.0175;% 180/10; % 0.0007778*(pi/180); % Example initial guess for theta_k in radians
R_init = 450;% 347.3092; % 328.0456; %851.6597; % 349.4944; %362.4145; % Example initial guess for R
rout = 76.3; %76.3; %74.1783;%76.4; % Define rout
% Calculate omega_m and omega_p
omega_m = @(lambda, kappa, theta_k) sqrt(kappa / (2 * (lambda + 1))) * sqrt((lambda + 2) * cos(theta_k) – sqrt((lambda + 2)^2 * cos(theta_k)^2 – 4 * (lambda + 1)));
omega_p = @(lambda, kappa, theta_k) sqrt(kappa / (2 * (lambda + 1))) * sqrt((lambda + 2) * cos(theta_k) + sqrt((lambda + 2)^2 * cos(theta_k)^2 – 4 * (lambda + 1)));
% Define A1 and B1
A1 = @(R, kappa, lambda, theta_k, rout) ((8 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2)) / ((rout^2 – 4 * R^2)^2 * (kappa^2 + omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2))) * …
(-2 * (omega_m(lambda, kappa, theta_k)^2 + omega_p(lambda, kappa, theta_k)^2) / (omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2) …
+ rout * omega_m(lambda, kappa, theta_k)^2 * (kappa^2 – omega_p(lambda, kappa, theta_k)^4) / (kappa^2 * omega_p(lambda, kappa, theta_k) * (omega_m(lambda, kappa, theta_k)^2 – omega_p(lambda, kappa, theta_k)^2) * besselj(1, rout * omega_p(lambda, kappa, theta_k))) …
– rout * omega_p(lambda, kappa, theta_k)^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^4) / (kappa^2 * omega_m(lambda, kappa, theta_k) * (omega_m(lambda, kappa, theta_k)^2 – omega_p(lambda, kappa, theta_k)^2) * besselj(1, rout * omega_m(lambda, kappa, theta_k))));
B1 = @(R, kappa, lambda, theta_k, rout)((8 * R^2 * (kappa^2 – omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2) * sqrt((kappa^2 – omega_m(kappa, theta_k, lambda)^4) * (kappa^2 – omega_p(kappa, theta_k, lambda)^4))) / …
((rout^2 – 4 * R^2)^2 * (kappa^2 + omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2))) * …
(2 / (omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2 * kappa) + rout / (kappa * omega_m(kappa, theta_k, lambda) * (omega_m(kappa, theta_k, lambda)^2 – omega_p(kappa, theta_k, lambda)^2) * besselj(1, rout * omega_m(kappa, theta_k, lambda))) …
– rout / (kappa * omega_p(kappa, theta_k, lambda) * (omega_m(kappa, theta_k, lambda)^2 – omega_p(kappa, theta_k, lambda)^2) * besselj(1, rout * omega_p(kappa, theta_k, lambda))));
dr = @(r_values, kappa,theta_k,R) …
(2 * besselj(1, r_values * omega_p(lambda, kappa, theta_k)) ./ …
((omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2) * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2))) .* …
((omega_m(lambda, kappa, theta_k)^2 * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_p(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa^2 * omega_p(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + (B1(R, kappa, lambda, theta_k, rout) …
* omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k) .* …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ kappa) …
– (2 * besselj(1, r_values * omega_m(lambda, kappa, theta_k)) ./ …
((omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2) * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2))) .* …
((omega_p(lambda, kappa, theta_k)^2 * …
(kappa^2 – omega_m(lambda, kappa, theta_k)^4)) ./ …
omega_m(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa^2 * omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + (B1(R, kappa, lambda, theta_k, rout) …
* omega_m(lambda, kappa, theta_k) * …
omega_p(lambda, kappa, theta_k)^2 .* …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ kappa) …
– (16 * r_values * R^2 * (omega_m(lambda, kappa, theta_k)^2 + …
omega_p(lambda, kappa, theta_k)^2) .* …
(kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(omega_p(lambda, kappa, theta_k)^2 * …
omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2 * (kappa^2 + …
omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2));
dtheta = @(r_values, kappa,theta_k,R) …
(2 * besselj(1, r_values * omega_p(lambda, kappa, theta_k)) ./ …
((kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2) * …
(omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2))) .* …
(-sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_p(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) * kappa + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 …
* omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa * omega_p(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) – B1(R, kappa, lambda, theta_k, rout) …
* omega_p(lambda, kappa, theta_k) * …
(kappa^2 – omega_m(lambda, kappa, theta_k)^4)) …
+ (2 * besselj(1, r_values * omega_m(lambda, kappa, theta_k)) ./ …
((kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2) * …
(omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2))) .* …
(sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_m(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) * kappa + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa * omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + B1(R, kappa, lambda, theta_k, rout) * …
omega_m(lambda, kappa, theta_k) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) …
+ (16 * r_values * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 …
* omega_p(lambda, kappa, theta_k)^2) * …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ …
(kappa * omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2 * (rout^2 – 4 * R^2)^2 * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2));
% Plotting data
r_values = linspace(2.16, 75.6, 100).’; % specifying the range for r_values
% Plotting
figure;
Why at the boundary both the dr and dtheta are not reaching to zero? However, the analytical soln of the equations satisfied zero boundary condition. Did I make any mistake to translate those eqns (attached here in a separate file) in maltab code? Please someone suggest me the possible error (including brackets misplaced etc). lambda = 2.75; %2.18; % Example initial guess for lambda
kappa_init = 0.0371; % 0.2; %0.0269; % 0.05 % Example initial guess for kappa
theta_k_init = 0.48; %0.3748; %*0.01745; %/0.0175;% 180/10; % 0.0007778*(pi/180); % Example initial guess for theta_k in radians
R_init = 450;% 347.3092; % 328.0456; %851.6597; % 349.4944; %362.4145; % Example initial guess for R
rout = 76.3; %76.3; %74.1783;%76.4; % Define rout
% Calculate omega_m and omega_p
omega_m = @(lambda, kappa, theta_k) sqrt(kappa / (2 * (lambda + 1))) * sqrt((lambda + 2) * cos(theta_k) – sqrt((lambda + 2)^2 * cos(theta_k)^2 – 4 * (lambda + 1)));
omega_p = @(lambda, kappa, theta_k) sqrt(kappa / (2 * (lambda + 1))) * sqrt((lambda + 2) * cos(theta_k) + sqrt((lambda + 2)^2 * cos(theta_k)^2 – 4 * (lambda + 1)));
% Define A1 and B1
A1 = @(R, kappa, lambda, theta_k, rout) ((8 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2)) / ((rout^2 – 4 * R^2)^2 * (kappa^2 + omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2))) * …
(-2 * (omega_m(lambda, kappa, theta_k)^2 + omega_p(lambda, kappa, theta_k)^2) / (omega_m(lambda, kappa, theta_k)^2 * omega_p(lambda, kappa, theta_k)^2) …
+ rout * omega_m(lambda, kappa, theta_k)^2 * (kappa^2 – omega_p(lambda, kappa, theta_k)^4) / (kappa^2 * omega_p(lambda, kappa, theta_k) * (omega_m(lambda, kappa, theta_k)^2 – omega_p(lambda, kappa, theta_k)^2) * besselj(1, rout * omega_p(lambda, kappa, theta_k))) …
– rout * omega_p(lambda, kappa, theta_k)^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^4) / (kappa^2 * omega_m(lambda, kappa, theta_k) * (omega_m(lambda, kappa, theta_k)^2 – omega_p(lambda, kappa, theta_k)^2) * besselj(1, rout * omega_m(lambda, kappa, theta_k))));
B1 = @(R, kappa, lambda, theta_k, rout)((8 * R^2 * (kappa^2 – omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2) * sqrt((kappa^2 – omega_m(kappa, theta_k, lambda)^4) * (kappa^2 – omega_p(kappa, theta_k, lambda)^4))) / …
((rout^2 – 4 * R^2)^2 * (kappa^2 + omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2))) * …
(2 / (omega_m(kappa, theta_k, lambda)^2 * omega_p(kappa, theta_k, lambda)^2 * kappa) + rout / (kappa * omega_m(kappa, theta_k, lambda) * (omega_m(kappa, theta_k, lambda)^2 – omega_p(kappa, theta_k, lambda)^2) * besselj(1, rout * omega_m(kappa, theta_k, lambda))) …
– rout / (kappa * omega_p(kappa, theta_k, lambda) * (omega_m(kappa, theta_k, lambda)^2 – omega_p(kappa, theta_k, lambda)^2) * besselj(1, rout * omega_p(kappa, theta_k, lambda))));
dr = @(r_values, kappa,theta_k,R) …
(2 * besselj(1, r_values * omega_p(lambda, kappa, theta_k)) ./ …
((omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2) * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2))) .* …
((omega_m(lambda, kappa, theta_k)^2 * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_p(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa^2 * omega_p(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + (B1(R, kappa, lambda, theta_k, rout) …
* omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k) .* …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ kappa) …
– (2 * besselj(1, r_values * omega_m(lambda, kappa, theta_k)) ./ …
((omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2) * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2))) .* …
((omega_p(lambda, kappa, theta_k)^2 * …
(kappa^2 – omega_m(lambda, kappa, theta_k)^4)) ./ …
omega_m(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa^2 * omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + (B1(R, kappa, lambda, theta_k, rout) …
* omega_m(lambda, kappa, theta_k) * …
omega_p(lambda, kappa, theta_k)^2 .* …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ kappa) …
– (16 * r_values * R^2 * (omega_m(lambda, kappa, theta_k)^2 + …
omega_p(lambda, kappa, theta_k)^2) .* …
(kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(omega_p(lambda, kappa, theta_k)^2 * …
omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2 * (kappa^2 + …
omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2));
dtheta = @(r_values, kappa,theta_k,R) …
(2 * besselj(1, r_values * omega_p(lambda, kappa, theta_k)) ./ …
((kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2) * …
(omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2))) .* …
(-sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_p(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) * kappa + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 …
* omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa * omega_p(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) – B1(R, kappa, lambda, theta_k, rout) …
* omega_p(lambda, kappa, theta_k) * …
(kappa^2 – omega_m(lambda, kappa, theta_k)^4)) …
+ (2 * besselj(1, r_values * omega_m(lambda, kappa, theta_k)) ./ …
((kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2) * …
(omega_m(lambda, kappa, theta_k)^2 – …
omega_p(lambda, kappa, theta_k)^2))) .* …
(sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) ./ …
omega_m(lambda, kappa, theta_k) .* …
(A1(R, kappa, lambda, theta_k, rout) * kappa + …
(16 * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2)) ./ …
(kappa * omega_m(lambda, kappa, theta_k)^2 * …
(rout^2 – 4 * R^2)^2)) + B1(R, kappa, lambda, theta_k, rout) * …
omega_m(lambda, kappa, theta_k) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4)) …
+ (16 * r_values * R^2 * (kappa^2 – omega_m(lambda, kappa, theta_k)^2 …
* omega_p(lambda, kappa, theta_k)^2) * …
sqrt((kappa^2 – omega_m(lambda, kappa, theta_k)^4) * …
(kappa^2 – omega_p(lambda, kappa, theta_k)^4))) ./ …
(kappa * omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2 * (rout^2 – 4 * R^2)^2 * …
(kappa^2 + omega_m(lambda, kappa, theta_k)^2 * …
omega_p(lambda, kappa, theta_k)^2));
% Plotting data
r_values = linspace(2.16, 75.6, 100).’; % specifying the range for r_values
% Plotting
figure;
Why at the boundary both the dr and dtheta are not reaching to zero? However, the analytical soln of the equations satisfied zero boundary condition. Did I make any mistake to translate those eqns (attached here in a separate file) in maltab code? Please someone suggest me the possible error (including brackets misplaced etc). eqns, code MATLAB Answers — New Questions
Different output using mldivide with newer matlab version
Problem introduction
I have a simple system of 4 linear equations with 4 unknowns, which can be written as . The content of the matrices is written out below.
The analytical solution to this equation is
Observation
Asking MATLAB R2017b to solve this system using mldivide returns the exact answer. However, MATLAB R2024a returns a slightly different answer for the exact same question, where 3 out of the 4 elements in x are off to the order of 1e-11.
This exact observation can be reproduced using the attached files. First, run test1_R2017b.m in R2017b, then run test2_R2024a.m in R2024a.
Question
Simply; how come?
Is it simply a numerical error? What is the difference in mldivide between R2017b and R2024a? I read in the release notes that there is an Improved performance with small matrices to mldivide in R2022b. Is this the cause?
And how can I overcome this issue? A lot of my test functions are failing; is there a proper, robust fix for this? Or should I take a close look at my failing test functions and update them if possible? Any other suggestions?Problem introduction
I have a simple system of 4 linear equations with 4 unknowns, which can be written as . The content of the matrices is written out below.
The analytical solution to this equation is
Observation
Asking MATLAB R2017b to solve this system using mldivide returns the exact answer. However, MATLAB R2024a returns a slightly different answer for the exact same question, where 3 out of the 4 elements in x are off to the order of 1e-11.
This exact observation can be reproduced using the attached files. First, run test1_R2017b.m in R2017b, then run test2_R2024a.m in R2024a.
Question
Simply; how come?
Is it simply a numerical error? What is the difference in mldivide between R2017b and R2024a? I read in the release notes that there is an Improved performance with small matrices to mldivide in R2022b. Is this the cause?
And how can I overcome this issue? A lot of my test functions are failing; is there a proper, robust fix for this? Or should I take a close look at my failing test functions and update them if possible? Any other suggestions? Problem introduction
I have a simple system of 4 linear equations with 4 unknowns, which can be written as . The content of the matrices is written out below.
The analytical solution to this equation is
Observation
Asking MATLAB R2017b to solve this system using mldivide returns the exact answer. However, MATLAB R2024a returns a slightly different answer for the exact same question, where 3 out of the 4 elements in x are off to the order of 1e-11.
This exact observation can be reproduced using the attached files. First, run test1_R2017b.m in R2017b, then run test2_R2024a.m in R2024a.
Question
Simply; how come?
Is it simply a numerical error? What is the difference in mldivide between R2017b and R2024a? I read in the release notes that there is an Improved performance with small matrices to mldivide in R2022b. Is this the cause?
And how can I overcome this issue? A lot of my test functions are failing; is there a proper, robust fix for this? Or should I take a close look at my failing test functions and update them if possible? Any other suggestions? mldivide, system, equation MATLAB Answers — New Questions
Replace a field with another one in structure arrays
Hi. I have two structure arrays (Data_1 and Data_2) of same size and field names (Camera1, Camera2, Camera3). I want to replace the contents of Camera1 in Data_1 with the contents of Camera1 in Data_2. The field Camera1 in Data1 is empty. I have used the following lines and when I run the code, the error is Unrecognized function or variable ‘Data_2’. I am unable to fix this. I really appreciate some help or insights into this.
% Load the MAT files
load(‘Data_1’);
load(‘Data_2’);
% Check if both structure arrays have the ‘Camera1’ field
if isfield(Data_1, ‘Camera1’) && isfield(Data_2, ‘Camera1’)
% Replace the ‘Camera1’ field in Data_1 with the one from Data_2
Data_1.Camera1 = Data_2.Camera1;
% Save the modified structure array with the same name or a new name
save(‘Data_1_modified.mat’, ‘Data_1’);
disp(‘Field replaced successfully.’);
else
disp(‘One or both of the structure arrays do not contain the field "Camera1".’);
endHi. I have two structure arrays (Data_1 and Data_2) of same size and field names (Camera1, Camera2, Camera3). I want to replace the contents of Camera1 in Data_1 with the contents of Camera1 in Data_2. The field Camera1 in Data1 is empty. I have used the following lines and when I run the code, the error is Unrecognized function or variable ‘Data_2’. I am unable to fix this. I really appreciate some help or insights into this.
% Load the MAT files
load(‘Data_1’);
load(‘Data_2’);
% Check if both structure arrays have the ‘Camera1’ field
if isfield(Data_1, ‘Camera1’) && isfield(Data_2, ‘Camera1’)
% Replace the ‘Camera1’ field in Data_1 with the one from Data_2
Data_1.Camera1 = Data_2.Camera1;
% Save the modified structure array with the same name or a new name
save(‘Data_1_modified.mat’, ‘Data_1’);
disp(‘Field replaced successfully.’);
else
disp(‘One or both of the structure arrays do not contain the field "Camera1".’);
end Hi. I have two structure arrays (Data_1 and Data_2) of same size and field names (Camera1, Camera2, Camera3). I want to replace the contents of Camera1 in Data_1 with the contents of Camera1 in Data_2. The field Camera1 in Data1 is empty. I have used the following lines and when I run the code, the error is Unrecognized function or variable ‘Data_2’. I am unable to fix this. I really appreciate some help or insights into this.
% Load the MAT files
load(‘Data_1’);
load(‘Data_2’);
% Check if both structure arrays have the ‘Camera1’ field
if isfield(Data_1, ‘Camera1’) && isfield(Data_2, ‘Camera1’)
% Replace the ‘Camera1’ field in Data_1 with the one from Data_2
Data_1.Camera1 = Data_2.Camera1;
% Save the modified structure array with the same name or a new name
save(‘Data_1_modified.mat’, ‘Data_1’);
disp(‘Field replaced successfully.’);
else
disp(‘One or both of the structure arrays do not contain the field "Camera1".’);
end structure arrays, array MATLAB Answers — New Questions
How do I find the orthogonal projection of a point onto a plane
Say I have a plane spanned by two vectors A and B. I have a point C=[x,y,z], I want to find the orthogonal projection of this point unto the plane spanned by the two vectors. How do I do this?Say I have a plane spanned by two vectors A and B. I have a point C=[x,y,z], I want to find the orthogonal projection of this point unto the plane spanned by the two vectors. How do I do this? Say I have a plane spanned by two vectors A and B. I have a point C=[x,y,z], I want to find the orthogonal projection of this point unto the plane spanned by the two vectors. How do I do this? orthogonal, projection, point, plane MATLAB Answers — New Questions
The enter key on word is acting strange
Hello guys,
I’m writing a report and one of my pages is acting strange. Every time I press enter, it puts it in the middle of the page. Anyone an idea why it puts this so far. This only happens on this page, I have tried everything I know but nothing solves this problem.
Hello guys,I’m writing a report and one of my pages is acting strange. Every time I press enter, it puts it in the middle of the page. Anyone an idea why it puts this so far. This only happens on this page, I have tried everything I know but nothing solves this problem. Read More
Copilot cancels discussion to show add.
I am a newer user to Copilot. I like the concept, but the execution is terrible. I do not like that it will not carry over a discussion from one window to the next. Even worse is that I can be in the middle of a discussion and an add will appear…. Which destroys any dialogue collected to this point.
Any thoughts?
I am a newer user to Copilot. I like the concept, but the execution is terrible. I do not like that it will not carry over a discussion from one window to the next. Even worse is that I can be in the middle of a discussion and an add will appear…. Which destroys any dialogue collected to this point.Any thoughts? Read More
Changing task type in PWA Enterprise EPT
Hi,
Can anyone tell me if there is a way to change, in PWA, the default Task Type in for the Microsoft ‘Enterprise Project’ EPT. Because we have this ‘Enterprise Project’ EPT set to be our default EPT, we cannot assign a Project Plan Template to it. It is defaulting to a ‘Take Type’ of ‘Fixed Unit’ currently but we would like to set is to a default or ‘Fixed Duration’ at the task level.
Thank you.
Hi, Can anyone tell me if there is a way to change, in PWA, the default Task Type in for the Microsoft ‘Enterprise Project’ EPT. Because we have this ‘Enterprise Project’ EPT set to be our default EPT, we cannot assign a Project Plan Template to it. It is defaulting to a ‘Take Type’ of ‘Fixed Unit’ currently but we would like to set is to a default or ‘Fixed Duration’ at the task level. Thank you. Read More
how to search in only sites that contain a certain keyword
In google a search like ‘keyword inurl:forums’ would turn only results that have the word forums in them. What is the equivalent in bing? Is there any way to only search forums?
In google a search like ‘keyword inurl:forums’ would turn only results that have the word forums in them. What is the equivalent in bing? Is there any way to only search forums? Read More
percentages
How do I enter a formula using percentages?
Example:
column e2= .9% of column c2
How do I enter a formula using percentages? Example:column e2= .9% of column c2 Read More
Is it possible to make flow based on an existing flow by simply copy and pasting the flow or saving
Is it possible to make flow based on an existing flow by simply copy and pasting the flow or saving it under another name? I suppose I could crate a new flow from scratch but the only difference is tha the database table that is fed the information is a new table and a slightly improved design.
Is it possible to make flow based on an existing flow by simply copy and pasting the flow or saving it under another name? I suppose I could crate a new flow from scratch but the only difference is tha the database table that is fed the information is a new table and a slightly improved design. Read More
Logic Apps Aviators Community Day 2024
On September 26, 2024 (Pacific Time) the Logic Apps Product Group will host a full day of learning where you will be the star! The Logic Apps Aviators Day is a free event driven by Microsoft, for anyone who wants to learn more about Logic Apps and how it can help to solve real life integration problems. In this full-day event, we will deep-dive into many aspects of Logic Apps with sessions from both Microsoft team and community. And we are looking for sessions of all types and lengths, from beginning to advance, from short demos to full sessions, and from patterns and practices to real life scenarios.
Call for Speakers
We want you to be the star of this show. We are opening this to anyone, from seasoned to first-time speakers and looking for all types of sessions, from patterns and practices to real life scenarios.
To guarantee that the event stream works smoothly, Sessions will be pre-recorded and should be no longer than 28 minutes long. But fret you not! Our team will help you record the session, so no experience recording sessions before is required.
Call for speakers are open from Wednesday May 15, 2024, to Sunday June 23, 2024
Speakers will be announced by email on July 1st, 2024.
Session recording will be organized between our team and the selected Speakers between Monday August 5, 2024 and Friday August 30, 2024.
If you are not able to record during that time, we reserve the right to find a replacement speaker.
Speakers are expected to be available during their session for answer for open questions, via chat. Our host and moderators will also be available to help answer questions during that time.
If you are keen to submit a session, please fill in our Call for Speakers form.
Code of Conduct
Our community is a diverse community of people from many backgrounds, industries, countries, and cultures who choose to spend their time sharing their experiences with using Microsoft’s products and services. It is a central destination for education and thought leadership on best practices, product news, live events, and roadmap.
We aim to make the Microsoft Azure Logic Apps Aviators Day a safe and welcoming environment for everyone to join and engage in. To achieve this goal, Microsoft does not tolerate the following in any aspect of the event:
Behavior that is disruptive, disrespectful, or degrading to others, including any messages, images, or interactions by anyone, in any form, regardless of location.
Harassment or discrimination based on age, ancestry, color, gender identity or expression, national origin, physical or mental disability, religion, sexual orientation, or any other characteristic protected by applicable local laws, regulations, and ordinances.
If Logic Apps Aviators Day organizers determines that your behavior doesn’t comply with these requirements, Microsoft has the sole discretion and the remove you from the event.
Microsoft Tech Community – Latest Blogs –Read More
Evaluate Small Language Models for RAG using Azure Prompt Flow (LLama3 vs Phi3)
Introduction:
Recently, small language models have made significant progress in terms of quality and context size. These advancements have enabled new possibilities, making it increasingly viable to leverage these models for retrieval-augmented generation (RAG) use cases. Particularly in scenarios where cost sensitivity is a key consideration, small language models offer an attractive alternative.
This post demonstrates how to use Azure ML Prompt Flow to create a Q&A solution using Small Language Models (SLMs) with your own data. It also compares the performance of two small language models: Phi3-mini-128K and Llama3-8B.
What is RAG? RAG stands for Retrieval Augmented Generation. It means adding context to the LLM input prompt by retrieving information from a corpus of data, hence grounding the model with your information. RAG helps to avoid the problems of the LLM making up facts or using outdated knowledge. With the new capabilities of SLM’s, like a context window of up to 128K tokens, using SLM’s for RAG solution is becoming more feasible.
Small language models (SLM’s) are more streamlined versions of LLMs, with fewer parameters and simpler architectures. SLM’s can be designed to process data locally and can be deployed on mobile devices. They can be trained with relatively small datasets and are more explainable which means RAG techniques can greatly enhance the performance and experience of an SLM.
– The Benefits of Small Language Model:
Less complex and more computationally efficient models like SLMs can excel at simple tasks such as:
Offline settings, on-device or on-prem, where local inference may be required.
Scenarios with latency constraints where quick response times are essential.
Tasks/use cases with cost limitations, especially those with simpler tasks.
Environments with limited resources.
Specific tasks can be achieved better through fine-tuning SLMs (vs. large model out-of-box)
– Benchmarking and evaluation:
Before deploying any solution to production, it’s recommended to assess and compare all the possible alternatives to address the use case, including small language models. This way, you can decide based on the balance between accuracy and cost.
Implementation:
Prepare the evaluation dataset:
We will use subset of Mini Wiki dataset as an evaluation dataset which includes:
– Source docs: Each Wiki article can be saved in a text file to make the indexing and vectorization easy.
– Q&A: In this blog we will use a subset of 50 questions and answers and save them as jsonl file. Here is the format:
{“question”:”The Celsius crater on the Moon is what?”,”answer”:”named after him”,”id”:148}
{“question”:”Is the Celsius crater on the Moon named after him ?”,”answer”:”Yes”,”id”:149}
….
Azure AI Search – Build the index:
You can use the integrated vectorization feature in Azure AI Search to index the source docs prepared in the first step: Announcing the Public Preview of Integrated Vectorization in Azure AI Search – Microsoft Community Hub
Model Catalog in Azure ML Studio – Deploy SLM Inferencing Endpoints:
From the model catalog in Azure ML Studio, deploy two inferencing endpoints for both “Phi3-mini-128k-instruct” and “Meta-Llama-3-8B-Instruct”. It may take up to 20 min to get the endpoint up and running.
Prompt flow – “Custom” connections: create 2 Custom connections to the end points created in the previous step:
When creating Custom connections, the required keys to set are:
– endpoint_url
This value can be found at the previously created Inferencing endpoint.
– endpoint_api_key
Ensure to set it as a secret value.
This value can be found at the previously created Inferencing endpoint.
– model_family
Supported values: LLAMA, DOLLY, GPT2, or FALCON
This value is dependent on the type of deployment you’re targeting. In our case it’s LLAMA for both models.
5. Prompt flow – Create Q&A on your data flow: clone the prompt flow “Q&A on your own data” template and start the runtime. you need to start the runtime before completing the next steps.
6. Prompt flow – Update “Lookup”: Connect “Lookup” which retrieves the source docs from the index created in step 2.
7. Prompt flow – Add “Open Model LLM” connector: you can find it from “More tools” button:
By default, the Prompt flow Q&A on your own data template uses “LLM” component to call Azure-Open-AI inferencing endpoint. Since we are using SLMs (MaaP) endpoint, we need to replace the template’s default “LLM” with “Open Model LLM” component to connect to the language models.
In the new “Open Model LLM” component, use the “Custom connections” created in an earlier step to connect to Llama3 then add another variant to connect to Phi3. This is how the final flow should look like.
8. Prompt flow – Tune the prompt: Here is the prompt we used to make the answer as short as possible which aligns with the ground_truth answers we are using.
system:
You are an AI assistant that helps users answer questions based on a specific context.
Your answer should be a one short sentence, as precise as possible and should only come from the context.
user:
<contexts>
{{contexts}}
Human:
<question>
{{question}}
AI:
9. Prompt flow – Evaluation and benchmark:
We have prepared the Q&A evaluation data from step 1 and two SLMs. To compare how well they perform, we can use the evaluation feature in Prompt flow, which makes it simple and convenient. We will use 2 built-in metrics:
– GPT Similarity: GPT4 judges how good the output is compared to the Ground truth.
– Ada similarity: Cosine similarity between the embeddings of output and GT.
So, we need Azure OpenAI GPT-4 endpoint and embedding endpoint as prerequisites to complete the evaluation setup.
To setup the evaluation, there are 4 steps:
– Evaluation Step 1- Basic settings:
– Evaluation Step 2- Upload eval data:
– Evaluation Step 3- Evaluation metrics:
– Evaluation Step 4- Configure the evaluation: important note – the Ground truth needs to be set as the answers from the evaluation data we uploaded.
Results:
With Prompt flow evaluation tool, you can inspect questions, responses and scores of different variations (prompts or models) at sample level as well as over the entire dataset. For this use case, using this evaluation dataset which consists of 50 questions, “Phi3-mini-128k-instruct” and “Meta-Llama-3-8B-Instruct” models achieved comparable ada-similarity and gpt-similarity score.
Meta-Llama-3-8B-Instruct
Phi3-mini-128k-instruct
ada-similarity
0.74
0.75
gpt-similarity (max is 5)
2.33
2.33
Screenshot of Comparing the batch runs of the 2 variants (Llama3 and Phi3) in Azure AI studio:
Conclusion:
This blog post discusses the benefits of using Small Language Models (SLMs) in certain scenarios. SLM’s are more computationally efficient than larger models. They are particularly useful in scenarios with latency constraints where quick response times are essential, in tasks/use cases with cost limitations, and in environments with limited resources. The blog post also discusses the importance of assessing and comparing all possible solutions, including SLM’s, before deploying to production. This should be an effort to balance quality and cost. Additionally, it provides a step-by-step guide of how to use Azure Prompt Flow to build a Q&A on your own data solution with SLM’s and compare the performance of different options of small language models, Meta-Llama-3-8B-Instruct and Phi3-mini-128k-instruct.
Microsoft Tech Community – Latest Blogs –Read More
Building Connections at the M365 Community Conference
The Microsoft 365 Community Conference is an annual event that brings together thousands of forward-thinking professionals looking to build their skills in the era of AI. The conference offers unmatched learning, professional development, and networking opportunities, with over 150 sessions covering the latest breakthroughs in Microsoft 365, Copilot, Viva, Teams, and more.
This article will explore the transformative experiences and key takeaways from the conference that could inspire other MVPs, how volunteering at the conference enhanced attendees’ understanding of the latest Microsoft 365 innovations, the ways in which the conference fostered community building and networking among MVPs, and the most impactful sessions and workshops for attendees. In particular, we are highlighting three United States M365 MVPs, Heather Severino, Joy Apple, and Susan Hanley, who played key roles at the conference.
The Microsoft 365 Community Conference not only disseminated knowledge through its diverse sessions but also cemented the essence of community through in-person exchanges, exemplified by Heather well-attended workshops with over 500 attendees and the attendance and participation of Roberto Bojorquez, Microsoft Product Manager for Tasks and ToDo. These interactions underscored the unique value of face-to-face meetings in fostering deeper connections and facilitating real-time collaboration among the Microsoft 365 community.
MVP Heather Severino at the Microsoft 365 Conference
This conference not only highlighted the irreplaceable benefits of direct human interaction, as seen in Heather‘s sessions, but also put a spotlight on the transformative potential of M365 tools like Copilot and Viva, which are designed to enrich the employee experience and address real-world business needs in a holistic and people-focused manner.
For instance, Joy spoke about the importance of governance in preparing for Copilot, a sentiment echoed by the attending MVPs who agreed that governance is now a priority for CIOs, CEOs, and CTOs. With sixteen sessions addressing governance from the perspective of Copilot readiness and adoption, attendees learned the importance of having a strong governance framework in place to ensure the effective use of the technology.
The emphasis on governance at the conference not only highlighted the necessity of a robust framework for Copilot’s success but also underscored the Microsoft 365 Community Conference’s role in revitalizing a sense of unity and purpose among its participants. This synergy between governance and community engagement, as articulated by Joy and experienced by the attendees, reflects a comprehensive approach to technology adoption where learning and collaboration are as crucial as the technical aspects of implementation. As Joy stated, “the Microsoft 365 Community Conference, is a vibrant blend of education and inspiration, experienced a resurgence of its communal spark this year, reigniting connections that had waned during the pandemic.” Attendees found value in the engaging interactions and the sense of community and belonging that these events provided.
Meanwhile, MVPs played key roles, from managing information desks to leading discussions on Microsoft technologies, which were fulfilling and beneficial for personal growth and community development. Heather states “volunteering in these capacities was rewarding, offering personal interactions and aiding in career and technology advancement for many.” These contributions were pivotal in nurturing the community and sparking ideas for future events and collaborations. They not only contribute to the growth of the community but also offer learning opportunities from peers and Microsoft teams and inspire ideas for future local and conference events. This involvement is instrumental in shaping future collaborations and community initiatives.
MVP Joy Apple at the Microsoft 365 Conference
Susan also played a pivotal role at the conference, leading community tracks and adapting to Viva Topics’ deprecation. Her volunteer work led to a fortuitous connection with an education expert, resulting in mutual benefits and a new friendship. Concurrently, Heather, while volunteering as community staffer, interacted with the Microsoft Copilot team, gaining insights into the product’s features and witnessing a demonstration of a new feature for summarizing Word documents online.
Bridging the gap between individual contributions and collective enlightenment, the conference not only highlighted the personal journeys of Susan and Heather but also echoed the broader narrative of empowerment through ‘power skills’, where technology serves as a catalyst for ethical advancement and human-centric growth. Microsoft 365 Copilot sessions provided insights on governance, security, and adoption, emphasizing responsible usage and training. The workshops, particularly on communication and adoption, were impactful, drawing significant attendance and engagement over technical sessions. Joy spoke specifically about Microsoft’s commitment to these power skills, particularly through sessions on mentoring and allyship, underscores the importance of the human aspect in technology.
MVP Volunteers at the Microsoft 365 Conference
In conclusion, the Microsoft 365 Community Conference was a resounding success, bringing together professionals from all over the world to learn about the latest innovations in Microsoft 365, including Copilot and Viva. The conference offered attendees the opportunity to attend sessions on a wide range of topics, including governance, employee experience, and community building. Attendees shared transformative experiences, exchanged valuable advice, and built new connections, highlighting the value of in-person events. The conference showcased the power of Microsoft 365 to drive innovation and solve real business challenges, and left attendees inspired and ready to implement what they had learned. For an event recap, feel free to check out this article.
Microsoft Tech Community – Latest Blogs –Read More
Substitute partial differential into symfun
Because my actual functions are very complex, I would like to calculate the derivative of nested functions first and then substitute the functions afterwards.
A minimal example looks like this:
syms G(h) h(t) t
Q = G(h)
dGdt = diff(Q,t) % -> D(G)(h(t)) occurs
% Now define G(h) and derive:
G = h^2;
dGdh = diff(G,h)
How is it possible, to insert the derivative of G with respect to h as the partial derivative?
I tried this, but it is not working:
% dQ_subs = subs(dGdt, D(G), dGdh)
% dQ_subs = subs(dGdt, D(G)(h(t)), dGdh)
I really appreciate any feedback!Because my actual functions are very complex, I would like to calculate the derivative of nested functions first and then substitute the functions afterwards.
A minimal example looks like this:
syms G(h) h(t) t
Q = G(h)
dGdt = diff(Q,t) % -> D(G)(h(t)) occurs
% Now define G(h) and derive:
G = h^2;
dGdh = diff(G,h)
How is it possible, to insert the derivative of G with respect to h as the partial derivative?
I tried this, but it is not working:
% dQ_subs = subs(dGdt, D(G), dGdh)
% dQ_subs = subs(dGdt, D(G)(h(t)), dGdh)
I really appreciate any feedback! Because my actual functions are very complex, I would like to calculate the derivative of nested functions first and then substitute the functions afterwards.
A minimal example looks like this:
syms G(h) h(t) t
Q = G(h)
dGdt = diff(Q,t) % -> D(G)(h(t)) occurs
% Now define G(h) and derive:
G = h^2;
dGdh = diff(G,h)
How is it possible, to insert the derivative of G with respect to h as the partial derivative?
I tried this, but it is not working:
% dQ_subs = subs(dGdt, D(G), dGdh)
% dQ_subs = subs(dGdt, D(G)(h(t)), dGdh)
I really appreciate any feedback! symbolic, differentiation, partial derivative MATLAB Answers — New Questions
bug in coherence phase angle
tried wcoherence(x,y,days(1))
got
Dot indexing is not supported for variables of this type.
Error in angle (line 9)
th = angle( h.U + i * h.V );
Error in wcoherence>plotcoherenceperiod (line 627)
theta = angle(wcs);
Error in wcoherence (line 249)
plotcoherenceperiod(wtc,crossCFS,dtFunc(f),t,dtFunc(coitmp),…tried wcoherence(x,y,days(1))
got
Dot indexing is not supported for variables of this type.
Error in angle (line 9)
th = angle( h.U + i * h.V );
Error in wcoherence>plotcoherenceperiod (line 627)
theta = angle(wcs);
Error in wcoherence (line 249)
plotcoherenceperiod(wtc,crossCFS,dtFunc(f),t,dtFunc(coitmp),… tried wcoherence(x,y,days(1))
got
Dot indexing is not supported for variables of this type.
Error in angle (line 9)
th = angle( h.U + i * h.V );
Error in wcoherence>plotcoherenceperiod (line 627)
theta = angle(wcs);
Error in wcoherence (line 249)
plotcoherenceperiod(wtc,crossCFS,dtFunc(f),t,dtFunc(coitmp),… bug in coherence MATLAB Answers — New Questions
alternative of inline function
How can i use anonymous function instead of inline?
For example, I introduced a function f=@(x) x^2-2x.
Now, I want to, derivative f(x) and store it in function g(x). and find g(a) where a is a constant ie a=5.How can i use anonymous function instead of inline?
For example, I introduced a function f=@(x) x^2-2x.
Now, I want to, derivative f(x) and store it in function g(x). and find g(a) where a is a constant ie a=5. How can i use anonymous function instead of inline?
For example, I introduced a function f=@(x) x^2-2x.
Now, I want to, derivative f(x) and store it in function g(x). and find g(a) where a is a constant ie a=5. inline, anonymous function MATLAB Answers — New Questions
t-sne visualization of Vision transformer
How to visualize the features of the vision transfomer after training using t-sne visualizion?
example of vision transformer: https://se.mathworks.com/help/deeplearning/ug/train-vision-transformer-network-for-image-classification.html
and t-sne visualization of CNN: https://se.mathworks.com/help/deeplearning/ug/view-network-behavior-using-tsne.html
I could not apply the same in vision transformer beacuse there are an error during using actication function as follows:
earlyLayerName = "’encoderblock1_mha1";
pool1Activations = activations(net,…
augimdsTrain,earlyLayerName,"OutputAs","rows");How to visualize the features of the vision transfomer after training using t-sne visualizion?
example of vision transformer: https://se.mathworks.com/help/deeplearning/ug/train-vision-transformer-network-for-image-classification.html
and t-sne visualization of CNN: https://se.mathworks.com/help/deeplearning/ug/view-network-behavior-using-tsne.html
I could not apply the same in vision transformer beacuse there are an error during using actication function as follows:
earlyLayerName = "’encoderblock1_mha1";
pool1Activations = activations(net,…
augimdsTrain,earlyLayerName,"OutputAs","rows"); How to visualize the features of the vision transfomer after training using t-sne visualizion?
example of vision transformer: https://se.mathworks.com/help/deeplearning/ug/train-vision-transformer-network-for-image-classification.html
and t-sne visualization of CNN: https://se.mathworks.com/help/deeplearning/ug/view-network-behavior-using-tsne.html
I could not apply the same in vision transformer beacuse there are an error during using actication function as follows:
earlyLayerName = "’encoderblock1_mha1";
pool1Activations = activations(net,…
augimdsTrain,earlyLayerName,"OutputAs","rows"); deep learning, machine learning, computer vision, vision transformer MATLAB Answers — New Questions