Month: August 2024
Is there a method to predict one point in the future based on multiple point of past prediction? (LSTM univariate)
To explain the title above, how do i get prediction for i+1 based on i and i-1 combined?
I had already done the training and got the training info inside variable net.
This is an example of the code for LSTM trained net to predict 1 value into the future from Mathworks website.
for i=1:numTimeStepsTest
[net,YPred(:,i)] = predictAndUpdateState(net,YPred(:,i-1));
end
I appreciate if anyone can help direct me to any forum/article regarding this matter if it has been answered previously.
Thank you.To explain the title above, how do i get prediction for i+1 based on i and i-1 combined?
I had already done the training and got the training info inside variable net.
This is an example of the code for LSTM trained net to predict 1 value into the future from Mathworks website.
for i=1:numTimeStepsTest
[net,YPred(:,i)] = predictAndUpdateState(net,YPred(:,i-1));
end
I appreciate if anyone can help direct me to any forum/article regarding this matter if it has been answered previously.
Thank you. To explain the title above, how do i get prediction for i+1 based on i and i-1 combined?
I had already done the training and got the training info inside variable net.
This is an example of the code for LSTM trained net to predict 1 value into the future from Mathworks website.
for i=1:numTimeStepsTest
[net,YPred(:,i)] = predictAndUpdateState(net,YPred(:,i-1));
end
I appreciate if anyone can help direct me to any forum/article regarding this matter if it has been answered previously.
Thank you. neural network MATLAB Answers — New Questions
Fick’s diffusion in matlab
Hello,
I want to model Fick’s diffusion of nanoparticles in a 2D domain filled with water. Is it possible to do that in matlab?
Regards,Hello,
I want to model Fick’s diffusion of nanoparticles in a 2D domain filled with water. Is it possible to do that in matlab?
Regards, Hello,
I want to model Fick’s diffusion of nanoparticles in a 2D domain filled with water. Is it possible to do that in matlab?
Regards, diffusion, fick’s law MATLAB Answers — New Questions
The new outlook – not the quality i expect
Sorry, but just getting black Outlook Window instead of mailboxes with folders and mails is not something I accept. Sorry, where is the reliability of a “normal” Windows application?
This is simply not acceptable.
The black Window is the Outlook window. :thumbs_down:🤪
I could tweak somehow that I see the setting dialog.
So to work again. I have to restart Outlook.
Better to stick with the old Outlook?
Sorry, but just getting black Outlook Window instead of mailboxes with folders and mails is not something I accept. Sorry, where is the reliability of a “normal” Windows application?This is simply not acceptable.The black Window is the Outlook window. :thumbs_down:🤪I could tweak somehow that I see the setting dialog.So to work again. I have to restart Outlook.Better to stick with the old Outlook? Read More
Tracking Ghant -tracking view. % complete planned column
Pls assist I need to add a column to show the % that was planned (ie Baseline % ??on the tracking ghant in tracking Form. (it only % complete on current updating
Pls assist I need to add a column to show the % that was planned (ie Baseline % ??on the tracking ghant in tracking Form. (it only % complete on current updating Read More
Connect-ExchangeOnline – Unauthorized
I’ve been searching for a solution for this error message for a couple of days now – to no avail.
Connect-ExchangeOnline through certificate always throws ‘Unauthorized’.
UnAuthorized At C:Program FilesWindowsPowerShellModulesExchangeOnlineManagement3.5.1netFrameworkExchangeOnlineManagement.psm1:766 char:21
$tenant = ” $appId = ” $thumbprint = ” Connect-ExchangeOnline -CertificateThumbprint $thumbprint -AppId $appId -Organization $tenant
I tried:
multiple machinescerts in Cert:CurrentUsermy and Cert:LocalMachinemyCerts are installed in the Azure AD Appmultiple networksPS 5.1 and 7.2ExchangeOnlineManagement Module versions 3.4.0 through 3.5.1
And I tried the following Graph API permissions:
As mentioned Exchange.ManageAsApp API permission does not exist any longer hence the issue.
Has anyone figured it out yet?
I’ve been searching for a solution for this error message for a couple of days now – to no avail.Connect-ExchangeOnline through certificate always throws ‘Unauthorized’.UnAuthorized At C:Program FilesWindowsPowerShellModulesExchangeOnlineManagement3.5.1netFrameworkExchangeOnlineManagement.psm1:766 char:21$tenant = ” $appId = ” $thumbprint = ” Connect-ExchangeOnline -CertificateThumbprint $thumbprint -AppId $appId -Organization $tenantI tried:multiple machinescerts in Cert:CurrentUsermy and Cert:LocalMachinemyCerts are installed in the Azure AD Appmultiple networksPS 5.1 and 7.2ExchangeOnlineManagement Module versions 3.4.0 through 3.5.1And I tried the following Graph API permissions:As mentioned Exchange.ManageAsApp API permission does not exist any longer hence the issue.Has anyone figured it out yet? Read More
What is the right way to convert bmp to png on Windows PC?
I’m currently working on a project that requires me to convert hundreds of BMP images to PNG format on my Windows PC. I’ve been searching for an efficient way to batch convert these images, but I’m not sure which tools or methods would be the most reliable and time-saving.
Ideally, I need a BMP to PNG converter solution that can handle bulk conversions quickly without losing any quality in the process. If anyone has experience with this that works well for this task, I’d really appreciate your input.
Thanks in advance for your help!
I’m currently working on a project that requires me to convert hundreds of BMP images to PNG format on my Windows PC. I’ve been searching for an efficient way to batch convert these images, but I’m not sure which tools or methods would be the most reliable and time-saving. Ideally, I need a BMP to PNG converter solution that can handle bulk conversions quickly without losing any quality in the process. If anyone has experience with this that works well for this task, I’d really appreciate your input. Thanks in advance for your help! Read More
how to delete the empty row in the excel with matlab
hi, as the title description, i want use matlab to delete the empty rows in the excel which has many rows, how to realize.hi, as the title description, i want use matlab to delete the empty rows in the excel which has many rows, how to realize. hi, as the title description, i want use matlab to delete the empty rows in the excel which has many rows, how to realize. excel operate, matlab MATLAB Answers — New Questions
which angle to use in svpwm switching timings generation
for grid connected inverter should i use the angle from pll as theta reference or the angle which is generated from the voltagesfor grid connected inverter should i use the angle from pll as theta reference or the angle which is generated from the voltages for grid connected inverter should i use the angle from pll as theta reference or the angle which is generated from the voltages reference angle selection MATLAB Answers — New Questions
Unable to run PIL simulation using ESP-32
I am trying do PIL using ESP-32 Hardware and I am getting this error:
Error:Unable to run PIL simulation of "Subsystem".
Configuration parameters for the model do not support these connectivity configurations: STM32 Targets, Arduino Board, ARM Cortex-M3 (QEMU), STM32F4-Discovery (ST-LINK), STM32F4-Discovery (Serial), STM32 Ethernet, STM32 Microcontroller, Texas Instruments Code Composer Studio (IDE), Texas Instruments Code Composer Studio (TCP/IP), Texas Instruments Code Composer Studio (Serial), Teensy connectivity config using serial
Update configuration parameters or create a supported connectivity configuration. See Create PIL Target Connectivity Configuration.I am trying do PIL using ESP-32 Hardware and I am getting this error:
Error:Unable to run PIL simulation of "Subsystem".
Configuration parameters for the model do not support these connectivity configurations: STM32 Targets, Arduino Board, ARM Cortex-M3 (QEMU), STM32F4-Discovery (ST-LINK), STM32F4-Discovery (Serial), STM32 Ethernet, STM32 Microcontroller, Texas Instruments Code Composer Studio (IDE), Texas Instruments Code Composer Studio (TCP/IP), Texas Instruments Code Composer Studio (Serial), Teensy connectivity config using serial
Update configuration parameters or create a supported connectivity configuration. See Create PIL Target Connectivity Configuration. I am trying do PIL using ESP-32 Hardware and I am getting this error:
Error:Unable to run PIL simulation of "Subsystem".
Configuration parameters for the model do not support these connectivity configurations: STM32 Targets, Arduino Board, ARM Cortex-M3 (QEMU), STM32F4-Discovery (ST-LINK), STM32F4-Discovery (Serial), STM32 Ethernet, STM32 Microcontroller, Texas Instruments Code Composer Studio (IDE), Texas Instruments Code Composer Studio (TCP/IP), Texas Instruments Code Composer Studio (Serial), Teensy connectivity config using serial
Update configuration parameters or create a supported connectivity configuration. See Create PIL Target Connectivity Configuration. pil MATLAB Answers — New Questions
how can i apply wavelet filter to this code
% generate a waveform
f0 =100;
fs=1000;
pw = 0.1;
pri = 1;
npulses = 100;
s = cos(2*pi*f0*(0:1/fs:pw)); % it can be any other waveform of your choice
s(round(fs*pri)) = 0; % PRI
s = repmat(s, npulses, 1); % npulses
% echo: delayed signal
tau = 0.3;
ntau = round(fs*tau);
amp = 0.5;
e = amp* circshift(s, ntau);
% add noise
sigma = 0.1;
r = s + e + sigma*randn(size(s));
y = pulsint(r);
plot((0:length(s)-1)/fs, r)% generate a waveform
f0 =100;
fs=1000;
pw = 0.1;
pri = 1;
npulses = 100;
s = cos(2*pi*f0*(0:1/fs:pw)); % it can be any other waveform of your choice
s(round(fs*pri)) = 0; % PRI
s = repmat(s, npulses, 1); % npulses
% echo: delayed signal
tau = 0.3;
ntau = round(fs*tau);
amp = 0.5;
e = amp* circshift(s, ntau);
% add noise
sigma = 0.1;
r = s + e + sigma*randn(size(s));
y = pulsint(r);
plot((0:length(s)-1)/fs, r) % generate a waveform
f0 =100;
fs=1000;
pw = 0.1;
pri = 1;
npulses = 100;
s = cos(2*pi*f0*(0:1/fs:pw)); % it can be any other waveform of your choice
s(round(fs*pri)) = 0; % PRI
s = repmat(s, npulses, 1); % npulses
% echo: delayed signal
tau = 0.3;
ntau = round(fs*tau);
amp = 0.5;
e = amp* circshift(s, ntau);
% add noise
sigma = 0.1;
r = s + e + sigma*randn(size(s));
y = pulsint(r);
plot((0:length(s)-1)/fs, r) wavelet filter MATLAB Answers — New Questions
MC856748 – Microsoft SharePoint: document processing models will no longer process files
Hi Guys
just got this messaging
Just want to know what will be stop with this, is it affected to normal documents stored in document libraries or is it related to SharePoint premium trail used customers
Can someone explain what is document processing model where im just old house SharePoint admin
will this change effect to normal document CRUD operation in SharePoint ?
Best Regards
Radika
Hi Guys just got this messaging https://m365admin.handsontek.net/microsoft-sharepoint-document-processing-models-will-no-longer-process-files-if-the-service-is-not-enabled-for-the-site/ Just want to know what will be stop with this, is it affected to normal documents stored in document libraries or is it related to SharePoint premium trail used customers Can someone explain what is document processing model where im just old house SharePoint adminwill this change effect to normal document CRUD operation in SharePoint ? Best RegardsRadika Read More
Contributor Stories: Sean Killeen
If you’ve ever engaged with the content on the Microsoft Learn platform, it’s highly likely that the material you used was written or co-authored by dedicated contributors. These contributors, often volunteers, generously offer their time and expertise to fill knowledge gaps within our portfolio and ensure the content remains up to date.
In this Contributor Stories interview series, we aim to acquaint ourselves with some of these valuable contributors. Through these conversations, we seek to understand their motivations for sharing their knowledge and gain insights into their experiences.
We are excited to have Sean Killeen here with us today. Originally from the Philadelphia area, Sean has 15+ years of experience solving problems as a leader and developer for commercial, non-profit, and federal clients. He currently works remotely from his home in Arlington, VA, as the VP of Innovation & Products at SCT Software. He was also awarded the Microsoft Most Valuable Professional (MVP). Aside from loving his work way too much, there’s a good chance he’s enjoying being a Dad (and husband!), sipping great beer, exploring the Arlington area, or singing somewhere.
Sean was chosen for this month’s Contributor Stories article because of his strong dedication to sharing knowledge with others. He is a frequent and valued contributor to the Microsoft Learn platform.
Meet Sean
Sherry: Welcome, Sean! Congratulations on being a top Microsoft contributor and being highlighted in this month’s Contributor Stories article! I know our listeners are eager to hear about your contributions and why you started contributing to Microsoft in the first place. Before we get into all that, can you first tell us about your background and experience?
Sean: Thanks, Sherry. I appreciate it. I’m incredibly honored to have been nominated for the Contributor Stories program.
Sherry: That’s fantastic to hear. So, what got you started in the world of computers and programming?
Sean: My background in computers and programming started at an early age. I was lucky enough that my Dad was one of the early generation of programmers. I benefited both from his knowledge as a self-taught programmer and his infinite patience with my many questions. (Thanks, Dad!)
Sherry: It’s great to have such early inspiration. How did you start developing your skills?
Sean: I found myself building and experimenting with VB5 applications and then ASP and ASP.NET. I soaked up everything I could from MSDN magazine, Wrox books, and the early bloggers. In 8th grade, I got a job working for Bristol Township School District while a student. I cleaned and repaired computers, learned about networking and administration, and worked on early versions of their website.
Sherry: That’s impressive! You were already doing significant work at a young age. What was your next step after high school?
Sean: One of my earliest consulting gigs was as a subcontractor for someone doing ASP work for Oxford University when I was still in high school. In undergrad, I wanted to embrace areas of study beyond technology, which led me to major in American Studies at Muhlenberg College. I credit the variety and interdisciplinary nature of my liberal arts education for the great deal of success I’ve had since.
Sherry: How did your career progress after college?
Sean: I graduated in 2009, during a tough job market, but I was fortunate to get an opportunity with Dakota Consulting, which kickstarted my career. I moved to Washington, DC, to work as an IT administrator and later transitioned to consulting, which opened doors to roles at Johns Hopkins University Applied Physics Lab and KCIC, where I developed as a leader.
Afterward, I joined CoStar Group, where I gained experience in a larger organization and witnessed the launch of Apartments.com. My career took a significant leap at Excella Consulting, where I led a major legacy modernization effort, became a conference speaker, and contributed to open-source software. I spent about six years there, eventually becoming a Principal Technical Fellow. Currently, I’m the VP of Innovation & Products at SCT Software, where I lead a talented team bringing new products to market with cutting-edge technologies.
Sherry: That’s quite a journey, Sean. Your career path is both inspiring and diverse. It’s clear that you’ve had a broad range of experiences that have shaped you into the professional you are today. Can you tell us more about your involvement in community-driven initiatives and open-source contributions? How has that influenced your career?
Sean: Absolutely. I’ve always found joy in contributing to the technical community, largely because I benefited so much from others who shared their knowledge freely. That inspiration drove me to give back through blogging, contributing to open-source projects, and participating in community events. I’ve hosted the .NET DC User Group, spoken at conferences, and worked on various OSS projects. One of my proudest moments was helping revamp the documentation for the NUnit project, which eventually led to my role as the documentation lead and a core team member. Contributing to OSS is more than just giving back; it’s about being part of something bigger, a community where we all help each other grow.
Sherry: It’s wonderful to hear how much you value community and collaboration. Speaking of which, can you tell us about the Microsoft MVP initiative that led you to find those inconsistencies in SQL Server content? How did that experience shape your involvement in the MVP community?
Sean: Interestingly, I didn’t set out to contribute to an “MVP initiative” per se. It started with a simple request from Randolph West in the MVP mailing list, asking if anyone had noticed typos in SQL Server error messages. That sparked an idea for me. In 2022, I had worked on a Hacktoberfest project that automated spell-checking for documentation. With the SQL Server docs being open source, I was able to use tools like cSpell to identify inconsistencies across the documentation. This wasn’t just about finding errors; it was about using the skills and tools I had to make a meaningful contribution. My journey as an MVP has been somewhat unique, given that I was awarded just before my son was born and during the pandemic. While I’ve had to balance personal responsibilities, I remain committed to contributing in ways that benefit the broader developer community.
Sherry: Your dedication to the community is evident. What inspired you to start contributing to platforms like Microsoft Learn and the Microsoft Tech Community? What keeps you motivated to continue?
Sean: The idea of open documentation and learning resources is something I’m passionate about. Early in my career, I was deeply inspired by those who shared their knowledge freely, and that motivated me to do the same. The ability to make a change, however small, that can benefit others is incredibly fulfilling. Whether it’s supporting OSS projects, blogging, or answering questions in the community, I’m driven by the idea that we’re all in this together. Recently, someone thanked me for a blog post I wrote nine years ago. That kind of impact, where something I did years ago continues to help others, is what keeps me going.
Sherry: It’s clear that your contributions have had a lasting impact. How has contributing to the Microsoft Learn platform specifically helped advance your career or personal growth?
Sean: I see my contributions more as giving back to the community rather than to Microsoft directly. But there’s no doubt that putting myself out there and looking for ways to add value has opened up numerous opportunities. My involvement with the NUnit project is a perfect example. I started by helping to move the documentation to a more cohesive format, which led to learning new skills, gaining visibility, and ultimately being invited to join the core team. This kind of journey, where a willingness to help and a readiness to learn leads to personal and professional growth, is something I’ve experienced repeatedly in the OSS community.
Sherry: That’s such a powerful example of how contributing can lead to unexpected opportunities. Do you have any advice for those looking to start contributing to open-source content?
Sean: Absolutely. First, don’t let imposter syndrome stop you. There’s always a need in the community, and chances are, you already have the skills to make a big impact. Start with tools and projects you’re familiar with or admire, and look for areas where you can add value. Remember, contributing to OSS is about building relationships, so approach it with a mindset of collaboration and respect. And don’t be afraid to try different types of contributions until you find what gives you positive energy. The community is vast, and there’s always a place where your contributions will be valued.
Sherry: That’s excellent advice, Sean. Outside of work, what do you enjoy doing in your free time? Any hobbies or activities that help you unwind?
Sean: Lately, work has been consuming a lot of my time as we’re launching multiple cloud-based products, but my favorite role right now is being a Dad to my son, Eamon. He’s four, and watching him grow is a constant source of joy and fun. I also love singing and musical theatre—I’ll sing at any opportunity. Over the last few years, I’ve also found a lot of peace in exploring the outdoors and taking long walks. Poetry is another passion of mine, and I often find inspiration in the everyday moments of life.
Sherry: It sounds like you have a rich and fulfilling life both professionally and personally. Is there anything else you’d like to share about your journey or contributions?
Sean: I’d like to acknowledge the incredible support I receive from my wife. She’s the one who makes it possible for me to contribute and work as I do. Her daily efforts in caring for our child and family enable me to show up fully in my professional and community roles. I’m incredibly grateful to her and partners everywhere who support us in pursuing our passions.
Sherry: Thank you, Sean, for sharing your story with us. Your journey is truly inspiring,
Keep up with Konstantinos:
Personal Website: https://seankilleen.com/
LinkedIn: https://linkedin.com/in/SeanKilleen
X (formerly Twitter): https://twitter.com/sjkilleen
Mastodon: https://mastodon.social/@sjkilleen
Credly profile: https://www.credly.com/users/sean-killeen.ad6d9f52
To learn more about:
Contributing to Microsoft Learn, visit Microsoft Learn Contributor Home.
To learn more about the new Community Content site on Microsoft Learn, including how to join, visit Microsoft Learn Community Content.
Contribute to the Microsoft Learn Q&A by joining the Microsoft Community Champions program.
Microsoft Tech Community – Latest Blogs –Read More
How to access the system clipboard in MATLAB Web App Server
I am creating an app in MATLAB Web App Server 2024a. Accessing the system’s clipboard using the clipboard function is not supported, as described in the unsupported functionality page. I am looking for an alternative so that users can paste the contents of their clipboard into a UITable.
Interestingly, despite the lack of support for the clipboard function, users are still able to paste text from their clipboard using the key combination to paste if they double click a cell in the table first so that there’s a flashing cursor. This leads me to believe that Web App Server is able to access the system clipboard, although I can’t seem to figure out how to do so (ie. if there’s a different function to call). Is there a way for me to access the user’s clipboard in Web App Server without the clipboard function? As it stands, users can only paste if they’ve double-clicked a cell in the table. A single click won’t do, and I’d like to add functionality to enable that.
Any insights are appreciated. Thank you!I am creating an app in MATLAB Web App Server 2024a. Accessing the system’s clipboard using the clipboard function is not supported, as described in the unsupported functionality page. I am looking for an alternative so that users can paste the contents of their clipboard into a UITable.
Interestingly, despite the lack of support for the clipboard function, users are still able to paste text from their clipboard using the key combination to paste if they double click a cell in the table first so that there’s a flashing cursor. This leads me to believe that Web App Server is able to access the system clipboard, although I can’t seem to figure out how to do so (ie. if there’s a different function to call). Is there a way for me to access the user’s clipboard in Web App Server without the clipboard function? As it stands, users can only paste if they’ve double-clicked a cell in the table. A single click won’t do, and I’d like to add functionality to enable that.
Any insights are appreciated. Thank you! I am creating an app in MATLAB Web App Server 2024a. Accessing the system’s clipboard using the clipboard function is not supported, as described in the unsupported functionality page. I am looking for an alternative so that users can paste the contents of their clipboard into a UITable.
Interestingly, despite the lack of support for the clipboard function, users are still able to paste text from their clipboard using the key combination to paste if they double click a cell in the table first so that there’s a flashing cursor. This leads me to believe that Web App Server is able to access the system clipboard, although I can’t seem to figure out how to do so (ie. if there’s a different function to call). Is there a way for me to access the user’s clipboard in Web App Server without the clipboard function? As it stands, users can only paste if they’ve double-clicked a cell in the table. A single click won’t do, and I’d like to add functionality to enable that.
Any insights are appreciated. Thank you! matlab, appdesigner, web app server, clipboard, uitable MATLAB Answers — New Questions
exponential increase in wave form in three phase grid connected svpwm
for the three phase grid connected system for the svpwm i have used the angle from pll, sector selection is also obtained using pll,vdc of 400v and Ts=1/10000. i have used current controller for obtaining vref. i’m experiencing exponentially increasing waveform in vref. what should i do to settle it downfor the three phase grid connected system for the svpwm i have used the angle from pll, sector selection is also obtained using pll,vdc of 400v and Ts=1/10000. i have used current controller for obtaining vref. i’m experiencing exponentially increasing waveform in vref. what should i do to settle it down for the three phase grid connected system for the svpwm i have used the angle from pll, sector selection is also obtained using pll,vdc of 400v and Ts=1/10000. i have used current controller for obtaining vref. i’m experiencing exponentially increasing waveform in vref. what should i do to settle it down exponential increase in vref in svpwm MATLAB Answers — New Questions
PSO algorithm value problem
Hi
I have a pso code, but i have a little problem. Here is a code
clc;
clear;
close all;
%% Problem Definition
CostFunction = @(x) Sphere(x); % Cost Function
nVar = 5; % Number of Unknown (Deceision) Variables
VarSize = [1 nVar]; % Matrix Size of Decision Variables
VarMin = -10; % Lower bound of Decesion Variable
VarMax = 10; % Upper bound of Decesion Variable
%% Parameters of PSO
MaxIt = 100; % Maximum Number of Iterations
nPop = 50; % Population Size (Swarm Size)
wdamp = 0.99; % Damping Ratio of Inertia Coefficient
w = 1; % Inertia Coefficient
c1 = 2; % Personal Acceleration Coefficient
c2 = 2; % Social Acceleration Coefficient
%% Initialization
% The Particle Template
empty_particle.Position = [];
empty_particle.Velocity = [];
empty_particle.Cost = [];
empty_particle.Best.Position = [];
empty_particle.Best.Cost = [];
% Create Population Array
particle = repmat(empty_particle, nPop, 1);
% Initialize Global Best
GlobalBest.Cost = inf;
% Initialize Population Members
for i=1:nPop
% Generate Random Solution
particle(i).Position = unifrnd(VarMin, VarMax, VarSize);
% Initialize Velocity
particle(i).Velocity = zeros(VarSize);
% Evaluation
particle(i).Cost = CostFunction(particle(i).Position);
% Update the Personal Best
particle(i).Best.Position = particle(i).Position;
particle(i).Best.Cost = particle(i).Cost;
% Update Global Best
if particle(i).Best.Cost < GlobalBest.Cost
GlobalBest = particle(i).Best;
end
end
%
% Array to Hold Best Cost Value on Each Iteration
BestCosts = zeros(MaxIt, 1);
%% Main Loop of PSO
for it=1:MaxIt
for i=1:nPop
% Update Velocity
particle(i).Velocity = w*particle(i).Velocity …
+ c1*rand(VarSize).*(particle(i).Best.Position – particle(i).Position) …
+ c2*rand(VarSize).*(GlobalBest.Position – particle(i).Position);
% Update Position
particle(i).Postion = particle(i).Position + particle(i).Velocity;
% Evaluation
particle(i).Cost = CostFunction(particle(i).Position);
% Update Personal Best
if particle(i).Cost < particle(i).Best.Cost
particle(i).Best.Position = particle(i).Position;
particle(i).Best.Cost = particle(i).Cost;
% Update Global Best
if particle(i).Best.Cost < GlobalBest.Cost
GlobalBest = particle(i).Best;
end
end
end
% Store the Best Cost Value
BestCosts(it) = GlobalBest.Cost;
% Display Iteration Information
disp([‘Iteration ‘ num2str(it) ‘: Best Cost = ‘ num2str(BestCosts(it))]);
% Damping Interia Coefficient
w = w * wdamp;
end
figure;
plot(BestCosts, ‘LineWidth’, 2);
xlabel(‘Iteration’);
ylabel(‘Best Cost’);
grid on;
Value of BestCosts is alwyas the same, but shouldnt. I dont know how to fix it. Please help me.Hi
I have a pso code, but i have a little problem. Here is a code
clc;
clear;
close all;
%% Problem Definition
CostFunction = @(x) Sphere(x); % Cost Function
nVar = 5; % Number of Unknown (Deceision) Variables
VarSize = [1 nVar]; % Matrix Size of Decision Variables
VarMin = -10; % Lower bound of Decesion Variable
VarMax = 10; % Upper bound of Decesion Variable
%% Parameters of PSO
MaxIt = 100; % Maximum Number of Iterations
nPop = 50; % Population Size (Swarm Size)
wdamp = 0.99; % Damping Ratio of Inertia Coefficient
w = 1; % Inertia Coefficient
c1 = 2; % Personal Acceleration Coefficient
c2 = 2; % Social Acceleration Coefficient
%% Initialization
% The Particle Template
empty_particle.Position = [];
empty_particle.Velocity = [];
empty_particle.Cost = [];
empty_particle.Best.Position = [];
empty_particle.Best.Cost = [];
% Create Population Array
particle = repmat(empty_particle, nPop, 1);
% Initialize Global Best
GlobalBest.Cost = inf;
% Initialize Population Members
for i=1:nPop
% Generate Random Solution
particle(i).Position = unifrnd(VarMin, VarMax, VarSize);
% Initialize Velocity
particle(i).Velocity = zeros(VarSize);
% Evaluation
particle(i).Cost = CostFunction(particle(i).Position);
% Update the Personal Best
particle(i).Best.Position = particle(i).Position;
particle(i).Best.Cost = particle(i).Cost;
% Update Global Best
if particle(i).Best.Cost < GlobalBest.Cost
GlobalBest = particle(i).Best;
end
end
%
% Array to Hold Best Cost Value on Each Iteration
BestCosts = zeros(MaxIt, 1);
%% Main Loop of PSO
for it=1:MaxIt
for i=1:nPop
% Update Velocity
particle(i).Velocity = w*particle(i).Velocity …
+ c1*rand(VarSize).*(particle(i).Best.Position – particle(i).Position) …
+ c2*rand(VarSize).*(GlobalBest.Position – particle(i).Position);
% Update Position
particle(i).Postion = particle(i).Position + particle(i).Velocity;
% Evaluation
particle(i).Cost = CostFunction(particle(i).Position);
% Update Personal Best
if particle(i).Cost < particle(i).Best.Cost
particle(i).Best.Position = particle(i).Position;
particle(i).Best.Cost = particle(i).Cost;
% Update Global Best
if particle(i).Best.Cost < GlobalBest.Cost
GlobalBest = particle(i).Best;
end
end
end
% Store the Best Cost Value
BestCosts(it) = GlobalBest.Cost;
% Display Iteration Information
disp([‘Iteration ‘ num2str(it) ‘: Best Cost = ‘ num2str(BestCosts(it))]);
% Damping Interia Coefficient
w = w * wdamp;
end
figure;
plot(BestCosts, ‘LineWidth’, 2);
xlabel(‘Iteration’);
ylabel(‘Best Cost’);
grid on;
Value of BestCosts is alwyas the same, but shouldnt. I dont know how to fix it. Please help me. Hi
I have a pso code, but i have a little problem. Here is a code
clc;
clear;
close all;
%% Problem Definition
CostFunction = @(x) Sphere(x); % Cost Function
nVar = 5; % Number of Unknown (Deceision) Variables
VarSize = [1 nVar]; % Matrix Size of Decision Variables
VarMin = -10; % Lower bound of Decesion Variable
VarMax = 10; % Upper bound of Decesion Variable
%% Parameters of PSO
MaxIt = 100; % Maximum Number of Iterations
nPop = 50; % Population Size (Swarm Size)
wdamp = 0.99; % Damping Ratio of Inertia Coefficient
w = 1; % Inertia Coefficient
c1 = 2; % Personal Acceleration Coefficient
c2 = 2; % Social Acceleration Coefficient
%% Initialization
% The Particle Template
empty_particle.Position = [];
empty_particle.Velocity = [];
empty_particle.Cost = [];
empty_particle.Best.Position = [];
empty_particle.Best.Cost = [];
% Create Population Array
particle = repmat(empty_particle, nPop, 1);
% Initialize Global Best
GlobalBest.Cost = inf;
% Initialize Population Members
for i=1:nPop
% Generate Random Solution
particle(i).Position = unifrnd(VarMin, VarMax, VarSize);
% Initialize Velocity
particle(i).Velocity = zeros(VarSize);
% Evaluation
particle(i).Cost = CostFunction(particle(i).Position);
% Update the Personal Best
particle(i).Best.Position = particle(i).Position;
particle(i).Best.Cost = particle(i).Cost;
% Update Global Best
if particle(i).Best.Cost < GlobalBest.Cost
GlobalBest = particle(i).Best;
end
end
%
% Array to Hold Best Cost Value on Each Iteration
BestCosts = zeros(MaxIt, 1);
%% Main Loop of PSO
for it=1:MaxIt
for i=1:nPop
% Update Velocity
particle(i).Velocity = w*particle(i).Velocity …
+ c1*rand(VarSize).*(particle(i).Best.Position – particle(i).Position) …
+ c2*rand(VarSize).*(GlobalBest.Position – particle(i).Position);
% Update Position
particle(i).Postion = particle(i).Position + particle(i).Velocity;
% Evaluation
particle(i).Cost = CostFunction(particle(i).Position);
% Update Personal Best
if particle(i).Cost < particle(i).Best.Cost
particle(i).Best.Position = particle(i).Position;
particle(i).Best.Cost = particle(i).Cost;
% Update Global Best
if particle(i).Best.Cost < GlobalBest.Cost
GlobalBest = particle(i).Best;
end
end
end
% Store the Best Cost Value
BestCosts(it) = GlobalBest.Cost;
% Display Iteration Information
disp([‘Iteration ‘ num2str(it) ‘: Best Cost = ‘ num2str(BestCosts(it))]);
% Damping Interia Coefficient
w = w * wdamp;
end
figure;
plot(BestCosts, ‘LineWidth’, 2);
xlabel(‘Iteration’);
ylabel(‘Best Cost’);
grid on;
Value of BestCosts is alwyas the same, but shouldnt. I dont know how to fix it. Please help me. pso algorithm MATLAB Answers — New Questions
get all rows from table by more than one categorical
Hi All,
I want to filter my table and get subtables for statistical calcs.
I use the commant:
D=table
D_sub=D(D.LogID== ‘2’,:);
To get all rows with the LogID 2. How can I expand this commant to get for example all data from LogID 2,3,4 and 5 with one commant?
Than you
MarkusHi All,
I want to filter my table and get subtables for statistical calcs.
I use the commant:
D=table
D_sub=D(D.LogID== ‘2’,:);
To get all rows with the LogID 2. How can I expand this commant to get for example all data from LogID 2,3,4 and 5 with one commant?
Than you
Markus Hi All,
I want to filter my table and get subtables for statistical calcs.
I use the commant:
D=table
D_sub=D(D.LogID== ‘2’,:);
To get all rows with the LogID 2. How can I expand this commant to get for example all data from LogID 2,3,4 and 5 with one commant?
Than you
Markus table, subtable, categorical, matlab MATLAB Answers — New Questions
callback in TreeNode Propertis
hi, i want to execute calback by click Node2 to execute other function
It’s possibile to do it?hi, i want to execute calback by click Node2 to execute other function
It’s possibile to do it? hi, i want to execute calback by click Node2 to execute other function
It’s possibile to do it? callback in treenode propertis MATLAB Answers — New Questions
Linear Regression, line of best fit
If I have data for vectors x = [ ] and y= [ ], how do I find and plot the linear regression/line of best fit? Once I have plotted the line of best fit, how do I record the slope of that line of best fit to some variable "a"?If I have data for vectors x = [ ] and y= [ ], how do I find and plot the linear regression/line of best fit? Once I have plotted the line of best fit, how do I record the slope of that line of best fit to some variable "a"? If I have data for vectors x = [ ] and y= [ ], how do I find and plot the linear regression/line of best fit? Once I have plotted the line of best fit, how do I record the slope of that line of best fit to some variable "a"? line of best fit MATLAB Answers — New Questions
Intune device compliance status not evaluated
Has anyone encountered devices taking absolutely forever to evaluate overall compliance after user enrollment ESP? (pre-provisioned devices). They just sit there in “not evaluated” and get blocked by CA policy. Most come good eventually, but some literally are taking employees offline for the whole day.
These are all Win11 AAD-joined. Microsoft has only offered me the standard “may take up to 8 hours, goodbye” response but I am pulling my hair out trying to figure out if this is just an Intune thing, or is there a trick I am missing? Some of them take so long that I give up and swap out the device so they can start working.
The individual policies are evaluating just fine, but the overall status is way behind. I’d even prefer them to be non-compliant because at least then the grace period would kick in.
I have had very limited success with rebooting and kicking off all the syncs / check access buttons, but I have a feeling those buttons have just been a placebo. It happens very sporadically too on about half of devices the user doesn’t even notice it’s that quick.
Thanks for any advice
Has anyone encountered devices taking absolutely forever to evaluate overall compliance after user enrollment ESP? (pre-provisioned devices). They just sit there in “not evaluated” and get blocked by CA policy. Most come good eventually, but some literally are taking employees offline for the whole day.These are all Win11 AAD-joined. Microsoft has only offered me the standard “may take up to 8 hours, goodbye” response but I am pulling my hair out trying to figure out if this is just an Intune thing, or is there a trick I am missing? Some of them take so long that I give up and swap out the device so they can start working. The individual policies are evaluating just fine, but the overall status is way behind. I’d even prefer them to be non-compliant because at least then the grace period would kick in.I have had very limited success with rebooting and kicking off all the syncs / check access buttons, but I have a feeling those buttons have just been a placebo. It happens very sporadically too on about half of devices the user doesn’t even notice it’s that quick. Thanks for any advice Read More
update a created column to a primary key column
I have created a table mentioned below, now i want to convert “PersonID” into Primary key . Please provide me the code?
create table Persons(
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
Thanks
I have created a table mentioned below, now i want to convert “PersonID” into Primary key . Please provide me the code?create table Persons(PersonID int,LastName varchar(255),FirstName varchar(255),Address varchar(255),City varchar(255));Thanks Read More