Month: August 2024
Monthly news – August 2024
Microsoft Defender XDR
Monthly news
August 2024 Edition
This is our monthly “What’s new” blog post, summarizing product updates and various new assets we released over the past month across our Defender products. In this edition, we are looking at all the goodness from July 2024. Defender for Cloud has it’s own Monthly News post, have a look at their blog space.
Legend:
Product videos
Webcast (recordings)
Docs on Microsoft
Blogs on Microsoft
GitHub
External
Improvements
Previews / Announcements
Unified Security Operations Platform: Microsoft Defender XDR & Microsoft Sentinel
(GA) The Microsoft unified security operations platform in the Microsoft Defender portal is generally available. This release brings together the full capabilities of Microsoft Sentinel, Microsoft Defender XDR, and Microsoft Copilot in Microsoft Defender. For more information, see the following resources:
Blog post: General availability of the Microsoft unified security operations platform
Ninja Show episode: Unified Security Operations Platform GA launch
Documentation: Microsoft Sentinel in the Microsoft Defender portal
Documentation: Connect Microsoft Sentinel to Microsoft Defender XDR
Documentation: Microsoft Copilot in Microsoft Defender
(Preview) You can now customize columns in the Incidents and Alerts queues in the Microsoft Defender portal. You can add, remove, reorder columns to display the information you need. For more information, see how to customize columns in the incident queue and alert queue.
(GA) Filtering Defender for Cloud alerts by the associated alert subscription ID in the Incidents and Alerts queues is now generally available. For more information, see Defender for Cloud in Defender XDR.
Incidents with alerts where a compromised device communicated with an operational technology (OT) device are now visible in the Microsoft Defender portal through the Defender for IoT license and Defender for Endpoint’s device discovery capabilities. Using Defender for Endpoint data, Defender XDR automatically correlates these new OT alerts to incidents to provide a comprehensive attack story. To filter related incidents, see Prioritize incidents in the Microsoft Defender portal.
Blog: Make OT security a core part of your SOC strategy with Microsoft Defender XDR
(Preview) Critical assets are now part of the tags in the incident and alert queues. When a critical asset is involved in an incident or alert, the critical asset tag is displayed in the queues. For more information, see incident tags and the alert queue.
(Preview) Incidents are now arranged according to the latest automatic or manual updates made to an incident. Read about the last update time column in the incident queue.
Learning hub resources have moved from the Microsoft Defender portal to learn.microsoft.com. Access Microsoft Defender XDR Ninja training, learning paths, training modules and more. Browse the list of learning paths, and filter by product, role, level, and subject.
(GA) The UrlClickEvents table in advanced hunting is now generally available. Use this table to get information about Safe Links clicks from email messages, Microsoft Teams, and Office 365 apps in supported desktop, mobile, and web apps.
(GA) You can now release or move email messages from quarantine back to the user’s inbox directly from Take actions in advanced hunting and in custom detections. This allows security operators to manage false positives more efficiently and without losing context.
Microsoft Security Exposure Management
Microsoft Security Exposure Management is a security solution that provides a unified view of security posture across company assets and workloads. Security Exposure Management enriches asset information with security context that helps you to proactively manage attack surfaces, protect critical assets, and explore and mitigate exposure risk. Security Exposure Management is currently in public preview. Check out our documentation to learn more.
Microsoft Defender for IoT
Incidents with alerts where a compromised device communicated with an operational technology (OT) device are now visible in the Microsoft Defender portal through the Defender for IoT license and Defender for Endpoint’s device discovery capabilities. Using Defender for Endpoint data, Defender XDR automatically correlates these new OT alerts to incidents to provide a comprehensive attack story. To filter related incidents, see Prioritize incidents in the Microsoft Defender portal.
Blog: Make OT security a core part of your SOC strategy with Microsoft Defender XDR
Microsoft Defender for Endpoint
Reduce friction and protect faster with simplified Android onboarding. We’re excited to announce that a simplified onboarding experience in Defender for Endpoint on Android devices is now available in public preview. Read more here.
Microsoft Defender for Cloud Apps
(Preview) In-browser protection for macOS users and newly supported policies.
Edge browser users from macOS, scoped to session policies, are now protected with in-browser protection.
Learn more in our documentation.
(Preview) Configure and embed a custom support URL in Block pages.
Customize the Defender for Cloud Apps block experience for apps that are blocked using Cloud Discovery. Learn more in our documentation.
(GA) Filtering Defender for Cloud alerts by the associated alert subscription ID in the Incidents and Alerts queues is now generally available. For more information, see Defender for Cloud in Defender XDR.
Microsoft Defender for Office 365
Bulk Senders Insight: Optimizing Bulk Email Management for Enterprises. We’re excited to introduce Bulk Senders Insight – a sophisticated simulation tool designed to empower admins in fine-tuning bulk email policies. This tool offers real-time simulations that help identify the optimal BCL and identify potential FPs and FNs based on user preferences across your tenant. This feature will be rolling out to your tenants from August. Watch for a Message Center post about this.
Announcing quarantine release integration in Defender for Office 365 hunting experience!! This enhancement allows Security Operators to address false positives more efficiently and with greater flexibility.
Announcing Defender for Office 365 API’s for retrieving threat data and remediating emails. These new Defender for Office 365 API’s enable security teams to leverage threat information and response capabilities of Defender for Office 365 inside automation and security orchestration tools of their choice.
(GA) The UrlClickEvents table in advanced hunting is now generally available. Use this table to get information about Safe Links clicks from email messages, Microsoft Teams, and Office 365 apps in supported desktop, mobile, and web apps.
(GA) You can now release or move email messages from quarantine back to the user’s inbox directly from Take actions in advanced hunting and in custom detections. This allows security operators to manage false positives more efficiently and without losing context.
Tenant Allow/Block List in Microsoft 365 GCC, GCC High, DoD and and Office 365 operated by 21Vianet environments: The Tenant Allow/Block List is now available in these environments. They are on parity with the WW commercial experiences. Learn more in our documentation.
45 days after last used date: The value Remove allow entry after > 45 days after last used date is now the default on new allow entries from submissions and existing allow entries in the Tenant Allow/Block List. Learn more in our documentation.
Microsoft Defender Vulnerability Management
Guidance for handling “regreSSHion” (CVE-2024-6387) using Microsoft Security capabilities.
Using Export API with Defender Vulnerability Management. Defender Vulnerability Management provides an export API that allows programmatic access to vulnerability data. The API can be used to automate vulnerability management tasks, integrate vulnerability data with other security tools, and generate custom reports and dashboards. In this blog, we share guidance and best practices for using Defender Vulnerability Management Export API.
Microsoft Security Blogs
Mitigating Skeleton Key, a new type of generative AI jailbreak technique
Microsoft recently discovered a new type of generative AI jailbreak method called Skeleton Key that could impact the implementations of some large and small language models. This new method has the potential to subvert either the built-in model safety or platform safety systems and produce any content.
Onyx Sleet uses array of malware to gather intelligence for North Korea
On July 25, 2024, the United States Department of Justice (DOJ) indicted an individual linked to the North Korean threat actor that Microsoft tracks as Onyx Sleet. Microsoft Threat Intelligence collaborated with the Federal Bureau of Investigation (FBI) in tracking activity associated with Onyx Sleet. We will continue to closely monitor Onyx Sleet’s activity to assess changes following the indictment.
Vulnerabilities in PanelView Plus devices could lead to remote code execution
Microsoft discovered and responsibly disclosed two vulnerabilities in Rockwell’s PanelView Plus that could be remotely exploited by unauthenticated attackers, allowing them to perform remote code execution (RCE) and denial-of-service (DoS). PanelView Plus devices are graphic terminals, which are known as human machine interface (HMI) and are used in the industrial space.
Ransomware operators exploit ESXi hypervisor vulnerability for mass encryption
Microsoft Security researchers have observed a vulnerability used by various ransomware operators to get full administrative access to domain-joined ESXi hypervisors and encrypt the virtual machines running on them. The vulnerability involves creating a group called “ESX Admins” in Active Directory and adding an attacker-controlled user account to this group.
Microsoft Tech Community – Latest Blogs –Read More
Design a feedback controller to control pH value of a non linear system
Hi all!.
I am working on a question where we calculate an optimal dosage using multiple sensor inputs. Then we send the calculated dosage to the plant and we monitor the pH value. Right now we have an open loop system. I want to maintain the output pH value in a range of 5.2 to 5.8 by introducing a feedback and a PID controller.
I have previous data about the dosage we calculated and the resulted pH values.Hi all!.
I am working on a question where we calculate an optimal dosage using multiple sensor inputs. Then we send the calculated dosage to the plant and we monitor the pH value. Right now we have an open loop system. I want to maintain the output pH value in a range of 5.2 to 5.8 by introducing a feedback and a PID controller.
I have previous data about the dosage we calculated and the resulted pH values. Hi all!.
I am working on a question where we calculate an optimal dosage using multiple sensor inputs. Then we send the calculated dosage to the plant and we monitor the pH value. Right now we have an open loop system. I want to maintain the output pH value in a range of 5.2 to 5.8 by introducing a feedback and a PID controller.
I have previous data about the dosage we calculated and the resulted pH values. pid, ph, feedback control MATLAB Answers — New Questions
Global Administrator Issue
Please be advised that the verification process for your IWE request could not be completed.
The service request will be closed since Microsoft is not able to intervene in any internal dispute.
Thank you for contacting the Microsoft 365 Data Protection Team.
Is there any other Solution for this because the global admin not sharing passwords with the company and asking for extra money
***Need help in this matter***
Please be advised that the verification process for your IWE request could not be completed. The service request will be closed since Microsoft is not able to intervene in any internal dispute. Thank you for contacting the Microsoft 365 Data Protection Team. Is there any other Solution for this because the global admin not sharing passwords with the company and asking for extra money ***Need help in this matter*** Read More
VLookup formula into IF sum
Hi,
I am trying to make a formula for the below:
If text in column D is “No”, calculate in column F =IF(E19>TODAY(),”Overdue”,””)
Does anyone know how to integrate a Vlookup into the IF sum?
Thanks.
Hi, I am trying to make a formula for the below: If text in column D is “No”, calculate in column F =IF(E19>TODAY(),”Overdue”,””) Does anyone know how to integrate a Vlookup into the IF sum? Thanks. Read More
Blocking USB slots in Intune
Dear Reader,
because of security reasons, I want to block all the USB slots of our clients.
On different websides I was told to go to Intunes – Devices – Windows – Configuration and create a new “GPO” policy by choosing an administrative template called “prevent installation of devices not described….” and include the user group. In a second step I need to exclude all the hardware I do not want to be blocked, like keyboard, mouse….
But after all that doesn´t seem to work.
After waiting a few hours, in hope the test client would drag the “GPO”, I could still use my own USB Stick. (Btw: is there a way to synchronise instead of waiting? Like the old gpupdate /force in cmd? and without the “synchronise” in the company portal?)
After that fail, I did the same in Endpoint security and that works fine. All the USB slots are locked.
So was it just a wrong infromation to do it with a configuration profile?
Where is the difference between configuration profile and endpoint security?
In a next step I want to lock down USB in booting the PC as well. Is that possible?
Thanks a lot for any hint.
Have a nice day.
Hilmar
Dear Reader, because of security reasons, I want to block all the USB slots of our clients.On different websides I was told to go to Intunes – Devices – Windows – Configuration and create a new “GPO” policy by choosing an administrative template called “prevent installation of devices not described….” and include the user group. In a second step I need to exclude all the hardware I do not want to be blocked, like keyboard, mouse…. But after all that doesn´t seem to work.After waiting a few hours, in hope the test client would drag the “GPO”, I could still use my own USB Stick. (Btw: is there a way to synchronise instead of waiting? Like the old gpupdate /force in cmd? and without the “synchronise” in the company portal?) After that fail, I did the same in Endpoint security and that works fine. All the USB slots are locked. So was it just a wrong infromation to do it with a configuration profile? Where is the difference between configuration profile and endpoint security? In a next step I want to lock down USB in booting the PC as well. Is that possible? Thanks a lot for any hint. Have a nice day. Hilmar Read More
wt is the Activation Key for activating MATLAB Simulink
Activation KeyActivation Key Activation Key provide activation key for matlab MATLAB Answers — New Questions
vgg16 not installed as Deep learning toolbox has missing this package
Error using vgg16 (line 60)
vgg16 requires the Deep Learning Toolbox Model for VGG-16 Network support package. To install this support package, use the Add-On Explorer.
How can we run the program without package installed? Is there any solution?Error using vgg16 (line 60)
vgg16 requires the Deep Learning Toolbox Model for VGG-16 Network support package. To install this support package, use the Add-On Explorer.
How can we run the program without package installed? Is there any solution? Error using vgg16 (line 60)
vgg16 requires the Deep Learning Toolbox Model for VGG-16 Network support package. To install this support package, use the Add-On Explorer.
How can we run the program without package installed? Is there any solution? neural network model, vgg16 MATLAB Answers — New Questions
Using FFT Coefficients/Descriptors to reconstruct particle shape
Hi, I am trying to use Fourier descriptors to reconstruct the shape of a particle. I have written most of the code (with a lot of help) and only the last step which involves using Fourier descriptors to reconstruct the shape of the original image remains.
I need help to know which functions to use to achieve this. I would really appreciate if anyone could help.
Here is the code:
I have also attached the original image and another file which demonstrates what I need to do.
scale_factor = 100/90; % (units: microns/pixel)
% to convert pixels to microns,
% multiply # of pixels by scale_factor
%1. Open and show image of particle
img = imread(‘1_50.JPG’); %Read image
subplot (3,3,1)
imshow(img) %show image
%2. Binarize and show image
BW = im2bw(img,0.45); %binarize image with a threshold value of 0.45
img1= bwareaopen (BW, 1000); %Remove small objects
img2= imfill(img1, ‘holes’); %fill holes
subplot(3,3,2)
imshow(img2) %show binarized image
%3. Setting up the axes
% for plotting into multiple axes in one loop, it’s convenient to set up
% all the axes first, before anything is plotted into them
% 3.1. set up the 2nd axes:
ax3 = subplot(3,3,3);
hold on
box on %draws a box that encompasses the entire axes area
axis image %sets the aspect ratio of the axes (ax2) to be equal and
%adjusts the limits of the axes so that the data units are
%of equal size along both the x-axis and y-axis.
set(ax3,’YDir’,’reverse’) %reverses the y-axis to begin from the top
%since the origin of the image is at the top left-corner
% 3.2. set up the 3rd axes:
ax4 = subplot(3,3,4);
hold on
%4. Compute centroid of binarized image
centriod_value= regionprops(img2, ‘Centroid’); %Finds centroid of image
centroid = cat(1,centriod_value.Centroid); %Stores centroid coordinates in a two-column matrix
%5. Tracing the boundary of image
p_boundary= bwboundaries(img2); % trace the exterior boundaries of particle
%(in row, column order, not x,y)
number_of_boundaries = size(p_boundary,1); %specify only one boundary
centroid = centroid*scale_factor;
% 6. Setting up equally spaced angles before initing the loop
%use 129 points to have an angle spacing of 360/128
N_angles = 129;
interp_angles = linspace(0,360,N_angles).’;
%7. Initiate for loop to plot boundary, centroid, & a graph of radius vs angle
for k = 1 : number_of_boundaries % initiate loop to go round the selected boundary
thisBoundary = p_boundary{k}*scale_factor;
y = thisBoundary(:,1); % rows
x = thisBoundary(:,2); % columns
plot(ax3, x, y, ‘g’, ‘LineWidth’, 2);
plot(ax3, centroid(:,1),centroid(:,2),’b.’)
% 7.1. Calculate the angles in degrees
deltaY = thisBoundary(:,1) – centroid(k,2); % boundary(:,1) is y, but centroid(k,2) is y
deltaX = thisBoundary(:,2) – centroid(k,1); % boundary(:,2) is x, but centroid(k,1) is x
% angles = atand(deltaY ./ deltaX); % atand gives angles in range [-90,90]
angles = atan2d(deltaY,deltaX); % use atan2d to get angles in range [-180,180]
% 7.2. Calculate the radii
radius = sqrt(deltaY.^2 + deltaX.^2); % use deltaX and deltaY, which were just calculated
% 7.3. Add 360 degrees to negative angles so that range is [0,360] instead of [-180,180]
idx = angles < 0; %idx reps angles less than 0 degreees
angles(idx) = angles(idx)+360; %360 degrees is added to idx angles
%7.4. Sort angles in ascending order
% sort the angles, so the first one is smallest (closest to zero)
% and the last one is largest (closest to 360)
% this is useful for getting a smooth line that goes from 0 to 360 in the plot
% I returns the corresponding indices of the angles
[angles,I] = sort(angles);
%7.5. Reorder distances the same way angles was reordered using I
radius = radius(I);
%7.6. Use only unique angles in case an angle is repeated
% in case any angles are repeated, use only the unique set and
% corresponding distances in interp1 (in this data, one angle is
% repeated twice, with the same distance each time)
%The ~ (tilde) here is a placeholder indicating that we’re not interested
%in capturing the actual unique elements, only their indices
[~,I] = unique(angles);
% 7.7. perform linear interpolation/extrapolation:
%angles(I)= sample points, radius(I)= correspoinding points
%and interp_angles = coordinates of the querry points (QP)
%In general, the functions returns interpolated values at specific QP
interp_distances = interp1(angles(I),radius(I),interp_angles,’linear’,’extrap’);
% 7.8 Plot distance vs. angle.
plot(ax4,interp_angles,interp_distances)
end
%8. Apply fft algorithm to values of radius
L = length(interp_distances); %Define the number of the radiuses (points)
f = 0:L-1; %Define the sampling frequencies
A = fft(interp_distances); %Transforming the radius function into frequency domain using FFT
B = (abs(A)/2535.2); % Normalize the amplitude of fourier descriptors using the first descriptors
%9. Plot fft descriptor vs. frequency
subplot(3,3,5)
bar(f,B,3) %plot the frequencies vs. the nornalised descriptors
xlim([0 128])
%10. Plot phase angle vs. frequency
subplot(3,3,6)
bar(f, angle(A),3) % plot the frequencies vs phase angles
xlim([0 128])
ylim([-4 4])
%11. Create a table of values
table1 = table(A, f’, abs(A), B, angle(A));
table1.Properties.VariableNames = {‘FFT_coeffs’, ‘Frequency’, ‘Amplitude’, ‘Norm_Amplitude’ ‘Phase’};
disp(table1);
%12. Reconstruct particle boundary using FFT descriptors ?????Hi, I am trying to use Fourier descriptors to reconstruct the shape of a particle. I have written most of the code (with a lot of help) and only the last step which involves using Fourier descriptors to reconstruct the shape of the original image remains.
I need help to know which functions to use to achieve this. I would really appreciate if anyone could help.
Here is the code:
I have also attached the original image and another file which demonstrates what I need to do.
scale_factor = 100/90; % (units: microns/pixel)
% to convert pixels to microns,
% multiply # of pixels by scale_factor
%1. Open and show image of particle
img = imread(‘1_50.JPG’); %Read image
subplot (3,3,1)
imshow(img) %show image
%2. Binarize and show image
BW = im2bw(img,0.45); %binarize image with a threshold value of 0.45
img1= bwareaopen (BW, 1000); %Remove small objects
img2= imfill(img1, ‘holes’); %fill holes
subplot(3,3,2)
imshow(img2) %show binarized image
%3. Setting up the axes
% for plotting into multiple axes in one loop, it’s convenient to set up
% all the axes first, before anything is plotted into them
% 3.1. set up the 2nd axes:
ax3 = subplot(3,3,3);
hold on
box on %draws a box that encompasses the entire axes area
axis image %sets the aspect ratio of the axes (ax2) to be equal and
%adjusts the limits of the axes so that the data units are
%of equal size along both the x-axis and y-axis.
set(ax3,’YDir’,’reverse’) %reverses the y-axis to begin from the top
%since the origin of the image is at the top left-corner
% 3.2. set up the 3rd axes:
ax4 = subplot(3,3,4);
hold on
%4. Compute centroid of binarized image
centriod_value= regionprops(img2, ‘Centroid’); %Finds centroid of image
centroid = cat(1,centriod_value.Centroid); %Stores centroid coordinates in a two-column matrix
%5. Tracing the boundary of image
p_boundary= bwboundaries(img2); % trace the exterior boundaries of particle
%(in row, column order, not x,y)
number_of_boundaries = size(p_boundary,1); %specify only one boundary
centroid = centroid*scale_factor;
% 6. Setting up equally spaced angles before initing the loop
%use 129 points to have an angle spacing of 360/128
N_angles = 129;
interp_angles = linspace(0,360,N_angles).’;
%7. Initiate for loop to plot boundary, centroid, & a graph of radius vs angle
for k = 1 : number_of_boundaries % initiate loop to go round the selected boundary
thisBoundary = p_boundary{k}*scale_factor;
y = thisBoundary(:,1); % rows
x = thisBoundary(:,2); % columns
plot(ax3, x, y, ‘g’, ‘LineWidth’, 2);
plot(ax3, centroid(:,1),centroid(:,2),’b.’)
% 7.1. Calculate the angles in degrees
deltaY = thisBoundary(:,1) – centroid(k,2); % boundary(:,1) is y, but centroid(k,2) is y
deltaX = thisBoundary(:,2) – centroid(k,1); % boundary(:,2) is x, but centroid(k,1) is x
% angles = atand(deltaY ./ deltaX); % atand gives angles in range [-90,90]
angles = atan2d(deltaY,deltaX); % use atan2d to get angles in range [-180,180]
% 7.2. Calculate the radii
radius = sqrt(deltaY.^2 + deltaX.^2); % use deltaX and deltaY, which were just calculated
% 7.3. Add 360 degrees to negative angles so that range is [0,360] instead of [-180,180]
idx = angles < 0; %idx reps angles less than 0 degreees
angles(idx) = angles(idx)+360; %360 degrees is added to idx angles
%7.4. Sort angles in ascending order
% sort the angles, so the first one is smallest (closest to zero)
% and the last one is largest (closest to 360)
% this is useful for getting a smooth line that goes from 0 to 360 in the plot
% I returns the corresponding indices of the angles
[angles,I] = sort(angles);
%7.5. Reorder distances the same way angles was reordered using I
radius = radius(I);
%7.6. Use only unique angles in case an angle is repeated
% in case any angles are repeated, use only the unique set and
% corresponding distances in interp1 (in this data, one angle is
% repeated twice, with the same distance each time)
%The ~ (tilde) here is a placeholder indicating that we’re not interested
%in capturing the actual unique elements, only their indices
[~,I] = unique(angles);
% 7.7. perform linear interpolation/extrapolation:
%angles(I)= sample points, radius(I)= correspoinding points
%and interp_angles = coordinates of the querry points (QP)
%In general, the functions returns interpolated values at specific QP
interp_distances = interp1(angles(I),radius(I),interp_angles,’linear’,’extrap’);
% 7.8 Plot distance vs. angle.
plot(ax4,interp_angles,interp_distances)
end
%8. Apply fft algorithm to values of radius
L = length(interp_distances); %Define the number of the radiuses (points)
f = 0:L-1; %Define the sampling frequencies
A = fft(interp_distances); %Transforming the radius function into frequency domain using FFT
B = (abs(A)/2535.2); % Normalize the amplitude of fourier descriptors using the first descriptors
%9. Plot fft descriptor vs. frequency
subplot(3,3,5)
bar(f,B,3) %plot the frequencies vs. the nornalised descriptors
xlim([0 128])
%10. Plot phase angle vs. frequency
subplot(3,3,6)
bar(f, angle(A),3) % plot the frequencies vs phase angles
xlim([0 128])
ylim([-4 4])
%11. Create a table of values
table1 = table(A, f’, abs(A), B, angle(A));
table1.Properties.VariableNames = {‘FFT_coeffs’, ‘Frequency’, ‘Amplitude’, ‘Norm_Amplitude’ ‘Phase’};
disp(table1);
%12. Reconstruct particle boundary using FFT descriptors ????? Hi, I am trying to use Fourier descriptors to reconstruct the shape of a particle. I have written most of the code (with a lot of help) and only the last step which involves using Fourier descriptors to reconstruct the shape of the original image remains.
I need help to know which functions to use to achieve this. I would really appreciate if anyone could help.
Here is the code:
I have also attached the original image and another file which demonstrates what I need to do.
scale_factor = 100/90; % (units: microns/pixel)
% to convert pixels to microns,
% multiply # of pixels by scale_factor
%1. Open and show image of particle
img = imread(‘1_50.JPG’); %Read image
subplot (3,3,1)
imshow(img) %show image
%2. Binarize and show image
BW = im2bw(img,0.45); %binarize image with a threshold value of 0.45
img1= bwareaopen (BW, 1000); %Remove small objects
img2= imfill(img1, ‘holes’); %fill holes
subplot(3,3,2)
imshow(img2) %show binarized image
%3. Setting up the axes
% for plotting into multiple axes in one loop, it’s convenient to set up
% all the axes first, before anything is plotted into them
% 3.1. set up the 2nd axes:
ax3 = subplot(3,3,3);
hold on
box on %draws a box that encompasses the entire axes area
axis image %sets the aspect ratio of the axes (ax2) to be equal and
%adjusts the limits of the axes so that the data units are
%of equal size along both the x-axis and y-axis.
set(ax3,’YDir’,’reverse’) %reverses the y-axis to begin from the top
%since the origin of the image is at the top left-corner
% 3.2. set up the 3rd axes:
ax4 = subplot(3,3,4);
hold on
%4. Compute centroid of binarized image
centriod_value= regionprops(img2, ‘Centroid’); %Finds centroid of image
centroid = cat(1,centriod_value.Centroid); %Stores centroid coordinates in a two-column matrix
%5. Tracing the boundary of image
p_boundary= bwboundaries(img2); % trace the exterior boundaries of particle
%(in row, column order, not x,y)
number_of_boundaries = size(p_boundary,1); %specify only one boundary
centroid = centroid*scale_factor;
% 6. Setting up equally spaced angles before initing the loop
%use 129 points to have an angle spacing of 360/128
N_angles = 129;
interp_angles = linspace(0,360,N_angles).’;
%7. Initiate for loop to plot boundary, centroid, & a graph of radius vs angle
for k = 1 : number_of_boundaries % initiate loop to go round the selected boundary
thisBoundary = p_boundary{k}*scale_factor;
y = thisBoundary(:,1); % rows
x = thisBoundary(:,2); % columns
plot(ax3, x, y, ‘g’, ‘LineWidth’, 2);
plot(ax3, centroid(:,1),centroid(:,2),’b.’)
% 7.1. Calculate the angles in degrees
deltaY = thisBoundary(:,1) – centroid(k,2); % boundary(:,1) is y, but centroid(k,2) is y
deltaX = thisBoundary(:,2) – centroid(k,1); % boundary(:,2) is x, but centroid(k,1) is x
% angles = atand(deltaY ./ deltaX); % atand gives angles in range [-90,90]
angles = atan2d(deltaY,deltaX); % use atan2d to get angles in range [-180,180]
% 7.2. Calculate the radii
radius = sqrt(deltaY.^2 + deltaX.^2); % use deltaX and deltaY, which were just calculated
% 7.3. Add 360 degrees to negative angles so that range is [0,360] instead of [-180,180]
idx = angles < 0; %idx reps angles less than 0 degreees
angles(idx) = angles(idx)+360; %360 degrees is added to idx angles
%7.4. Sort angles in ascending order
% sort the angles, so the first one is smallest (closest to zero)
% and the last one is largest (closest to 360)
% this is useful for getting a smooth line that goes from 0 to 360 in the plot
% I returns the corresponding indices of the angles
[angles,I] = sort(angles);
%7.5. Reorder distances the same way angles was reordered using I
radius = radius(I);
%7.6. Use only unique angles in case an angle is repeated
% in case any angles are repeated, use only the unique set and
% corresponding distances in interp1 (in this data, one angle is
% repeated twice, with the same distance each time)
%The ~ (tilde) here is a placeholder indicating that we’re not interested
%in capturing the actual unique elements, only their indices
[~,I] = unique(angles);
% 7.7. perform linear interpolation/extrapolation:
%angles(I)= sample points, radius(I)= correspoinding points
%and interp_angles = coordinates of the querry points (QP)
%In general, the functions returns interpolated values at specific QP
interp_distances = interp1(angles(I),radius(I),interp_angles,’linear’,’extrap’);
% 7.8 Plot distance vs. angle.
plot(ax4,interp_angles,interp_distances)
end
%8. Apply fft algorithm to values of radius
L = length(interp_distances); %Define the number of the radiuses (points)
f = 0:L-1; %Define the sampling frequencies
A = fft(interp_distances); %Transforming the radius function into frequency domain using FFT
B = (abs(A)/2535.2); % Normalize the amplitude of fourier descriptors using the first descriptors
%9. Plot fft descriptor vs. frequency
subplot(3,3,5)
bar(f,B,3) %plot the frequencies vs. the nornalised descriptors
xlim([0 128])
%10. Plot phase angle vs. frequency
subplot(3,3,6)
bar(f, angle(A),3) % plot the frequencies vs phase angles
xlim([0 128])
ylim([-4 4])
%11. Create a table of values
table1 = table(A, f’, abs(A), B, angle(A));
table1.Properties.VariableNames = {‘FFT_coeffs’, ‘Frequency’, ‘Amplitude’, ‘Norm_Amplitude’ ‘Phase’};
disp(table1);
%12. Reconstruct particle boundary using FFT descriptors ????? fft, shape reconstruction, fourier descriptor MATLAB Answers — New Questions
How to treat 200 rows of data as an event when constructing a Timetable, as a piece of data, the size is 200*1
There is a table, if the sampling rate is set to 200 when constructing the Timetable,TT = timetable(var,’SampleRate’,200) ,then the time of each row of the Timetable is 0.005s, 0.01s etc, but what I want is that the time of each row is 1s, 2s, 3s, and the corresponding var data shape of each row is 200*1, what should I do?There is a table, if the sampling rate is set to 200 when constructing the Timetable,TT = timetable(var,’SampleRate’,200) ,then the time of each row of the Timetable is 0.005s, 0.01s etc, but what I want is that the time of each row is 1s, 2s, 3s, and the corresponding var data shape of each row is 200*1, what should I do? There is a table, if the sampling rate is set to 200 when constructing the Timetable,TT = timetable(var,’SampleRate’,200) ,then the time of each row of the Timetable is 0.005s, 0.01s etc, but what I want is that the time of each row is 1s, 2s, 3s, and the corresponding var data shape of each row is 200*1, what should I do? timetable MATLAB Answers — New Questions
My question is what is the value i am getting as the output of my code.
syms x
eqn = 0.5959 + 0.0321*(x^2.1)-0.184*(x^8)+0.0143*(x^2.5)-0.2359*(sqrt((1-x^4)/x^4));
solve(eqn == 0,x)
the results are given assyms x
eqn = 0.5959 + 0.0321*(x^2.1)-0.184*(x^8)+0.0143*(x^2.5)-0.2359*(sqrt((1-x^4)/x^4));
solve(eqn == 0,x)
the results are given as syms x
eqn = 0.5959 + 0.0321*(x^2.1)-0.184*(x^8)+0.0143*(x^2.5)-0.2359*(sqrt((1-x^4)/x^4));
solve(eqn == 0,x)
the results are given as linear equation MATLAB Answers — New Questions
TI C2000 f28388d SPI Tx and SPI Rx with multiple chip select GPIOs
My application requires connecting SPI to multiple devices using multiple chip select GPIOs. I tried to make the "Chip select pin" as a variable but it didn’t work. How can I implement this use case with multiple chip selects?My application requires connecting SPI to multiple devices using multiple chip select GPIOs. I tried to make the "Chip select pin" as a variable but it didn’t work. How can I implement this use case with multiple chip selects? My application requires connecting SPI to multiple devices using multiple chip select GPIOs. I tried to make the "Chip select pin" as a variable but it didn’t work. How can I implement this use case with multiple chip selects? spi, tms320f28388d MATLAB Answers — New Questions
Invalid setting in ‘Model’ for parameter ‘Gain’.
I am trying to tune a PID controller for controlling a plant model buit in Simulink. My aim is to obtain the gains of the PID controller using an optimization technique whose code is written in a script file. So, the objective function is calculated by obtaining the loged values from the simulink model. While I run my code, it always shows the error: Invalid setting in ‘Model/PID/Gain’ for parameter ‘Gain’, where the simulink file’s name is Model. Since I am tuning the gains using optimization, the are changing in each iteration. Kp, Ki, and Kd are the gains. The error is: Invalid setting in ‘Model/PID/Gain’ for parameter ‘Gain’.
function objective_func = F3(x)
Kp=x(1)
Ki=x(2)
Kd=x(3)
mdl = "Model";
open_system(mdl)
in = Simulink.SimulationInput(mdl)
out = sim(in)
simout = out.J(3001) %objective function value
objective_func=simout;
endI am trying to tune a PID controller for controlling a plant model buit in Simulink. My aim is to obtain the gains of the PID controller using an optimization technique whose code is written in a script file. So, the objective function is calculated by obtaining the loged values from the simulink model. While I run my code, it always shows the error: Invalid setting in ‘Model/PID/Gain’ for parameter ‘Gain’, where the simulink file’s name is Model. Since I am tuning the gains using optimization, the are changing in each iteration. Kp, Ki, and Kd are the gains. The error is: Invalid setting in ‘Model/PID/Gain’ for parameter ‘Gain’.
function objective_func = F3(x)
Kp=x(1)
Ki=x(2)
Kd=x(3)
mdl = "Model";
open_system(mdl)
in = Simulink.SimulationInput(mdl)
out = sim(in)
simout = out.J(3001) %objective function value
objective_func=simout;
end I am trying to tune a PID controller for controlling a plant model buit in Simulink. My aim is to obtain the gains of the PID controller using an optimization technique whose code is written in a script file. So, the objective function is calculated by obtaining the loged values from the simulink model. While I run my code, it always shows the error: Invalid setting in ‘Model/PID/Gain’ for parameter ‘Gain’, where the simulink file’s name is Model. Since I am tuning the gains using optimization, the are changing in each iteration. Kp, Ki, and Kd are the gains. The error is: Invalid setting in ‘Model/PID/Gain’ for parameter ‘Gain’.
function objective_func = F3(x)
Kp=x(1)
Ki=x(2)
Kd=x(3)
mdl = "Model";
open_system(mdl)
in = Simulink.SimulationInput(mdl)
out = sim(in)
simout = out.J(3001) %objective function value
objective_func=simout;
end simulink, gain block, optimization MATLAB Answers — New Questions
Interpolation of two-dimensional within a given space window
Dear all
I am attaching a dataset, called "Points.txt", where the first and second columns represent the spatial coordinates along the x- and y-th directions, respectively, and the third column the value of a variable at each listed pair of points (x,y). I was wondering which could be a good way to increase the number of points mainly inside the hexagonal shape within the current listed points are restricted to:
I have tried the following:
pgon=nsidedpoly(6,’Center’,[0 0],’SideLength’,1);
%% Let’s rearrange the data associated to the interlayer isotropic exchange, Jinter
% Let’s load the preliminar data
Jinter=cell2mat(struct2cell(load(strcat(pwd,’Preliminar-DataJinter.mat’))));
% Let’s construct the unit vectors of the in-plane unit cell
x=unique(Jinter(:,1));
y=unique(Jinter(:,2));
a1_points=[max(x) 0];
a2_points=[-0.5 max(y)];
a1_modulus=sqrt(dot(a1_points,a1_points));
a2_modulus=sqrt(dot(a2_points,a2_points));
a1=a1_points./a1_modulus;
a2=a2_points./a2_modulus;
% Let’s construct the supercell for Jinter
diff_y=max(y)-min(y);
counter=0;
for dy=[-1 0 1]
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)++dy*[0 1]*diff_y)~=any(Jinter(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+dy*[0 1]*diff_y;
Jinter_extended(counter,3)=Jinter(i,3);
end
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[a1(1)+abs(a2(1)) abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[a1(1)+abs(a2(1)) abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[a1(1)+abs(a2(1)) -abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[a1(1)+abs(a2(1)) -abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) -abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) -abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
clear a1 a2 a1_modulus a2_modulus a1_points a2_points Jinter diff_y x y dy
% Let’s plot it
u17=figure(17)
scatter(Jinter_extended(:,1),Jinter_extended(:,2),[],Jinter_extended(:,3),’o’,’filled’);
colormap(gca,bluewhitered(256));
clim([min(Jinter_extended(:,3)) max(Jinter_extended(:,3))]);
clr17=colorbar;
box on;
pbaspect([1 6/4 1]);
clear u17 clr17
% Now, let’s interpolate data
x_extended=linspace(min(Jinter_extended(:,1)),max(Jinter_extended(:,1)));
y_extended=linspace(min(Jinter_extended(:,2)),max(Jinter_extended(:,2)));
Jinter_interpolated=RegularizeData3D(Jinter_extended(:,1),Jinter_extended(:,2),Jinter_extended(:,3),x_extended,y_extended,’interp’,’bicubic’,’smoothness’,1e-4);
x_interpolation=linspace(-1,1,201);
y_interpolation=linspace(-sqrt(3)/2,sqrt(3)/2,201);
[X,Y]=meshgrid(x_interpolation,y_interpolation);
interpolated_Jinter=interp2(x_extended,y_extended,Jinter_interpolated,X,Y,’cubic’);
clear X Y Jinter_interpolated x_extended y_extended Jinter_extended
% Let’s plot it
u18=figure(18)
uimagesc(x_interpolation,y_interpolation,interpolated_Jinter);
colormap(gca,bluewhitered(256));
% hold on
axis xy;
% plot(pgon);
clim([min(min(interpolated_Jinter)) max(max(interpolated_Jinter))]);
clr18=colorbar;
box on;
pbaspect([1 sqrt(3)/2 1]);
clear u18 clr18
% Now, let’s rearrange and save the data
x_intermediate=linspace(-100,100,201);
y_intermediate=linspace(-100,100,201);
counter=0;
for i=1:length(x_interpolation)
for j=1:length(y_interpolation)
counter=counter+1;
Jinter_save(counter,1)=x_intermediate(i);
Jinter_save(counter,2)=y_intermediate(j);
Jinter_save(counter,3)=interpolated_Jinter(i,j);
end
end
writematrix(Jinter_save,strcat(pwd,’Interpolated-DataInterpolated_J_Inter.txt’),’Delimiter’,’space’);
clear interpolated_Jinter Jinter_save x_interpolation y_interpolation counter i j x_intermediate y_intermediate
where the "Jinter.mat" is exactly the same dataset as in "Points.txt". The problem with this is that, for example, if I take a look at the generated "Interpolated_J_Inter.txt", the value for (0,0) differs notably.
Any ideas?Dear all
I am attaching a dataset, called "Points.txt", where the first and second columns represent the spatial coordinates along the x- and y-th directions, respectively, and the third column the value of a variable at each listed pair of points (x,y). I was wondering which could be a good way to increase the number of points mainly inside the hexagonal shape within the current listed points are restricted to:
I have tried the following:
pgon=nsidedpoly(6,’Center’,[0 0],’SideLength’,1);
%% Let’s rearrange the data associated to the interlayer isotropic exchange, Jinter
% Let’s load the preliminar data
Jinter=cell2mat(struct2cell(load(strcat(pwd,’Preliminar-DataJinter.mat’))));
% Let’s construct the unit vectors of the in-plane unit cell
x=unique(Jinter(:,1));
y=unique(Jinter(:,2));
a1_points=[max(x) 0];
a2_points=[-0.5 max(y)];
a1_modulus=sqrt(dot(a1_points,a1_points));
a2_modulus=sqrt(dot(a2_points,a2_points));
a1=a1_points./a1_modulus;
a2=a2_points./a2_modulus;
% Let’s construct the supercell for Jinter
diff_y=max(y)-min(y);
counter=0;
for dy=[-1 0 1]
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)++dy*[0 1]*diff_y)~=any(Jinter(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+dy*[0 1]*diff_y;
Jinter_extended(counter,3)=Jinter(i,3);
end
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[a1(1)+abs(a2(1)) abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[a1(1)+abs(a2(1)) abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[a1(1)+abs(a2(1)) -abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[a1(1)+abs(a2(1)) -abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) -abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) -abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
clear a1 a2 a1_modulus a2_modulus a1_points a2_points Jinter diff_y x y dy
% Let’s plot it
u17=figure(17)
scatter(Jinter_extended(:,1),Jinter_extended(:,2),[],Jinter_extended(:,3),’o’,’filled’);
colormap(gca,bluewhitered(256));
clim([min(Jinter_extended(:,3)) max(Jinter_extended(:,3))]);
clr17=colorbar;
box on;
pbaspect([1 6/4 1]);
clear u17 clr17
% Now, let’s interpolate data
x_extended=linspace(min(Jinter_extended(:,1)),max(Jinter_extended(:,1)));
y_extended=linspace(min(Jinter_extended(:,2)),max(Jinter_extended(:,2)));
Jinter_interpolated=RegularizeData3D(Jinter_extended(:,1),Jinter_extended(:,2),Jinter_extended(:,3),x_extended,y_extended,’interp’,’bicubic’,’smoothness’,1e-4);
x_interpolation=linspace(-1,1,201);
y_interpolation=linspace(-sqrt(3)/2,sqrt(3)/2,201);
[X,Y]=meshgrid(x_interpolation,y_interpolation);
interpolated_Jinter=interp2(x_extended,y_extended,Jinter_interpolated,X,Y,’cubic’);
clear X Y Jinter_interpolated x_extended y_extended Jinter_extended
% Let’s plot it
u18=figure(18)
uimagesc(x_interpolation,y_interpolation,interpolated_Jinter);
colormap(gca,bluewhitered(256));
% hold on
axis xy;
% plot(pgon);
clim([min(min(interpolated_Jinter)) max(max(interpolated_Jinter))]);
clr18=colorbar;
box on;
pbaspect([1 sqrt(3)/2 1]);
clear u18 clr18
% Now, let’s rearrange and save the data
x_intermediate=linspace(-100,100,201);
y_intermediate=linspace(-100,100,201);
counter=0;
for i=1:length(x_interpolation)
for j=1:length(y_interpolation)
counter=counter+1;
Jinter_save(counter,1)=x_intermediate(i);
Jinter_save(counter,2)=y_intermediate(j);
Jinter_save(counter,3)=interpolated_Jinter(i,j);
end
end
writematrix(Jinter_save,strcat(pwd,’Interpolated-DataInterpolated_J_Inter.txt’),’Delimiter’,’space’);
clear interpolated_Jinter Jinter_save x_interpolation y_interpolation counter i j x_intermediate y_intermediate
where the "Jinter.mat" is exactly the same dataset as in "Points.txt". The problem with this is that, for example, if I take a look at the generated "Interpolated_J_Inter.txt", the value for (0,0) differs notably.
Any ideas? Dear all
I am attaching a dataset, called "Points.txt", where the first and second columns represent the spatial coordinates along the x- and y-th directions, respectively, and the third column the value of a variable at each listed pair of points (x,y). I was wondering which could be a good way to increase the number of points mainly inside the hexagonal shape within the current listed points are restricted to:
I have tried the following:
pgon=nsidedpoly(6,’Center’,[0 0],’SideLength’,1);
%% Let’s rearrange the data associated to the interlayer isotropic exchange, Jinter
% Let’s load the preliminar data
Jinter=cell2mat(struct2cell(load(strcat(pwd,’Preliminar-DataJinter.mat’))));
% Let’s construct the unit vectors of the in-plane unit cell
x=unique(Jinter(:,1));
y=unique(Jinter(:,2));
a1_points=[max(x) 0];
a2_points=[-0.5 max(y)];
a1_modulus=sqrt(dot(a1_points,a1_points));
a2_modulus=sqrt(dot(a2_points,a2_points));
a1=a1_points./a1_modulus;
a2=a2_points./a2_modulus;
% Let’s construct the supercell for Jinter
diff_y=max(y)-min(y);
counter=0;
for dy=[-1 0 1]
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)++dy*[0 1]*diff_y)~=any(Jinter(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+dy*[0 1]*diff_y;
Jinter_extended(counter,3)=Jinter(i,3);
end
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[a1(1)+abs(a2(1)) abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[a1(1)+abs(a2(1)) abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[a1(1)+abs(a2(1)) -abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[a1(1)+abs(a2(1)) -abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
counter=length(Jinter_extended(:,1));
for i=1:length(Jinter(:,1))
if (Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) -abs(a2(2))])~=any(Jinter_extended(:,1:2))
counter=counter+1;
Jinter_extended(counter,1:2)=Jinter(i,1:2)+[-(a1(1)+abs(a2(1))) -abs(a2(2))];
Jinter_extended(counter,3)=Jinter(i,3);
end
end
clear a1 a2 a1_modulus a2_modulus a1_points a2_points Jinter diff_y x y dy
% Let’s plot it
u17=figure(17)
scatter(Jinter_extended(:,1),Jinter_extended(:,2),[],Jinter_extended(:,3),’o’,’filled’);
colormap(gca,bluewhitered(256));
clim([min(Jinter_extended(:,3)) max(Jinter_extended(:,3))]);
clr17=colorbar;
box on;
pbaspect([1 6/4 1]);
clear u17 clr17
% Now, let’s interpolate data
x_extended=linspace(min(Jinter_extended(:,1)),max(Jinter_extended(:,1)));
y_extended=linspace(min(Jinter_extended(:,2)),max(Jinter_extended(:,2)));
Jinter_interpolated=RegularizeData3D(Jinter_extended(:,1),Jinter_extended(:,2),Jinter_extended(:,3),x_extended,y_extended,’interp’,’bicubic’,’smoothness’,1e-4);
x_interpolation=linspace(-1,1,201);
y_interpolation=linspace(-sqrt(3)/2,sqrt(3)/2,201);
[X,Y]=meshgrid(x_interpolation,y_interpolation);
interpolated_Jinter=interp2(x_extended,y_extended,Jinter_interpolated,X,Y,’cubic’);
clear X Y Jinter_interpolated x_extended y_extended Jinter_extended
% Let’s plot it
u18=figure(18)
uimagesc(x_interpolation,y_interpolation,interpolated_Jinter);
colormap(gca,bluewhitered(256));
% hold on
axis xy;
% plot(pgon);
clim([min(min(interpolated_Jinter)) max(max(interpolated_Jinter))]);
clr18=colorbar;
box on;
pbaspect([1 sqrt(3)/2 1]);
clear u18 clr18
% Now, let’s rearrange and save the data
x_intermediate=linspace(-100,100,201);
y_intermediate=linspace(-100,100,201);
counter=0;
for i=1:length(x_interpolation)
for j=1:length(y_interpolation)
counter=counter+1;
Jinter_save(counter,1)=x_intermediate(i);
Jinter_save(counter,2)=y_intermediate(j);
Jinter_save(counter,3)=interpolated_Jinter(i,j);
end
end
writematrix(Jinter_save,strcat(pwd,’Interpolated-DataInterpolated_J_Inter.txt’),’Delimiter’,’space’);
clear interpolated_Jinter Jinter_save x_interpolation y_interpolation counter i j x_intermediate y_intermediate
where the "Jinter.mat" is exactly the same dataset as in "Points.txt". The problem with this is that, for example, if I take a look at the generated "Interpolated_J_Inter.txt", the value for (0,0) differs notably.
Any ideas? interpolate two-dimensional data MATLAB Answers — New Questions
Urgent Request for Assistance: Overcoming Verification Challenges in AI Cloud Partner Program
Hello Community,
I am reaching out as urgently seeking guidance or insights from those familiar with the challenges of the AI Cloud Partner Program or anyone who can offer assistance. We are currently handling two domains:
main domain (A): Our actively managed Sales Intelligence SaaS.email domain (B): Previously active service, now pivoted to main domain and used internally.
Over the past month, we have faced significant hurdles in the verification process of the AI Cloud Partner Program, despite rigorously following all outlined steps from Microsoft and various community resources. Here’s what we have undertaken:
Contact Information: We transitioned from using generic email addresses like contact@ or marketing@ to personal accounts after learning they could lead to application rejections.
Documentation Submission: Initially, we provided receipts as Namecheap does not issue invoices. After realizing that only invoices were acceptable, we ceased submitting receipts.
Domain Hosting and Privacy: We meticulously matched the contact profile details—company name, address, contact information—down to case sensitivity on our email domain (B), which we host directly. Furthermore, we disabled privacy features in WHOIS to expose my personal information, prioritizing compliance over privacy.
Support Interaction: We are actively engaging with the partner support through three ongoing support tickets, attempting to resolve our issues. Separately, we reached out to Microsoft’s Partner Twitter handle but have not received a response.
Parallel Certification Attempt: Our application to the ISV Success program was stopped because our account showed “multiple failed attempts,” according to their system. This has blocked us from proceeding with our Account Verification.
Despite these efforts, we are still awaiting a final decision from the AI Cloud Partner Program, now well beyond the initial promise of 3-5 business days, extending over ten days.
The documentation requirements for the ISV Success are identical to those of the AI Cloud Partner Program, heightening our concern as both are crucial for our business operations, which are currently under severe strain.
We are in dire need of a more personalized response to understand possible missteps or further required actions. The generic responses from the partner center have been unhelpful and frustrating.
Does anyone have any insights or can offer assistance on how to move forward in this situation? Has anyone else faced similar verification challenges?
Thank you in advance for your support and guidance.
Hello Community, I am reaching out as urgently seeking guidance or insights from those familiar with the challenges of the AI Cloud Partner Program or anyone who can offer assistance. We are currently handling two domains:main domain (A): Our actively managed Sales Intelligence SaaS.email domain (B): Previously active service, now pivoted to main domain and used internally. Over the past month, we have faced significant hurdles in the verification process of the AI Cloud Partner Program, despite rigorously following all outlined steps from Microsoft and various community resources. Here’s what we have undertaken:Contact Information: We transitioned from using generic email addresses like contact@ or marketing@ to personal accounts after learning they could lead to application rejections.Documentation Submission: Initially, we provided receipts as Namecheap does not issue invoices. After realizing that only invoices were acceptable, we ceased submitting receipts.Domain Hosting and Privacy: We meticulously matched the contact profile details—company name, address, contact information—down to case sensitivity on our email domain (B), which we host directly. Furthermore, we disabled privacy features in WHOIS to expose my personal information, prioritizing compliance over privacy.Support Interaction: We are actively engaging with the partner support through three ongoing support tickets, attempting to resolve our issues. Separately, we reached out to Microsoft’s Partner Twitter handle but have not received a response.Parallel Certification Attempt: Our application to the ISV Success program was stopped because our account showed “multiple failed attempts,” according to their system. This has blocked us from proceeding with our Account Verification.Despite these efforts, we are still awaiting a final decision from the AI Cloud Partner Program, now well beyond the initial promise of 3-5 business days, extending over ten days.The documentation requirements for the ISV Success are identical to those of the AI Cloud Partner Program, heightening our concern as both are crucial for our business operations, which are currently under severe strain. We are in dire need of a more personalized response to understand possible missteps or further required actions. The generic responses from the partner center have been unhelpful and frustrating.Does anyone have any insights or can offer assistance on how to move forward in this situation? Has anyone else faced similar verification challenges?Thank you in advance for your support and guidance. Read More
How to find our TPIN ID
How to find our Microsoft partner TPIN id.
Raised ticket from partner portal but they have responded its out of their scope.
How to find our Microsoft partner TPIN id. Raised ticket from partner portal but they have responded its out of their scope. Read More
Send Message as User/Bot Using Graph API Based on User’s Email Existence in Microsoft Teams Channel
If a user’s email exists in the teams channel, the message should be sent as a reply from that user.If the user’s email doesn’t exist in the channel, the message should be sent from a bot or a service account.
Here is a rough outline of what I’m trying to accomplish:
Check if the email exists in the teams channel.If it does, send the message as the user.If it doesn’t, send the message as a bot or service account.
I’m working on a project that involves sending messages to a Microsoft Teams channel using the Microsoft Graph API. I have a specific requirement where:If a user’s email exists in the teams channel, the message should be sent as a reply from that user.If the user’s email doesn’t exist in the channel, the message should be sent from a bot or a service account.I’m using user’s token for authentication. Is there any way to achieve this conditional sending of messages using the Microsoft Graph API?Here is a rough outline of what I’m trying to accomplish:Check if the email exists in the teams channel.If it does, send the message as the user.If it doesn’t, send the message as a bot or service account.Any guidance or examples on how to implement this would be greatly appreciated. Thank you! Read More
Is there any power point certification exams & courses or excel certification exams & courses
Hi,
We are a learning partners from India.
Our few of clients inquiring us for powerpoint certification exams & courses and also excel certification exams & courses.
Kindly advise us on the same.
Thanks and regards
Hi, We are a learning partners from India. Our few of clients inquiring us for powerpoint certification exams & courses and also excel certification exams & courses. Kindly advise us on the same. Thanks and regards Read More
Simulink generated code optimization – CPU Load
Hi all,
I’m successfully generating code from the Simulink model. This code substitute manual one with the same function. Code is the integrated with the rest of the manual code, flashed to the HW and running. This substituting of the manual code part with the generated one increses the CPU Load. When I’m checking the Code generation setting, basic targets are RAM minimazing or Execution speed mazimazing. Non of these will directly reduce the CPU Load I suppose.
So I’d like to ask you, do you know what Advanced or Detailed Code generation Optimization setting can reduce the CPU Load? I’m attaching screenshots of the current setting.
And possibly follow up question – is there any metric which can estimate affect on the CPU Load without need of flashing the integrated code to the HW?
Thank you for your help in advance, have a nice day!
OldrichHi all,
I’m successfully generating code from the Simulink model. This code substitute manual one with the same function. Code is the integrated with the rest of the manual code, flashed to the HW and running. This substituting of the manual code part with the generated one increses the CPU Load. When I’m checking the Code generation setting, basic targets are RAM minimazing or Execution speed mazimazing. Non of these will directly reduce the CPU Load I suppose.
So I’d like to ask you, do you know what Advanced or Detailed Code generation Optimization setting can reduce the CPU Load? I’m attaching screenshots of the current setting.
And possibly follow up question – is there any metric which can estimate affect on the CPU Load without need of flashing the integrated code to the HW?
Thank you for your help in advance, have a nice day!
Oldrich Hi all,
I’m successfully generating code from the Simulink model. This code substitute manual one with the same function. Code is the integrated with the rest of the manual code, flashed to the HW and running. This substituting of the manual code part with the generated one increses the CPU Load. When I’m checking the Code generation setting, basic targets are RAM minimazing or Execution speed mazimazing. Non of these will directly reduce the CPU Load I suppose.
So I’d like to ask you, do you know what Advanced or Detailed Code generation Optimization setting can reduce the CPU Load? I’m attaching screenshots of the current setting.
And possibly follow up question – is there any metric which can estimate affect on the CPU Load without need of flashing the integrated code to the HW?
Thank you for your help in advance, have a nice day!
Oldrich embedded coder MATLAB Answers — New Questions
Plotting a system of fractional order differential equations
Hi. I have been trying to plot fractional order differential equations with MATLAB. I have tried to use this technique called "Predictor-Corrector Method" and got a code listing using AI. The code seems to be giving the plots, though they do not match with the expected results. I will attach the code listing below. But my question is how to actually plot such systems? Is there a standard method in-built, or a widely accepted add-on/package? Thanks. “`% Parameters
alpha = 0.9;
LAMBDA = 3;
mu = 0.4;
beta = 0.004;
gamma = 0.0005;
m = 0.03;
n = 0.006;
delta = 0.02;
rho = 0.003;
h = 0.1; % Time step
T = 300; % Total time
% Time steps
time = 0:h:T;
time_steps = length(time);
% Initial conditions
s = zeros(1, time_steps);
i = zeros(1, time_steps);
r = zeros(1, time_steps);
s(1) = 85;
i(1) = 3;
r(1) = 0;
% Predictor-Corrector Method
for k = 1:(time_steps – 1)
% Predictor step (Adams-Bashforth)
if k == 1
ds_pred = h * (LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k)));
di_pred = h * ((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k));
dr_pred = h * ((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k));
else
ds_pred = h / 2 * ((LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k))) + …
(LAMBDA – mu * s(k-1) – (beta * s(k-1) * i(k-1)) / (1 + gamma * i(k-1))));
di_pred = h / 2 * (((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k)) + …
((beta * s(k-1) * i(k-1)) / (1 + gamma * i(k-1)) – (m * i(k-1)) / (1 + n * i(k-1)) – (mu + delta + rho) * i(k-1)));
dr_pred = h / 2 * (((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k)) + …
((m * i(k-1)) / (1 + n * i(k-1)) + delta * i(k-1) – mu * r(k-1)));
end
% Update predicted values
s(k + 1) = s(k) + ds_pred;
i(k + 1) = i(k) + di_pred;
r(k + 1) = r(k) + dr_pred;
% Corrector step (Adams-Moulton)
ds_corr = h / 2 * ((LAMBDA – mu * s(k + 1) – (beta * s(k + 1) * i(k + 1)) / (1 + gamma * i(k + 1))) + …
(LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k))));
di_corr = h / 2 * (((beta * s(k + 1) * i(k + 1)) / (1 + gamma * i(k + 1)) – (m * i(k + 1)) / (1 + n * i(k + 1)) – (mu + delta + rho) * i(k + 1)) + …
((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k)));
dr_corr = h / 2 * (((m * i(k + 1)) / (1 + n * i(k + 1)) + delta * i(k + 1) – mu * r(k + 1)) + …
((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k)));
% Update corrected values
s(k + 1) = s(k) + ds_corr;
i(k + 1) = i(k) + di_corr;
r(k + 1) = r(k) + dr_corr;
end
% Plot the results
figure;
plot(time, s, ‘-o’, ‘DisplayName’, ‘s(t)’);
hold on;
plot(time, i, ‘-s’, ‘DisplayName’, ‘i(t)’);
plot(time, r, ‘-d’, ‘DisplayName’, ‘r(t)’);
xlabel(‘Time’);
ylabel(‘Population’);
title(‘Solution of the System of Fractional Differential Equations’);
legend;
grid on;
% Set plot range
xlim([0 30]);
ylim([0 100]);“`
<</matlabcentral/answers/uploaded_files/1745286/fo_M.png>>Hi. I have been trying to plot fractional order differential equations with MATLAB. I have tried to use this technique called "Predictor-Corrector Method" and got a code listing using AI. The code seems to be giving the plots, though they do not match with the expected results. I will attach the code listing below. But my question is how to actually plot such systems? Is there a standard method in-built, or a widely accepted add-on/package? Thanks. “`% Parameters
alpha = 0.9;
LAMBDA = 3;
mu = 0.4;
beta = 0.004;
gamma = 0.0005;
m = 0.03;
n = 0.006;
delta = 0.02;
rho = 0.003;
h = 0.1; % Time step
T = 300; % Total time
% Time steps
time = 0:h:T;
time_steps = length(time);
% Initial conditions
s = zeros(1, time_steps);
i = zeros(1, time_steps);
r = zeros(1, time_steps);
s(1) = 85;
i(1) = 3;
r(1) = 0;
% Predictor-Corrector Method
for k = 1:(time_steps – 1)
% Predictor step (Adams-Bashforth)
if k == 1
ds_pred = h * (LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k)));
di_pred = h * ((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k));
dr_pred = h * ((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k));
else
ds_pred = h / 2 * ((LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k))) + …
(LAMBDA – mu * s(k-1) – (beta * s(k-1) * i(k-1)) / (1 + gamma * i(k-1))));
di_pred = h / 2 * (((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k)) + …
((beta * s(k-1) * i(k-1)) / (1 + gamma * i(k-1)) – (m * i(k-1)) / (1 + n * i(k-1)) – (mu + delta + rho) * i(k-1)));
dr_pred = h / 2 * (((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k)) + …
((m * i(k-1)) / (1 + n * i(k-1)) + delta * i(k-1) – mu * r(k-1)));
end
% Update predicted values
s(k + 1) = s(k) + ds_pred;
i(k + 1) = i(k) + di_pred;
r(k + 1) = r(k) + dr_pred;
% Corrector step (Adams-Moulton)
ds_corr = h / 2 * ((LAMBDA – mu * s(k + 1) – (beta * s(k + 1) * i(k + 1)) / (1 + gamma * i(k + 1))) + …
(LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k))));
di_corr = h / 2 * (((beta * s(k + 1) * i(k + 1)) / (1 + gamma * i(k + 1)) – (m * i(k + 1)) / (1 + n * i(k + 1)) – (mu + delta + rho) * i(k + 1)) + …
((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k)));
dr_corr = h / 2 * (((m * i(k + 1)) / (1 + n * i(k + 1)) + delta * i(k + 1) – mu * r(k + 1)) + …
((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k)));
% Update corrected values
s(k + 1) = s(k) + ds_corr;
i(k + 1) = i(k) + di_corr;
r(k + 1) = r(k) + dr_corr;
end
% Plot the results
figure;
plot(time, s, ‘-o’, ‘DisplayName’, ‘s(t)’);
hold on;
plot(time, i, ‘-s’, ‘DisplayName’, ‘i(t)’);
plot(time, r, ‘-d’, ‘DisplayName’, ‘r(t)’);
xlabel(‘Time’);
ylabel(‘Population’);
title(‘Solution of the System of Fractional Differential Equations’);
legend;
grid on;
% Set plot range
xlim([0 30]);
ylim([0 100]);“`
<</matlabcentral/answers/uploaded_files/1745286/fo_M.png>> Hi. I have been trying to plot fractional order differential equations with MATLAB. I have tried to use this technique called "Predictor-Corrector Method" and got a code listing using AI. The code seems to be giving the plots, though they do not match with the expected results. I will attach the code listing below. But my question is how to actually plot such systems? Is there a standard method in-built, or a widely accepted add-on/package? Thanks. “`% Parameters
alpha = 0.9;
LAMBDA = 3;
mu = 0.4;
beta = 0.004;
gamma = 0.0005;
m = 0.03;
n = 0.006;
delta = 0.02;
rho = 0.003;
h = 0.1; % Time step
T = 300; % Total time
% Time steps
time = 0:h:T;
time_steps = length(time);
% Initial conditions
s = zeros(1, time_steps);
i = zeros(1, time_steps);
r = zeros(1, time_steps);
s(1) = 85;
i(1) = 3;
r(1) = 0;
% Predictor-Corrector Method
for k = 1:(time_steps – 1)
% Predictor step (Adams-Bashforth)
if k == 1
ds_pred = h * (LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k)));
di_pred = h * ((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k));
dr_pred = h * ((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k));
else
ds_pred = h / 2 * ((LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k))) + …
(LAMBDA – mu * s(k-1) – (beta * s(k-1) * i(k-1)) / (1 + gamma * i(k-1))));
di_pred = h / 2 * (((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k)) + …
((beta * s(k-1) * i(k-1)) / (1 + gamma * i(k-1)) – (m * i(k-1)) / (1 + n * i(k-1)) – (mu + delta + rho) * i(k-1)));
dr_pred = h / 2 * (((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k)) + …
((m * i(k-1)) / (1 + n * i(k-1)) + delta * i(k-1) – mu * r(k-1)));
end
% Update predicted values
s(k + 1) = s(k) + ds_pred;
i(k + 1) = i(k) + di_pred;
r(k + 1) = r(k) + dr_pred;
% Corrector step (Adams-Moulton)
ds_corr = h / 2 * ((LAMBDA – mu * s(k + 1) – (beta * s(k + 1) * i(k + 1)) / (1 + gamma * i(k + 1))) + …
(LAMBDA – mu * s(k) – (beta * s(k) * i(k)) / (1 + gamma * i(k))));
di_corr = h / 2 * (((beta * s(k + 1) * i(k + 1)) / (1 + gamma * i(k + 1)) – (m * i(k + 1)) / (1 + n * i(k + 1)) – (mu + delta + rho) * i(k + 1)) + …
((beta * s(k) * i(k)) / (1 + gamma * i(k)) – (m * i(k)) / (1 + n * i(k)) – (mu + delta + rho) * i(k)));
dr_corr = h / 2 * (((m * i(k + 1)) / (1 + n * i(k + 1)) + delta * i(k + 1) – mu * r(k + 1)) + …
((m * i(k)) / (1 + n * i(k)) + delta * i(k) – mu * r(k)));
% Update corrected values
s(k + 1) = s(k) + ds_corr;
i(k + 1) = i(k) + di_corr;
r(k + 1) = r(k) + dr_corr;
end
% Plot the results
figure;
plot(time, s, ‘-o’, ‘DisplayName’, ‘s(t)’);
hold on;
plot(time, i, ‘-s’, ‘DisplayName’, ‘i(t)’);
plot(time, r, ‘-d’, ‘DisplayName’, ‘r(t)’);
xlabel(‘Time’);
ylabel(‘Population’);
title(‘Solution of the System of Fractional Differential Equations’);
legend;
grid on;
% Set plot range
xlim([0 30]);
ylim([0 100]);“`
<</matlabcentral/answers/uploaded_files/1745286/fo_M.png>> fde MATLAB Answers — New Questions