Month: June 2024
NLP problem with fmincon: Non-differentiable point in objective function
Consider the simplified optimisation problem having as decision variable the vector:
where is the number of discretisation points, multiplied by the number of variables per point (e.g. 6 state variables and 3 control variables).
Let the objective function be defined such that the control effort is minimised:
Where is the number of discretisation points and is the 3×1 control vector at the i-th time instant.
In code notation, this becomes:
%% Example:
% Problem data:
timeInstants = 10;
stateVariables = 6;
controlVariables = 3;
allVariables = stateVariables + controlVariables;
decisionVariables = allVariables*timeInstants;
% Indeces:
idx = reshape(1:decisionVariables,allVariables,[])’;
controlIdx = idx(:,1:controlVariables)’;
% NLP vector:
x = rand(1,decisionVariables);
% Objective function:
f = sum(vecnorm(x(controlIdx)));
From literature, I know that the optimal solution of my problem is bang-bang, i.e.:
The analytical Jacobian and Hessian are defined as:
Considering the control profile I’m looking for, the convergence is affected by the singularity when , where both Jacobian and Hessian become indeterminate.
I tried to overcome the problem by imposing alternatives forms when the NaN occurs (such as ones or zeros), but considering that the zero solution is optimal, this causes convergence failures.
The same problem occurs with numerical derivatives.
How can I overcome this problem?
Do you have any reference about other people facing this issue?
Thanks in advance.Consider the simplified optimisation problem having as decision variable the vector:
where is the number of discretisation points, multiplied by the number of variables per point (e.g. 6 state variables and 3 control variables).
Let the objective function be defined such that the control effort is minimised:
Where is the number of discretisation points and is the 3×1 control vector at the i-th time instant.
In code notation, this becomes:
%% Example:
% Problem data:
timeInstants = 10;
stateVariables = 6;
controlVariables = 3;
allVariables = stateVariables + controlVariables;
decisionVariables = allVariables*timeInstants;
% Indeces:
idx = reshape(1:decisionVariables,allVariables,[])’;
controlIdx = idx(:,1:controlVariables)’;
% NLP vector:
x = rand(1,decisionVariables);
% Objective function:
f = sum(vecnorm(x(controlIdx)));
From literature, I know that the optimal solution of my problem is bang-bang, i.e.:
The analytical Jacobian and Hessian are defined as:
Considering the control profile I’m looking for, the convergence is affected by the singularity when , where both Jacobian and Hessian become indeterminate.
I tried to overcome the problem by imposing alternatives forms when the NaN occurs (such as ones or zeros), but considering that the zero solution is optimal, this causes convergence failures.
The same problem occurs with numerical derivatives.
How can I overcome this problem?
Do you have any reference about other people facing this issue?
Thanks in advance. Consider the simplified optimisation problem having as decision variable the vector:
where is the number of discretisation points, multiplied by the number of variables per point (e.g. 6 state variables and 3 control variables).
Let the objective function be defined such that the control effort is minimised:
Where is the number of discretisation points and is the 3×1 control vector at the i-th time instant.
In code notation, this becomes:
%% Example:
% Problem data:
timeInstants = 10;
stateVariables = 6;
controlVariables = 3;
allVariables = stateVariables + controlVariables;
decisionVariables = allVariables*timeInstants;
% Indeces:
idx = reshape(1:decisionVariables,allVariables,[])’;
controlIdx = idx(:,1:controlVariables)’;
% NLP vector:
x = rand(1,decisionVariables);
% Objective function:
f = sum(vecnorm(x(controlIdx)));
From literature, I know that the optimal solution of my problem is bang-bang, i.e.:
The analytical Jacobian and Hessian are defined as:
Considering the control profile I’m looking for, the convergence is affected by the singularity when , where both Jacobian and Hessian become indeterminate.
I tried to overcome the problem by imposing alternatives forms when the NaN occurs (such as ones or zeros), but considering that the zero solution is optimal, this causes convergence failures.
The same problem occurs with numerical derivatives.
How can I overcome this problem?
Do you have any reference about other people facing this issue?
Thanks in advance. nlp, fmincon, hessian, jacobian, indeterminate, nondifferentiable, analytical MATLAB Answers — New Questions
how retrive last data not nan from Thingspeak channel in matlab
I want in my project when retrive data from Thingspeak channel and if data is nan then retrive last data not nan in matlabI want in my project when retrive data from Thingspeak channel and if data is nan then retrive last data not nan in matlab I want in my project when retrive data from Thingspeak channel and if data is nan then retrive last data not nan in matlab matlab, programming MATLAB Answers — New Questions
How to evaluate what satellites is passing above the ground station at a specific time.
Hi,
I am trying to find out what satellites are passing about a ground station at any given time. For this I have following the documentaion and examples for satellite scenario.
I am generating the satellites from the publically available starlink TLE file database at celestrak.
By observing the elevation on (https://satellitemap.space/?constellation=starlink#), I decided to use 75 as min elevation.
Below is the code that gives a list of satellites that passes over the ground station as "intvls".
But the below metod is missing out some satellites that should have been detected. More than likely it is due to the min elevation angle but reducing it increases the false positive.
Any help and suggestions are appreciated appreciated.
Thank you
startTime = datetime(2024,6,11,13,43,00); %TIME IS IN UTC
stopTime = startTime + minutes(30);
sampleTime = 2; % seconds
sc = satelliteScenario(startTime,stopTime,sampleTime);
lat = 30.240997424571656;
lon = -81.61860217874788;
minElevationAngle = 75; %based on observation
gs = groundStation(sc,lat,lon,"MinElevationAngle",minElevationAngle);
sat = satellite(sc, "All_sat.tle");
% play(sc)
ac = access(sat,gs);
intvls = accessIntervals(ac);
% time = datetime(2024,6,11,13,44,0);
% s = accessStatus(ac,time);Hi,
I am trying to find out what satellites are passing about a ground station at any given time. For this I have following the documentaion and examples for satellite scenario.
I am generating the satellites from the publically available starlink TLE file database at celestrak.
By observing the elevation on (https://satellitemap.space/?constellation=starlink#), I decided to use 75 as min elevation.
Below is the code that gives a list of satellites that passes over the ground station as "intvls".
But the below metod is missing out some satellites that should have been detected. More than likely it is due to the min elevation angle but reducing it increases the false positive.
Any help and suggestions are appreciated appreciated.
Thank you
startTime = datetime(2024,6,11,13,43,00); %TIME IS IN UTC
stopTime = startTime + minutes(30);
sampleTime = 2; % seconds
sc = satelliteScenario(startTime,stopTime,sampleTime);
lat = 30.240997424571656;
lon = -81.61860217874788;
minElevationAngle = 75; %based on observation
gs = groundStation(sc,lat,lon,"MinElevationAngle",minElevationAngle);
sat = satellite(sc, "All_sat.tle");
% play(sc)
ac = access(sat,gs);
intvls = accessIntervals(ac);
% time = datetime(2024,6,11,13,44,0);
% s = accessStatus(ac,time); Hi,
I am trying to find out what satellites are passing about a ground station at any given time. For this I have following the documentaion and examples for satellite scenario.
I am generating the satellites from the publically available starlink TLE file database at celestrak.
By observing the elevation on (https://satellitemap.space/?constellation=starlink#), I decided to use 75 as min elevation.
Below is the code that gives a list of satellites that passes over the ground station as "intvls".
But the below metod is missing out some satellites that should have been detected. More than likely it is due to the min elevation angle but reducing it increases the false positive.
Any help and suggestions are appreciated appreciated.
Thank you
startTime = datetime(2024,6,11,13,43,00); %TIME IS IN UTC
stopTime = startTime + minutes(30);
sampleTime = 2; % seconds
sc = satelliteScenario(startTime,stopTime,sampleTime);
lat = 30.240997424571656;
lon = -81.61860217874788;
minElevationAngle = 75; %based on observation
gs = groundStation(sc,lat,lon,"MinElevationAngle",minElevationAngle);
sat = satellite(sc, "All_sat.tle");
% play(sc)
ac = access(sat,gs);
intvls = accessIntervals(ac);
% time = datetime(2024,6,11,13,44,0);
% s = accessStatus(ac,time); matlab, communication, satellite MATLAB Answers — New Questions
How do I get rid of the “lollypop” output on a Simulink Simulation Data Inspector plot?
All of my SimEvents output in the Simulation Data Inspector plots look like a bunch of lollypops. What I really want are just the circles, or maybe curve, not the vertical lines. How can I change the output to the desired format? I am using MATLAB 2024a Update 3.
Is the lollypop display a SimEvents artifact?
Figure 1 – The Lollypops
I also notice that my Time Plot Visualization settings are limited to just the following, not the full set of options shown in the Help Center documentation. How do I access the additional Time Plot Visualization settings?
Figure 2 – My Time Plot Visualization Settings
Figure 3 – Visualization Settings Shown in Help Center DocumentationAll of my SimEvents output in the Simulation Data Inspector plots look like a bunch of lollypops. What I really want are just the circles, or maybe curve, not the vertical lines. How can I change the output to the desired format? I am using MATLAB 2024a Update 3.
Is the lollypop display a SimEvents artifact?
Figure 1 – The Lollypops
I also notice that my Time Plot Visualization settings are limited to just the following, not the full set of options shown in the Help Center documentation. How do I access the additional Time Plot Visualization settings?
Figure 2 – My Time Plot Visualization Settings
Figure 3 – Visualization Settings Shown in Help Center Documentation All of my SimEvents output in the Simulation Data Inspector plots look like a bunch of lollypops. What I really want are just the circles, or maybe curve, not the vertical lines. How can I change the output to the desired format? I am using MATLAB 2024a Update 3.
Is the lollypop display a SimEvents artifact?
Figure 1 – The Lollypops
I also notice that my Time Plot Visualization settings are limited to just the following, not the full set of options shown in the Help Center documentation. How do I access the additional Time Plot Visualization settings?
Figure 2 – My Time Plot Visualization Settings
Figure 3 – Visualization Settings Shown in Help Center Documentation simevents, simulation data inspector, visualization settings MATLAB Answers — New Questions
intune and local groups
So, I have a bunch of computers that do not have a “local admin group”, is there a way I can use intune to make this group and send it down to the computers so I can then add users to it?
So, I have a bunch of computers that do not have a “local admin group”, is there a way I can use intune to make this group and send it down to the computers so I can then add users to it? Read More
Becoming a Microsoft AI Cloud Partner
I am looking for help with completing the process for signing my company up as a Microsoft AI Cloud Partner.
I have been directed to https://partner.microsoft.com/en-US/partnership, where I select “Become a Partner”.
I go through the process as instructed but hit a dead end when I arrive at the “Join a program…” page. Note that this page offers only two options (Bethesda Partner Program, Windows and Xbox), neither of which is appropriate for me and both of which I am not eligible to join (even if I wanted to).
For the program for which I am interested (Microsoft AI Cloud Partner) the page says “…Sign in again using your work account.” So it may be that the site does not recognize my account as a work account. Unfortunately, the instructions provided for creating a work account (https://learn.microsoft.com/en-us/partner-center/mpn-overview and https://learn.microsoft.com/en-us/partner-center/intro-to-cloud-partner-program-membership) direct me back to the partner page at the beginning of this post. So I am stuck in an infinite loop.
I have reached out to partner support, Azure support and Azure sales. Everyone directs me to the same above referenced partner page and/or advises me to log a support request. When I did the latter I received a response with a link to the same partner page.
I would greatly appreciate any guidance beyond a link to the partner page that is not working for me. I acknowledge that the root cause MAY be my own user error. But a few minutes with a knowledgable guide would be a lot more productive than many hours of detective work.
I am looking for help with completing the process for signing my company up as a Microsoft AI Cloud Partner. I have been directed to https://partner.microsoft.com/en-US/partnership, where I select “Become a Partner”. I go through the process as instructed but hit a dead end when I arrive at the “Join a program…” page. Note that this page offers only two options (Bethesda Partner Program, Windows and Xbox), neither of which is appropriate for me and both of which I am not eligible to join (even if I wanted to). For the program for which I am interested (Microsoft AI Cloud Partner) the page says “…Sign in again using your work account.” So it may be that the site does not recognize my account as a work account. Unfortunately, the instructions provided for creating a work account (https://learn.microsoft.com/en-us/partner-center/mpn-overview and https://learn.microsoft.com/en-us/partner-center/intro-to-cloud-partner-program-membership) direct me back to the partner page at the beginning of this post. So I am stuck in an infinite loop. I have reached out to partner support, Azure support and Azure sales. Everyone directs me to the same above referenced partner page and/or advises me to log a support request. When I did the latter I received a response with a link to the same partner page. I would greatly appreciate any guidance beyond a link to the partner page that is not working for me. I acknowledge that the root cause MAY be my own user error. But a few minutes with a knowledgable guide would be a lot more productive than many hours of detective work. Read More
Create an Incident when an email arrives, Downloading attachment and saving in a blob storage
I’m working on a Logic App in Azure Sentinel designed to automatically create incidents whenever an email arrives with a specific subject line. However, I’m encountering an error when trying to create the incident.
Thanks in advance for your assistance!
I’m working on a Logic App in Azure Sentinel designed to automatically create incidents whenever an email arrives with a specific subject line. However, I’m encountering an error when trying to create the incident.code: 400,Could you please advise on what might be causing this error and how I can troubleshoot it?Thanks in advance for your assistance! Read More
Create a Retrieval-Augmented Generation (RAG) app instantly with React, FastAPI, and Qdrant
Deploying web applications in the cloud can often be a complex task, involving multiple steps and intricate configurations. App Spaces aims to streamline this process, offering a straightforward approach to hosting web applications. This blog post will guide you through deploying a “Sample Space,” specifically the Retrieval-Augmented Generation (RAG) sample space, to demonstrate how easily you can set up and manage a RAG type application using App Spaces.
What is App Spaces?
App Spaces is a versatile service within Microsoft Azure designed to simplify the deployment and management of web applications. It provides several deployment options:
GitHub Repository: Directly deploy your code from a GitHub repository.
Starter App Templates: Use pre-configured templates for popular frameworks like React, Vue, Express, Django, Flask, and FastAPI.
Sample Spaces: Deploy fully provisioned, ready-to-use applications with a single click.
For this tutorial, we will focus on deploying the Retrieval-Augmented Generation (RAG) App sample space, which integrates a React frontend, a FastAPI backend, and a Qdrant vector database.
Step 1: Getting Started with App Spaces
To begin, navigate to the App Spaces dashboard (click here to try now) in your Azure portal. Here, you can initiate the process of creating a new app space.
From the dashboard, you have several deployment options. Select the Retrieval-Augmented Generation (RAG) App sample space from the available sample spaces.
Step 2: Automatic Provisioning of Resources
Upon selecting the RAG sample space, App Spaces will automatically provision the necessary resources, including a React frontend, a FastAPI backend, and a Qdrant vector database.
Step 3: Configuring Your App
Next, you need to configure your app by linking it to your GitHub account and specifying repository details. Here’s how to do it:
Connect Your GitHub Account: Link your GitHub account with App Spaces to allow access to your repositories. If not already linked, you’ll be prompted to log in and authorize access.
Select Your Organization: Choose the GitHub organization under which the new repository will be created. This ensures the project is stored in the correct organizational context.
Name Your Repository: Provide a descriptive name for your new repository where App Spaces will push the initial sample app code.
Specify the Branch: Default to the main branch unless you prefer to use a different branch.
Configure App Details: Enter details such as the app space name, subscription, and region. This configuration helps Azure set up the necessary infrastructure.
After completing these steps, App Spaces will create the GitHub repository, push the initial code, and set up a CI/CD pipeline for automatic deployments.
Step 4: Managing and Verifying Your Deployment
Once your app is deployed, managing and verifying its deployment is straightforward. App Spaces provides a comprehensive management interface to monitor and control various aspects of your application.
Deployment Verification
The deployment status for each component (frontend, backend, database) can be monitored from the App Spaces dashboard. Each deployment entry provides details about the status and timestamps of deployment events.
Viewing Logs
Accessing logs is crucial for debugging and ensuring your application runs smoothly. The logs section provides both system-level and application-level logs.
Monitoring Metrics
The metrics section provides insights into your application’s performance, including CPU usage, memory usage, and request counts. This data helps you understand the load on your application and optimize performance.
Step 5: Using the Sample App
With the app successfully deployed, you can now interact with it through the provided URL. The RAG sample app offers a user-friendly interface to perform the following actions:
Enter Your OpenAI API Key: Input your OpenAI API key to enable querying the OpenAI API. This step is crucial for the app to function correctly as it relies on the OpenAI API for generating embeddings and enhancing search results.
Ask a Question: Submit a query, and the app will use OpenAI’s embeddings to search the vector database for relevant information. This feature is particularly useful for retrieving detailed and contextually relevant information from a large dataset.
Store New Text: Add new data to the vector database for future queries. This feature is great for continuously building and enriching your knowledge base.
Follow the instructions below to get started trying out the sample app:
Configuration:
Open the app in your browser.
In the Configuration section, enter your OpenAI API key. This key is necessary for the app to interact with the OpenAI API.
Storing New Text:
In the Store new text section, enter a piece of text you want to add to the database. For example, you might enter, “Azure App Spaces simplifies cloud hosting for web applications.”
Click the Store Text button. This action sends the text to the OpenAI API to generate embeddings, which are then stored in the Qdrant vector database.
Asking a Question:
In the Ask a question section, type a query related to the stored text. For instance, you could ask, “What service can simplify cloud hosting for web apps?”
Click the Search button. The app will use the stored embeddings to find the most relevant information in the database and display the results.
This simple interaction demonstrates how the RAG app can be used to build a robust, searchable knowledge base using state-of-the-art retrieval-augmented generation techniques.
App Spaces significantly simplifies the process of deploying and managing web applications in the cloud. The Retrieval-Augmented Generation sample space illustrates how you can integrate a powerful backend with a dynamic frontend and a robust vector database. By following these steps, you can quickly set up and manage a sophisticated cloud-based application. Give App Spaces a try and streamline your development workflow.
Microsoft Tech Community – Latest Blogs –Read More
Convert cycles per degree to sigma in imgaussfilt
Hello,
I am trying to filter my images to a certain cycles per degree (cpd). I have obtained the visual angle of the image, and I would like to low-pass filter my images to under 1 cpd using a Gaussian filter. However, I couldn’t figure out what sigma I should use in the imgaussfilt function. Is there a direct formula for the conversion?
I was looking at a similar question here, where we first calculate the visual angle, but it does not mention how it relates to the second formula to obtain sigma. Additionally, there is a constant k in the formula, but I am not sure how to determine what is an appropriate k to use. I would appreciate any help. Thank you!Hello,
I am trying to filter my images to a certain cycles per degree (cpd). I have obtained the visual angle of the image, and I would like to low-pass filter my images to under 1 cpd using a Gaussian filter. However, I couldn’t figure out what sigma I should use in the imgaussfilt function. Is there a direct formula for the conversion?
I was looking at a similar question here, where we first calculate the visual angle, but it does not mention how it relates to the second formula to obtain sigma. Additionally, there is a constant k in the formula, but I am not sure how to determine what is an appropriate k to use. I would appreciate any help. Thank you! Hello,
I am trying to filter my images to a certain cycles per degree (cpd). I have obtained the visual angle of the image, and I would like to low-pass filter my images to under 1 cpd using a Gaussian filter. However, I couldn’t figure out what sigma I should use in the imgaussfilt function. Is there a direct formula for the conversion?
I was looking at a similar question here, where we first calculate the visual angle, but it does not mention how it relates to the second formula to obtain sigma. Additionally, there is a constant k in the formula, but I am not sure how to determine what is an appropriate k to use. I would appreciate any help. Thank you! spatial frequency, image processing, imgaussfilt, gaussian MATLAB Answers — New Questions
Assistance Required for Sending Data to ThingSpeak Using SIM7600G-H
Hello,
I am experiencing issues while trying to send data to ThingSpeak using a SIM7600G-H module connected to my Arduino. Despite following the standard procedure, I consistently receive a 400 Bad Request error from the server.
Here is the sequence of AT commands I am using:
AT+CGDCONT=1,"IP","vzwinternet" OK AT+CGATT=1 OK AT+CGACT=1,1 OK
AT+NETOPEN OK +NETOPEN: 0 AT+CIPOPEN=0,"TCP","api.thingspeak.com",80 OK +CIPOPEN: 0,0
POST /update HTTP/1.1rn Host: api.thingspeak.comrn Connection: closern Content-Type: application/x-www-form-urlencodedrn Content-Length: 43rnrn api_key=jejeje&field1=80:30:habierta:apagadorn
<html> <head><title>400 Bad Request</title></head> <body> <center><h1>400 Bad Request</h1></center> </body> </html>
I have verified that the Content-Length is correct and that all the required headers are included.
Could anyone provide insights or suggestions on what might be causing this issue? Any help would be greatly appreciated.
Thank you!Hello,
I am experiencing issues while trying to send data to ThingSpeak using a SIM7600G-H module connected to my Arduino. Despite following the standard procedure, I consistently receive a 400 Bad Request error from the server.
Here is the sequence of AT commands I am using:
AT+CGDCONT=1,"IP","vzwinternet" OK AT+CGATT=1 OK AT+CGACT=1,1 OK
AT+NETOPEN OK +NETOPEN: 0 AT+CIPOPEN=0,"TCP","api.thingspeak.com",80 OK +CIPOPEN: 0,0
POST /update HTTP/1.1rn Host: api.thingspeak.comrn Connection: closern Content-Type: application/x-www-form-urlencodedrn Content-Length: 43rnrn api_key=jejeje&field1=80:30:habierta:apagadorn
<html> <head><title>400 Bad Request</title></head> <body> <center><h1>400 Bad Request</h1></center> </body> </html>
I have verified that the Content-Length is correct and that all the required headers are included.
Could anyone provide insights or suggestions on what might be causing this issue? Any help would be greatly appreciated.
Thank you! Hello,
I am experiencing issues while trying to send data to ThingSpeak using a SIM7600G-H module connected to my Arduino. Despite following the standard procedure, I consistently receive a 400 Bad Request error from the server.
Here is the sequence of AT commands I am using:
AT+CGDCONT=1,"IP","vzwinternet" OK AT+CGATT=1 OK AT+CGACT=1,1 OK
AT+NETOPEN OK +NETOPEN: 0 AT+CIPOPEN=0,"TCP","api.thingspeak.com",80 OK +CIPOPEN: 0,0
POST /update HTTP/1.1rn Host: api.thingspeak.comrn Connection: closern Content-Type: application/x-www-form-urlencodedrn Content-Length: 43rnrn api_key=jejeje&field1=80:30:habierta:apagadorn
<html> <head><title>400 Bad Request</title></head> <body> <center><h1>400 Bad Request</h1></center> </body> </html>
I have verified that the Content-Length is correct and that all the required headers are included.
Could anyone provide insights or suggestions on what might be causing this issue? Any help would be greatly appreciated.
Thank you! thingspeak MATLAB Answers — New Questions
Help in the control of an active three-phase pfc rectifier (active front end)
Hi, I have a problem with the control of a three-phase pfc rectifier controlled by MOSFETs (half bridge for each abc branch). I have implemented the physical part, which is the part I show in the first image (I also upload the model in case you want to see the values I have used). When I simulate with the SVPWM control it is not able to control the current and it quickly gets very high values in the three-phase part. The three-phase voltage is obviously OK, but the DC bus voltage is wrong. At the end I attach a couple of pictures with the results.
The problem is that the control does not work properly. Control in the outer loop is DC voltage (800 V is the reference). As you can see iin the result, voltage go to zero and do not follow the reference.
I don’t understand what is wrong in the model because I think the controllers are well implemented. Can someone please help me?
Plant of the model:
I also attach an image of how the control is implemented:
Results:
Thanks.Hi, I have a problem with the control of a three-phase pfc rectifier controlled by MOSFETs (half bridge for each abc branch). I have implemented the physical part, which is the part I show in the first image (I also upload the model in case you want to see the values I have used). When I simulate with the SVPWM control it is not able to control the current and it quickly gets very high values in the three-phase part. The three-phase voltage is obviously OK, but the DC bus voltage is wrong. At the end I attach a couple of pictures with the results.
The problem is that the control does not work properly. Control in the outer loop is DC voltage (800 V is the reference). As you can see iin the result, voltage go to zero and do not follow the reference.
I don’t understand what is wrong in the model because I think the controllers are well implemented. Can someone please help me?
Plant of the model:
I also attach an image of how the control is implemented:
Results:
Thanks. Hi, I have a problem with the control of a three-phase pfc rectifier controlled by MOSFETs (half bridge for each abc branch). I have implemented the physical part, which is the part I show in the first image (I also upload the model in case you want to see the values I have used). When I simulate with the SVPWM control it is not able to control the current and it quickly gets very high values in the three-phase part. The three-phase voltage is obviously OK, but the DC bus voltage is wrong. At the end I attach a couple of pictures with the results.
The problem is that the control does not work properly. Control in the outer loop is DC voltage (800 V is the reference). As you can see iin the result, voltage go to zero and do not follow the reference.
I don’t understand what is wrong in the model because I think the controllers are well implemented. Can someone please help me?
Plant of the model:
I also attach an image of how the control is implemented:
Results:
Thanks. pfc, active control rectifier, three phase rectifier, active front end, six switches rectifier MATLAB Answers — New Questions
OnPremise – Sharepoint 2019 – Workflow
I have an on premise version of Sharepoint 2019 with a 2013 workflow that has worked properly for years without an issue.
Now we are having an issue with the Workflow on single item and the item was started back on March 14th and has now been suspended with the following error:
RequestorId: XXXXX-XXXX-XXXX-0000-000000000000. Details: Microsoft.Activities.Dispatcher.WorkflowSessionConfigurationFailedException —> System.ArgumentException: The value supplied was not valid runtime state. Parameter name: deserializedRuntimeState at System.Activities.Hosting.WorkflowInstance.Initialize(Object deserializedRuntimeState, DynamicUpdateMap updateMap) at Microsoft.Activities.Hosting.WorkflowSession.ConfigureEnvironment(Activity workflowDefinition, IWorkflowConfiguration workflowConfiguration, IEnumerable`1 hostExtensions) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.ConfigureWorkflowSessionEnvironment(MessageSessionContext messageSession, WorkflowSession workflowSession, Activity rootActivity, IWorkflowConfiguration workflowConfiguration) — End of inner exception stack trace — at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.ConfigureWorkflowSessionEnvironment(MessageSessionContext messageSession, WorkflowSession workflowSession, Activity rootActivity, IWorkflowConfiguration workflowConfiguration) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.ConfigureSession(WorkflowSessionResumptionContext context) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.GotResumptionContextForProcessWaiter(IAsyncResult result) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.Isolate(AsyncCompletion callback, IAsyncResult result)
Resuming and ending the workflow doesn’t do anything, and trying to terminate it through powershell also doesn’t do anything and it continues to sit there being suspended and will not allow new workflows to start for this item. Is there another way we can terminate the workflow, or fix the item to get the workflow to either complete or terminate it by itself?
I have an on premise version of Sharepoint 2019 with a 2013 workflow that has worked properly for years without an issue. Now we are having an issue with the Workflow on single item and the item was started back on March 14th and has now been suspended with the following error: RequestorId: XXXXX-XXXX-XXXX-0000-000000000000. Details: Microsoft.Activities.Dispatcher.WorkflowSessionConfigurationFailedException —> System.ArgumentException: The value supplied was not valid runtime state. Parameter name: deserializedRuntimeState at System.Activities.Hosting.WorkflowInstance.Initialize(Object deserializedRuntimeState, DynamicUpdateMap updateMap) at Microsoft.Activities.Hosting.WorkflowSession.ConfigureEnvironment(Activity workflowDefinition, IWorkflowConfiguration workflowConfiguration, IEnumerable`1 hostExtensions) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.ConfigureWorkflowSessionEnvironment(MessageSessionContext messageSession, WorkflowSession workflowSession, Activity rootActivity, IWorkflowConfiguration workflowConfiguration) — End of inner exception stack trace — at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.ConfigureWorkflowSessionEnvironment(MessageSessionContext messageSession, WorkflowSession workflowSession, Activity rootActivity, IWorkflowConfiguration workflowConfiguration) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.ConfigureSession(WorkflowSessionResumptionContext context) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.GotResumptionContextForProcessWaiter(IAsyncResult result) at Microsoft.Activities.Dispatcher.DispatchLoopInstanceAsyncResult.Isolate(AsyncCompletion callback, IAsyncResult result) Resuming and ending the workflow doesn’t do anything, and trying to terminate it through powershell also doesn’t do anything and it continues to sit there being suspended and will not allow new workflows to start for this item. Is there another way we can terminate the workflow, or fix the item to get the workflow to either complete or terminate it by itself? Read More
Need to strict Teams on mobile devices
Hello all,
I am trying to put together a conditional access policy to only allow mobile Teams app access for certain users and restrict the rest of the users to the office location only.
Am looking at a block policy to block all network locations and only allow connection for users from the Office desktop.
However, when I go in to the included apps section of the policy, Teams is not listed. Only “Teams Service” and “Teams Shift” is listed.
If I were to block Teams Service/Shift in the selected apps, does that block Teams app itself?
If so, would that cause any functionality issues with other apps like Outlook?
TIA
Hello all,I am trying to put together a conditional access policy to only allow mobile Teams app access for certain users and restrict the rest of the users to the office location only. Am looking at a block policy to block all network locations and only allow connection for users from the Office desktop.However, when I go in to the included apps section of the policy, Teams is not listed. Only “Teams Service” and “Teams Shift” is listed. If I were to block Teams Service/Shift in the selected apps, does that block Teams app itself?If so, would that cause any functionality issues with other apps like Outlook? TIA Read More
Edge Workspaces sync BUG
Hello
First of all, I think that Workspaces in Edge is a very useful feature! Edge also has vertical tabs, which makes it the best tool for researchers using hundreds of tabs. I think other browsers can learn from this. With Workspaces, I can move windows I don’t currently use aside and open them again when needed without loading to RAM. Other browsers lack this feature, so I moved to Edge from Chrome. Edge is now my main tool for ongoing online research.
However, after some months of use, I see that there are bugs that make me frustrated. With Workspaces, Edge is slow, it freezes, fails to synchronize, and reverts changes.
It does not update tabs and moves new tabs to the end.
Let’s say that I have opened tabs: New Tab, facebook.com, A, B, C, D, E
Later, I open links in new tabs from New Tab, Facebook, and A and leave them open. The tabs are: New Tab, msn.com/F, facebook.com, G, A, A2, B, C, D, E
After some time, Workspaces synchronize, there is a short or longer Edge freeze. Then I see tabs are reorganized and F, G, H moved and changed addresses. The tabs are now: New Tab, facebook.com, A, B, C, D, E, New Tab, l.facebook.com/l.php?u=G, A2
It looks like Workspaces never update opened tabs when there was redirection through New Tab or l.facebook.com/l.php?u= or any other redirection on other websites. It only stores the first address it sees. When I refresh these tabs to see the description and go to the proper addresses, it still reverts it back! After I organize the order properly, it sometimes stays or is reverted back! This is frustrating when you need order and proper descriptions!
It is terribly slow, especially after opening another Workspace.
I also encountered long freezes of Edge when opening another Workspace window or at random, probably when it synchronizes (a red dot appears next to the workspace name). Sometimes I have to wait 5 minutes, sometimes 15 minutes, sometimes I’m losing patience! I have plenty of PC power (12-core Ryzen 3900X, 32GB RAM, Samsung SSD 970 EVO Plus 1TB) and when I check Process Hacker, I see that Edge isn’t using 100% of CPU, but still is frozen. I noticed that when it’s frozen, there are around 200 disk writes, fast changing, 9MB/s total:
C:UsersmeAppDataLocalMicrosoftEdgeUser DataDefaultSync DataLevelDB256443.ldb … ( edge_workspace_disk.xls )
When LevelDB writes stop, Edge is unfrozen.
I’ve given msedge.exe processes high priority, but it doesn’t solve anything.
I noticed this on previous versions starting from 122. I use Stable and Beta (to have two separate profiles) on PC and laptop. I waited hoping it will be solved, but nothing changed. It’s possible that developers only tested Workspaces with a limited number of tabs and not with power users like myself, who manage 10 workspaces with 200-600 tabs in each. The consistent unreliability suggests there may be unresolved bugs present in each version.
I examined the LOG.old file in the Sync Data>LevelDB folders of each browser and noticed that when a freeze occurs, there is a specific behavior logged:
2024/06/12-13:14:19.485 1a570 Generated table #365187@0: 40283 keys, 2109396 bytes
2024/06/12-13:14:19.485 1a570 Compacted 8@0 + 1@1 files => 2109396 bytes
2024/06/12-13:14:19.488 1a570 compacted to: files[ 4 6 7 0 0 0 0 ]
2024/06/12-13:14:19.489 1a570 Delete type=2 #365171
2024/06/12-13:14:19.489 1a570 Delete type=2 #365172
2024/06/12-13:14:19.489 1a570 Delete type=2 #365174
2024/06/12-13:14:19.489 1a570 Delete type=2 #365176
2024/06/12-13:14:19.489 1a570 Delete type=2 #365178
2024/06/12-13:14:19.489 1a570 Delete type=2 #365180
2024/06/12-13:14:19.489 1a570 Delete type=2 #365182
2024/06/12-13:14:19.489 1a570 Delete type=2 #365184
2024/06/12-13:14:19.489 1a570 Delete type=2 #365186
2024/06/12-13:14:19.491 179a0 Level-0 table #365197: started
2024/06/12-13:14:19.492 1a0a0 Current memtable full; waiting…
2024/06/12-13:14:19.500 179a0 Level-0 table #365197: 467718 bytes OK
2024/06/12-13:14:19.503 179a0 Delete type=0 #365194
2024/06/12-13:14:19.504 1a570 Level-0 table #365199: started
2024/06/12-13:14:19.505 1a0a0 Current memtable full; waiting…
2024/06/12-13:14:19.511 1a570 Level-0 table #365199: 467718 bytes OK
2024/06/12-13:14:19.514 1a570 Delete type=0 #365196
2024/06/12-13:14:19.515 179a0 Level-0 table #365201: started
2024/06/12-13:14:19.516 1a0a0 Current memtable full; waiting…
2024/06/12-13:14:19.524 179a0 Level-0 table #365201: 467718 bytes OK
2024/06/12-13:14:19.530 179a0 Delete type=0 #365198
2024/06/12-13:14:19.530 1a570 Level-0 table #365203: started
2024/06/12-13:14:19.531 1a0a0 Current memtable full; waiting…
2024/06/12-13:14:19.539 1a570 Level-0 table #365203: 467718 bytes OK
2024/06/12-13:14:19.542 1a570 Delete type=0 #365200
2024/06/12-13:14:19.542 179a0 Compacting 8@0 + 1@1 files
2024/06/12-13:14:19.556 179a0 Level-0 table #365206: started
2024/06/12-13:14:19.564 179a0 Level-0 table #365206: 467718 bytes OK
2024/06/12-13:14:19.568 179a0 Delete type=0 #365202
2024/06/12-13:14:19.572 179a0 Level-0 table #365208: started
2024/06/12-13:14:19.581 179a0 Level-0 table #365208: 467718 bytes OK
2024/06/12-13:14:19.584 179a0 Delete type=0 #365205
2024/06/12-13:14:19.588 179a0 Level-0 table #365210: started
2024/06/12-13:14:19.596 179a0 Level-0 table #365210: 467718 bytes OK
2024/06/12-13:14:19.600 179a0 Delete type=0 #365207
2024/06/12-13:14:19.604 179a0 Level-0 table #365212: started
2024/06/12-13:14:19.611 179a0 Level-0 table #365212: 467718 bytes OK
2024/06/12-13:14:19.615 179a0 Delete type=0 #365209
2024/06/12-13:14:19.620 1a0a0 Too many L0 files; waiting…
HelloFirst of all, I think that Workspaces in Edge is a very useful feature! Edge also has vertical tabs, which makes it the best tool for researchers using hundreds of tabs. I think other browsers can learn from this. With Workspaces, I can move windows I don’t currently use aside and open them again when needed without loading to RAM. Other browsers lack this feature, so I moved to Edge from Chrome. Edge is now my main tool for ongoing online research.However, after some months of use, I see that there are bugs that make me frustrated. With Workspaces, Edge is slow, it freezes, fails to synchronize, and reverts changes. It does not update tabs and moves new tabs to the end.Let’s say that I have opened tabs: New Tab, facebook.com, A, B, C, D, ELater, I open links in new tabs from New Tab, Facebook, and A and leave them open. The tabs are: New Tab, msn.com/F, facebook.com, G, A, A2, B, C, D, EAfter some time, Workspaces synchronize, there is a short or longer Edge freeze. Then I see tabs are reorganized and F, G, H moved and changed addresses. The tabs are now: New Tab, facebook.com, A, B, C, D, E, New Tab, l.facebook.com/l.php?u=G, A2It looks like Workspaces never update opened tabs when there was redirection through New Tab or l.facebook.com/l.php?u= or any other redirection on other websites. It only stores the first address it sees. When I refresh these tabs to see the description and go to the proper addresses, it still reverts it back! After I organize the order properly, it sometimes stays or is reverted back! This is frustrating when you need order and proper descriptions! It is terribly slow, especially after opening another Workspace.I also encountered long freezes of Edge when opening another Workspace window or at random, probably when it synchronizes (a red dot appears next to the workspace name). Sometimes I have to wait 5 minutes, sometimes 15 minutes, sometimes I’m losing patience! I have plenty of PC power (12-core Ryzen 3900X, 32GB RAM, Samsung SSD 970 EVO Plus 1TB) and when I check Process Hacker, I see that Edge isn’t using 100% of CPU, but still is frozen. I noticed that when it’s frozen, there are around 200 disk writes, fast changing, 9MB/s total:C:UsersmeAppDataLocalMicrosoftEdgeUser DataDefaultSync DataLevelDB256443.ldb … ( edge_workspace_disk.xls )When LevelDB writes stop, Edge is unfrozen.I’ve given msedge.exe processes high priority, but it doesn’t solve anything.I noticed this on previous versions starting from 122. I use Stable and Beta (to have two separate profiles) on PC and laptop. I waited hoping it will be solved, but nothing changed. It’s possible that developers only tested Workspaces with a limited number of tabs and not with power users like myself, who manage 10 workspaces with 200-600 tabs in each. The consistent unreliability suggests there may be unresolved bugs present in each version.I examined the LOG.old file in the Sync Data>LevelDB folders of each browser and noticed that when a freeze occurs, there is a specific behavior logged:2024/06/12-13:14:19.485 1a570 Generated table #365187@0: 40283 keys, 2109396 bytes2024/06/12-13:14:19.485 1a570 Compacted 8@0 + 1@1 files => 2109396 bytes2024/06/12-13:14:19.488 1a570 compacted to: files[ 4 6 7 0 0 0 0 ]2024/06/12-13:14:19.489 1a570 Delete type=2 #3651712024/06/12-13:14:19.489 1a570 Delete type=2 #3651722024/06/12-13:14:19.489 1a570 Delete type=2 #3651742024/06/12-13:14:19.489 1a570 Delete type=2 #3651762024/06/12-13:14:19.489 1a570 Delete type=2 #3651782024/06/12-13:14:19.489 1a570 Delete type=2 #3651802024/06/12-13:14:19.489 1a570 Delete type=2 #3651822024/06/12-13:14:19.489 1a570 Delete type=2 #3651842024/06/12-13:14:19.489 1a570 Delete type=2 #3651862024/06/12-13:14:19.491 179a0 Level-0 table #365197: started2024/06/12-13:14:19.492 1a0a0 Current memtable full; waiting…2024/06/12-13:14:19.500 179a0 Level-0 table #365197: 467718 bytes OK2024/06/12-13:14:19.503 179a0 Delete type=0 #3651942024/06/12-13:14:19.504 1a570 Level-0 table #365199: started2024/06/12-13:14:19.505 1a0a0 Current memtable full; waiting…2024/06/12-13:14:19.511 1a570 Level-0 table #365199: 467718 bytes OK2024/06/12-13:14:19.514 1a570 Delete type=0 #3651962024/06/12-13:14:19.515 179a0 Level-0 table #365201: started2024/06/12-13:14:19.516 1a0a0 Current memtable full; waiting…2024/06/12-13:14:19.524 179a0 Level-0 table #365201: 467718 bytes OK2024/06/12-13:14:19.530 179a0 Delete type=0 #3651982024/06/12-13:14:19.530 1a570 Level-0 table #365203: started2024/06/12-13:14:19.531 1a0a0 Current memtable full; waiting…2024/06/12-13:14:19.539 1a570 Level-0 table #365203: 467718 bytes OK2024/06/12-13:14:19.542 1a570 Delete type=0 #3652002024/06/12-13:14:19.542 179a0 Compacting 8@0 + 1@1 files2024/06/12-13:14:19.556 179a0 Level-0 table #365206: started2024/06/12-13:14:19.564 179a0 Level-0 table #365206: 467718 bytes OK2024/06/12-13:14:19.568 179a0 Delete type=0 #3652022024/06/12-13:14:19.572 179a0 Level-0 table #365208: started2024/06/12-13:14:19.581 179a0 Level-0 table #365208: 467718 bytes OK2024/06/12-13:14:19.584 179a0 Delete type=0 #3652052024/06/12-13:14:19.588 179a0 Level-0 table #365210: started2024/06/12-13:14:19.596 179a0 Level-0 table #365210: 467718 bytes OK2024/06/12-13:14:19.600 179a0 Delete type=0 #3652072024/06/12-13:14:19.604 179a0 Level-0 table #365212: started2024/06/12-13:14:19.611 179a0 Level-0 table #365212: 467718 bytes OK2024/06/12-13:14:19.615 179a0 Delete type=0 #3652092024/06/12-13:14:19.620 1a0a0 Too many L0 files; waiting… Read More
How to remove highlight on previously selected feature in geojson data on Azure Map polygon layer
I’ve been trying to fix the following code so that when a user clicks on a feature in the geojson data, the selected polygon is highlighted. And when user clicks on another polygon, the previously selected polygon/feature is no longer highlighted and the currently selected polygon is highlighted. Can anybody see what I’m doing wrong?
map.events.add(‘ready’, function () {
//Change the cursor of the mouse when it is over the map to be a pointer.
map.getCanvasContainer().style.cursor = ‘pointer’;
//Create a data source and add it to the map.
ds = new atlas.source.DataSource();
//Load jsonData file
fetch(jsonData)
.then(response => response.json())
.then(results => {
if (results.features[1].properties.CNTY == county_name) {
ds.add(results.features);
}
})//end then
.catch(error => console.error(‘Error loading GeoJSON:’, error));
//Add jsonData to sources
map.sources.add(ds);
//Add a layer for rendering a different color polygon when clicked
var polygonLayer = new atlas.layer.PolygonLayer(ds, null, {
fillColor: “rgba(176,48,96, 0.5)” //maroon
})
map.layers.add(polygonLayer, ‘labels’);
var selectedLine = new atlas.layer.LineLayer(ds, null, {
strokeColor: ‘black’,
strokeWidth: 1
});
map.layers.add(selectedLine, ‘labels’);
//Add click events to polygonLayer
map.events.add(‘click’, polygonLayer, function (e) {
selected = e.shapes[0];
//Add a layer for rendering a different color polygon when clicked
var polygonClickedLayer = new atlas.layer.PolygonLayer(ds, null, {
fillColor: ‘rgb(102, 255, 0)’, //green
//Only polygons with a “FUID” property with a value of selectedID will be rendered.
filter: [‘==’, [‘get’, ‘FUID’], selected.properties.FUID]
})
map.layers.add(polygonClickedLayer, ‘labels’);
//Add a layer for rendering a different polygon border color when clicked
var selectedLineLayer = new atlas.layer.LineLayer(ds, null, {
strokeColor: ‘orange’,
strokeWidth: 2,
//Only polygons with a “FUID” property with a value of selectedID will be rendered.
filter: [‘==’, [‘get’, ‘FUID’], selected.properties.FUID]
});
map.layers.add(selectedLineLayer, ‘labels’);
ftrCentroid = calculateFieldCentroid(selected);
map.setCamera({
zoom: 15,
center: ftrCentroid
});
});
});
I’ve been trying to fix the following code so that when a user clicks on a feature in the geojson data, the selected polygon is highlighted. And when user clicks on another polygon, the previously selected polygon/feature is no longer highlighted and the currently selected polygon is highlighted. Can anybody see what I’m doing wrong?map.events.add(‘ready’, function () {
//Change the cursor of the mouse when it is over the map to be a pointer.
map.getCanvasContainer().style.cursor = ‘pointer’;
//Create a data source and add it to the map.
ds = new atlas.source.DataSource();
//Load jsonData file
fetch(jsonData)
.then(response => response.json())
.then(results => {
if (results.features[1].properties.CNTY == county_name) {
ds.add(results.features);
}
})//end then
.catch(error => console.error(‘Error loading GeoJSON:’, error));
//Add jsonData to sources
map.sources.add(ds);
//Add a layer for rendering a different color polygon when clicked
var polygonLayer = new atlas.layer.PolygonLayer(ds, null, {
fillColor: “rgba(176,48,96, 0.5)” //maroon
})
map.layers.add(polygonLayer, ‘labels’);
var selectedLine = new atlas.layer.LineLayer(ds, null, {
strokeColor: ‘black’,
strokeWidth: 1
});
map.layers.add(selectedLine, ‘labels’);
//Add click events to polygonLayer
map.events.add(‘click’, polygonLayer, function (e) {
selected = e.shapes[0];
//Add a layer for rendering a different color polygon when clicked
var polygonClickedLayer = new atlas.layer.PolygonLayer(ds, null, {
fillColor: ‘rgb(102, 255, 0)’, //green
//Only polygons with a “FUID” property with a value of selectedID will be rendered.
filter: [‘==’, [‘get’, ‘FUID’], selected.properties.FUID]
})
map.layers.add(polygonClickedLayer, ‘labels’);
//Add a layer for rendering a different polygon border color when clicked
var selectedLineLayer = new atlas.layer.LineLayer(ds, null, {
strokeColor: ‘orange’,
strokeWidth: 2,
//Only polygons with a “FUID” property with a value of selectedID will be rendered.
filter: [‘==’, [‘get’, ‘FUID’], selected.properties.FUID]
});
map.layers.add(selectedLineLayer, ‘labels’);
ftrCentroid = calculateFieldCentroid(selected);
map.setCamera({
zoom: 15,
center: ftrCentroid
});
});
}); Read More
Azure Advisor with Troubleshooting Guides to improve your Azure Postgres Flexible Server performance
Azure Advisor provides a personalized approach to receiving recommendations for your server by analyzing its configuration and telemetry data. This service aims to enhance various aspects of your server, including reliability, cost efficiency, security, operational excellence, and performance. By leveraging Azure Advisor, you gain access to tailored, proactive, and actionable recommendations designed to help your server operate at its optimal level.
You can now receive new recommendations that include checks for long-running queries, orphaned prepared transactions, databases approaching the 1 billion transaction usage limit (to prevent potential transaction wraparound scenarios), and servers exceeding the 80% bloat ratio. These new recommendations are seamlessly integrated with the troubleshooting guides available on the Azure Portal: Troubleshooting guides – Azure Database for PostgreSQL – Flexible Server | Microsoft Learn.
You can use these troubleshooting guides to help implement the Azure Advisor Performance recommendations for your Azure Database for Postgres Flexible Server. When you receive a recommendation, you will be directed to the appropriate troubleshooting guides. Be sure to follow the prerequisites section to ensure that all necessary data is provided before proceeding with the troubleshooting steps.
Let us walk through an example of a long-running transaction recommendation and see how the integration of troubleshooting guides can assist you in resolving the issue:
1. For the recommendation on Long Running Transactions, Go to Help -> Troubleshooting guides -> High CPU Usage -> Long Running Transactions as shown in the visual. This visual highlights the troubleshooting guides available on the portal, illustrating the various scenarios they can help you identify and resolve any server issues.
2. This will provide you with PIDs for the long running transactions on the server.
3. There is a dropdown to pick a specific PID which shows you the details of the PID as below. You can go through each PID and understand what is causing the issue.
4. We also provide you with recommendations on what steps need to be taken to resolve the issue.
5. You may have to follow additional steps for all the PIDs identified as long running and resolve them based on the recommendation provided.
In conclusion, leveraging Azure Advisor and the integrated troubleshooting guides can significantly enhance the performance, reliability, and efficiency of your Azure Database for Postgres Flexible Server. By proactively addressing recommendations such as long-running queries, orphaned prepared transactions, transaction limits, and bloat ratios, you can ensure your server operates at its best.
We encourage you to explore the Azure Portal and utilize these tools to stay ahead of potential issues. Start implementing the Azure Advisor performance recommendations today and make use of the detailed troubleshooting guides to maintain a robust and high-performing database environment.
Acknowledgement: This post was co-authored by Guy Bowerman and Gayathri Paderla.
Microsoft Tech Community – Latest Blogs –Read More
How to clear the workspace from within a program?
I have a program that must have the workspace clear when it runs or it returns invalid results. I don’t want the user to need to remember to type CLEAR ALL before running. How can I get the same effect from within a program (at the start)?I have a program that must have the workspace clear when it runs or it returns invalid results. I don’t want the user to need to remember to type CLEAR ALL before running. How can I get the same effect from within a program (at the start)? I have a program that must have the workspace clear when it runs or it returns invalid results. I don’t want the user to need to remember to type CLEAR ALL before running. How can I get the same effect from within a program (at the start)? clear all, inprogram clear, workspace clear MATLAB Answers — New Questions
How to Reduce Oscillations (not noise) in a Signal?
How can oscillations be reduced in signals similar to the one shown in Figure 1 to achieve results like those in Figure 2? Please note that it is not a denoising or smoothing problem.How can oscillations be reduced in signals similar to the one shown in Figure 1 to achieve results like those in Figure 2? Please note that it is not a denoising or smoothing problem. How can oscillations be reduced in signals similar to the one shown in Figure 1 to achieve results like those in Figure 2? Please note that it is not a denoising or smoothing problem. signal processing, oscillation MATLAB Answers — New Questions
Simulink model taking longer to open starting in MATLAB R2018b
Starting in R2018b, my Simulink model is taking a significantly longer time to open. Why?
My model uses custom code that I specified in the Configuration Parameters > Simulation Target > Custom Code > Source Files and Libraries panes.Starting in R2018b, my Simulink model is taking a significantly longer time to open. Why?
My model uses custom code that I specified in the Configuration Parameters > Simulation Target > Custom Code > Source Files and Libraries panes. Starting in R2018b, my Simulink model is taking a significantly longer time to open. Why?
My model uses custom code that I specified in the Configuration Parameters > Simulation Target > Custom Code > Source Files and Libraries panes. custom, open, open_system, getfrontendoptions, simparsecustomcode MATLAB Answers — New Questions
Does Matlab automatically vectorize for loops?
I currently have Python code that takes 1.5 hours to calculate 450+ million Levenshtein distances between 30,011 text labels of no more than 20 characters each. Currently migrating it to Matlab to see the JiT compilation allows optimizations of flow control. The Python implementation uses Anaconda’s CPython, so no JiT, and there is a distinct possibility that Matlab could be much faster.
Years ago, I recall reading that Matlab automatically vectorizes for loops. I cannot find any such mentions now. Is this just assumed to be part of the JiT compilation?
There will be 2 levels of for-loops, one nested within the other, to iterate over matrix rows and columns. Each iteration will call editDistance, so I don’t know if that will prevent vectorization, even if automated vectorization was available.I currently have Python code that takes 1.5 hours to calculate 450+ million Levenshtein distances between 30,011 text labels of no more than 20 characters each. Currently migrating it to Matlab to see the JiT compilation allows optimizations of flow control. The Python implementation uses Anaconda’s CPython, so no JiT, and there is a distinct possibility that Matlab could be much faster.
Years ago, I recall reading that Matlab automatically vectorizes for loops. I cannot find any such mentions now. Is this just assumed to be part of the JiT compilation?
There will be 2 levels of for-loops, one nested within the other, to iterate over matrix rows and columns. Each iteration will call editDistance, so I don’t know if that will prevent vectorization, even if automated vectorization was available. I currently have Python code that takes 1.5 hours to calculate 450+ million Levenshtein distances between 30,011 text labels of no more than 20 characters each. Currently migrating it to Matlab to see the JiT compilation allows optimizations of flow control. The Python implementation uses Anaconda’s CPython, so no JiT, and there is a distinct possibility that Matlab could be much faster.
Years ago, I recall reading that Matlab automatically vectorizes for loops. I cannot find any such mentions now. Is this just assumed to be part of the JiT compilation?
There will be 2 levels of for-loops, one nested within the other, to iterate over matrix rows and columns. Each iteration will call editDistance, so I don’t know if that will prevent vectorization, even if automated vectorization was available. vectorization, jit MATLAB Answers — New Questions