Month: April 2026
Comparing one 3D point cloud with a selection of collected 3D point clouds?
Hello,
I am relatively new to MATLAB and coding. I am working on a project in which I hope to compare the point cloud of an individual CT scan to a collection of CT scans of the same structure. I would like to be able to receive a "closest-match" output. Basically: You put your scan in, its compared to the existing scans and you are provided with statistical and visual data on which existing scans match the closest.
I am currently in the planning phase for this project and am trying to identify which steps to take and which tools to consider, as well as to see if there i already existing code that can help me. I would really appreciate some ideas, related content or tips, as well as some questions I should ask myself and consider on how to achieve the first steps of this project, which would be to get a comparison going.
I appreciate all the help and pointing in the right direction I can get.
Thanks,
AnileHello,
I am relatively new to MATLAB and coding. I am working on a project in which I hope to compare the point cloud of an individual CT scan to a collection of CT scans of the same structure. I would like to be able to receive a "closest-match" output. Basically: You put your scan in, its compared to the existing scans and you are provided with statistical and visual data on which existing scans match the closest.
I am currently in the planning phase for this project and am trying to identify which steps to take and which tools to consider, as well as to see if there i already existing code that can help me. I would really appreciate some ideas, related content or tips, as well as some questions I should ask myself and consider on how to achieve the first steps of this project, which would be to get a comparison going.
I appreciate all the help and pointing in the right direction I can get.
Thanks,
Anile Hello,
I am relatively new to MATLAB and coding. I am working on a project in which I hope to compare the point cloud of an individual CT scan to a collection of CT scans of the same structure. I would like to be able to receive a "closest-match" output. Basically: You put your scan in, its compared to the existing scans and you are provided with statistical and visual data on which existing scans match the closest.
I am currently in the planning phase for this project and am trying to identify which steps to take and which tools to consider, as well as to see if there i already existing code that can help me. I would really appreciate some ideas, related content or tips, as well as some questions I should ask myself and consider on how to achieve the first steps of this project, which would be to get a comparison going.
I appreciate all the help and pointing in the right direction I can get.
Thanks,
Anile point cloud, image comparison, point set matching MATLAB Answers — New Questions
Creating a Planner Weekly Notification Email for Incomplete Tasks
Incomplete Task Analysis Report is Good, but an Email Detailing Incomplete Tasks Might Be Better
A reader noted the script I wrote in 2023 to analyze incomplete tasks in Planner plans and asked had I a version that emailed incomplete task lists to individual team members. My response was that I hadn’t, but it would be easy to amend the code to split up the results for individual users and email a listing of incomplete tasks to each user. After all, it’s just PowerShell.
Roll forward a couple of weeks and my correspondent had made no progress. Looking at the script, I could see why the code is a little off-putting to someone who isn’t used to working with Graph APIs through PowerShell (the Automating Microsoft 365 with PowerShell eBook helps here). Handling topics like pagination and retrieving access tokens (not to mention token renewal) is enough to furrow anyone’s brow.
Creating a Planner Notification Email
As it happens, I sort of needed the same thing myself. The Office 365 for IT Pros author team uses message center notifications to keep to date with changes in workloads. It’s not the only source of information that we use, but it’s convenient because the Microsoft 365 admin center offers the option to synchronize the notifications with a Planner plan (something that can also be done with PowerShell).
Although our authors are all very knowledgeable people, they’re not very disciplined at closing off tasks after reviewing new notifications to decide if the change affects the content of their chapters. My idea was therefore to write a script that:
- A security group holds members who will be checked for incomplete tasks. I call the group “Weekly Task Updates.” Any other valid group could be used.
- For each member, find the Microsoft 365 groups that they belong to.
- Check the Microsoft 365 groups for plans and find any incomplete tasks assigned and note their details.
- Send email as a reminder about the incomplete tasks to ask the recipient to close any tasks out that are no longer valid. The email contains details of the incomplete tasks, including a hyperlink to each task so that the user can quickly check out the task in the Planner browser app.
- Schedule the script as an Azure Automation runbook to run at 7AM every Saturday (to prompt authors to do some work over the weekend…). Figure 1 is an example of the email.

Planner and the Microsoft Graph PowerShell SDK
To make the code easier to understand, the script uses cmdlets from the Planner module in the Microsoft Graph PowerShell SDK. The script therefore features cmdlets like:
- Get-MgGroupPlannerPlan: Fetch the plans for the Microsoft 365 group.
- Get-MgPlannerPlanTask: Fetch the tasks for a plan.
- Get-MgPlannerPlanBucket: Fetch the buckets for a plan.
Graph Woes for Planner
The Graph implementation for Planner is basic and affects both Graph requests and SDK cmdlets. For example, filtering is unsupported on the percentComplete or completedDateTime properties, so a client-side filter is required to find open tasks after fetching all the tasks in the plan. There’s no support for search or sorting either. The plan that logs message center notifications currently spans 8120 tasks, so the lack of support for optimized queries is a pain when trying to extract incomplete tasks. Here’s how the script finds incomplete tasks:
[array]$Tasks = Get-MgPlannerPlanTask -PlannerPlanId $Plan.Id -All -PageSize 500 -Property Id, Title, CompletedDateTime, StartDateTime, DueDateTime, BucketId, Assignments -ErrorAction Stop
$IncompleteTasks = $Tasks | Where-Object { $null -eq $_.CompletedDateTime }
There’s also no Graph API to find the set of plans in which a user has assigned tasks. Everything flows through Microsoft 365 groups. I didn’t just want to report the open tasks found in the plan synchronized with the Microsoft 365 admin center because it seemed more useful to report open tasks found in any plan. Certainly, this is better for me because I think it’s useful to send people a single message containing a consolidated list of all their incomplete tasks instead of a separate message per plan.
Azure Automation Setup
After testing to make sure that the code ran interactively, I moved it over to Azure Automation to create a runbook. As described in this article, two issues need to be dealt with for scripts that use the Microsoft Graph PowerShell SDK: Graph permissions assigned to the automation account and SDK sub-modules loaded into the runtime environment. Details of the requirements are in the script.
Hopefully, the script is useful. If not, feel free to suggest amendments through the Office 365 for IT Pros GitHub repository.
Support the work of the Office 365 for IT Pros team by subscribing to the Office 365 for IT Pros eBook. Your support pays for the time we need to track, analyze, and document the changing world of Microsoft 365 and Office 365. Only humans contribute to our work!
Disable reset of Jacobian
I’m trying to switch from the old “black” Simcape Specialized Power System library to the new “blue” Simcape library. I’m using the phasor solution and the fast calculation method, but the problem lies with the phasor solver itself. The solver resets the Jacobian matrix much more frequently than the Specilaized Power library solver. Any tips on how to reduce the frequency of these resets?
See attached report from Simulink Profiler:I’m trying to switch from the old “black” Simcape Specialized Power System library to the new “blue” Simcape library. I’m using the phasor solution and the fast calculation method, but the problem lies with the phasor solver itself. The solver resets the Jacobian matrix much more frequently than the Specilaized Power library solver. Any tips on how to reduce the frequency of these resets?
See attached report from Simulink Profiler: I’m trying to switch from the old “black” Simcape Specialized Power System library to the new “blue” Simcape library. I’m using the phasor solution and the fast calculation method, but the problem lies with the phasor solver itself. The solver resets the Jacobian matrix much more frequently than the Specilaized Power library solver. Any tips on how to reduce the frequency of these resets?
See attached report from Simulink Profiler: reset, jacobian MATLAB Answers — New Questions
UAV code simulation not showing the output properly
I am working on project on UAV. MATLAB code is working fine, but generated output does not show any UAVs. I can share some code here if someone is interested.I am working on project on UAV. MATLAB code is working fine, but generated output does not show any UAVs. I can share some code here if someone is interested. I am working on project on UAV. MATLAB code is working fine, but generated output does not show any UAVs. I can share some code here if someone is interested. aerial vehicle MATLAB Answers — New Questions
Integrating MMC in IEEE 9 bus system
Hello to fellow MATLAB users. I am studying electrical engineering and not so familiar with MATLAB and Simulink. Therefore I need your help.
I want to integrate a MMC system into IEEE 9 bus system to study how fault current behaves when an AC transmission line is replaced with a HVDC link. More specifically I want to integrate simscapeelectrical/ModularMultilevelConverterHVDCTransExample between bus 4 and bus 6 in simscapeelectrical/IEEE9BusSystemExample. However, I am at a dead end right now, no matter what I try I can’t get it right. I’d appreciate if you could guide me on how to tackle this problem.Hello to fellow MATLAB users. I am studying electrical engineering and not so familiar with MATLAB and Simulink. Therefore I need your help.
I want to integrate a MMC system into IEEE 9 bus system to study how fault current behaves when an AC transmission line is replaced with a HVDC link. More specifically I want to integrate simscapeelectrical/ModularMultilevelConverterHVDCTransExample between bus 4 and bus 6 in simscapeelectrical/IEEE9BusSystemExample. However, I am at a dead end right now, no matter what I try I can’t get it right. I’d appreciate if you could guide me on how to tackle this problem. Hello to fellow MATLAB users. I am studying electrical engineering and not so familiar with MATLAB and Simulink. Therefore I need your help.
I want to integrate a MMC system into IEEE 9 bus system to study how fault current behaves when an AC transmission line is replaced with a HVDC link. More specifically I want to integrate simscapeelectrical/ModularMultilevelConverterHVDCTransExample between bus 4 and bus 6 in simscapeelectrical/IEEE9BusSystemExample. However, I am at a dead end right now, no matter what I try I can’t get it right. I’d appreciate if you could guide me on how to tackle this problem. mmc, hvdc, ieee 9 bus, ac transmission MATLAB Answers — New Questions
Please help me to run this simple relation
I want to draw relation between T ( y-axis) and x ( x-axis) with change parameter B1.
Constant:
B2=0.01;B4=0.1;
vector
Parameter
B1=0.1:0.1:0.5I want to draw relation between T ( y-axis) and x ( x-axis) with change parameter B1.
Constant:
B2=0.01;B4=0.1;
vector
Parameter
B1=0.1:0.1:0.5 I want to draw relation between T ( y-axis) and x ( x-axis) with change parameter B1.
Constant:
B2=0.01;B4=0.1;
vector
Parameter
B1=0.1:0.1:0.5 plot MATLAB Answers — New Questions
Running Copilot Retrieval Searches with the Microsoft Graph PowerShell SDK
Copilot Retrieval API Gives Apps Ability to Ground Queries
If your tenant has Microsoft 365 Copilot license or is willing to use a Pay-as-you-go consumption model to fund Copilot services, you might like to play with the Microsoft Graph Copilot retrieval API. The API is designed to return text extracts from content stored SharePoint Online, OneDrive for Business, and Copilot connectors that apps can use to “ground” user prompts before calling a generative AI engine to process the prompts. A Copilot Search API is also available. The difference between the search and retrieval APIs is that the search API runs a semantic search whereas the retrieval API uses a Retrieval Augmented Generation (RAG) search. The results achieved using the two APIs can be quite different.
Grounding against Microsoft 365 content is a major competitive advantage enjoyed by Microsoft 365 Copilot over third-party generative AI solutions. Solutions like ChatGPT enterprise can upload individual documents for processing, but they cannot look for information within Microsoft 365 to help the AI understand the full context of a user request.
Understanding how APIs work gives an insight into how technology functions. Understanding how apps can call Copilot to retrieve information gives insight into how the Copilot integrations with apps like Word, Excel, and PowerPoint work, because the integrated apps all retrieve information through the Graph to ground their queries.
Access Limited to the Signed-In User
Use of the Copilot Retrieval API is free for users with Copilot for Microsoft 365 licenses. In fact, just like Microsoft 365 Copilot, the API only functions within the context of a signed-in user. In Graph terms, this means that the API uses delegated permissions like Files.Read.All and Sites.Read.All (and for connectors, ExternalItem.Read.All) to search for information that’s available to the signed-in user.
Using the Copilot Retrieval API with the Microsoft Graph PowerShell SDK
For the remainder of this article, I use V2.35.1 of the Microsoft Graph PowerShell SDK to communicate with the Copilot Retrieval API in an interactive session. First, sign in with the required permissions:
Connect-MgGraph -NoWelcome -Scopes Files.Read.All, Sites.Read.All
Both permissions are required to let the API read the SharePoint Online and OneDrive sites that the signed-in user can access, and to read the files stored in those locations.
The next step is to populate a variable with the Graph endpoint for the Copilot Retrieval API:
$Uri = 'https://graph.microsoft.com/v1.0/copilot/retrieval'
Now build a hash table containing the request body for a search request. The API supports searches against a limited set of data sources (SharePoint Online, OneDrive for Business, and Copilot connectors or the “ExternalItem” data source). Although Copilot can ground prompts against messages found in Exchange Online and Teams, neither repository is currently an option for the Copilot Retrieval API:
$BodyRequest = @{}
$BodyRequest.Add("datasource", "sharepoint")
$BodyRequest.Add("queryString", "How to write PowerShell for Microsoft 365")
$bodyRequest.Add("maximumNumberOfResults", "3")
The request body contains a filter to improve the accuracy of the search hits returned by the request. The search is against SharePoint, so the filter expression is in KeyQL syntax for SharePoint searches, just like the filters used with Microsoft Search and eDiscovery. This example restricts Copilot to retrieving Word documents between two dates. Remember that Copilot can retrieve all kinds of Office documents and PDFs as well as objects like SharePoint pages, so restricting output based on file type might not be a good idea.
$BodyRequest.add("filterexpression",’FileExtension:"DOCX" AND LastModifiedTime>=2025-11-01 AND LastModifiedTime<=2026-01-31')Optionally, populate an array containing the names of the metadata properties to retrieve for each search hit and add the array to the request body:
$Metadata = "title", "author", "size", "Created", "LastModifiedTime"
$BodyRequest.add("resourceMetadata", $metadata)
When the request body is complete, issue a POST request to run the retrieval request:
[array]$Data = Invoke-MgGraphRequest -Uri $Uri -Method Post -Body $BodyRequest -OutputType PsObject
Interpreting Copilot Retrieval Hits
After issuing a successful request, the $Data output array should hold an array of RetrievalHits that can be navigated like any other array. This example code outputs the filename, author, created date, relevance score (how relevant the hit is to the query), and the sensitivity label assigned to the file, if one exists. In addition to the metadata, Copilot also retrieves a text extract for files that’s a couple of thousand characters long. The idea is that apps use the information contained in the files found by the API to add context to the query the app sends to the generative AI engine for processing.
The information found by the Copilot Retrieval API can be output with a command like this:
$Hits = $Data.RetrievalHits
ForEach ($Hit in $Hits) {
Write-Host “File:” $Hit.ResourceMetaData.Title
Write-Host “Author:” $Hit.ResourceMetaData.Author
Write-Host “Created:” $Hit.ResourceMetadata.Created
Write-Host “Relevance:” $Hit.extracts.relevanceScore
Write-Host “Label:” $Hit.SensitivityLabel.DisplayName
Write-Host “Extract:” $Hit.extracts.text.substring(0,120)
Write-Host “-------------------------------------------"
}
The output for a hit created by the code above looks something like this:
File: Using Graph API requests or the Graph PowerShell SDK Author: Tony Redmond Created: 30/05/2024 14:57:31 Relevance: 0.7899147536874066 0.8195143018070271 0.8282432736321905 Label: Email LabelsPublic Extract: ## Choosing Between Graph API Requests or Graph SDK Cmdlets ### Which to Choose for PowerShell Development? I’ ## Choosing Between Graph API Requests or Graph SDK Cmdlets ### A Word About Returned Values When you run a Gr ## Choosing Between Graph API Requests or Graph SDK Cmdlets ### Mix and Match The important thing to remember -------------------------------------------
You can download a script that generates slightly nicer output (Figure 1) from the Office 365 for IT Pros GitHub repository.

I spent an interesting few hours playing with the Copilot Retrieval API. I’m not quite sure how I’ll use the knowledge acquired in that time, but you never know when something learned a while ago suddenly becomes important.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive insights updated monthly into what happens within Microsoft 365, why it happens, and what new features and capabilities mean for your tenant.
Finding all eigen value between two given eigen value.
Suppose there are two square symmetric matrices [K] and [M]. Since my work is related with structural analysis so they are typically stiffness and mass matrices. I am doing wave propagation study for a narrow band input load. In frequency domain, load amplitude is significant only between frequency [omega1 omega2]. So I am interested to find all eigen value and corresponding eigen vector only in this range.
The eigen value problem statement is
[K]=lambda[M]Suppose there are two square symmetric matrices [K] and [M]. Since my work is related with structural analysis so they are typically stiffness and mass matrices. I am doing wave propagation study for a narrow band input load. In frequency domain, load amplitude is significant only between frequency [omega1 omega2]. So I am interested to find all eigen value and corresponding eigen vector only in this range.
The eigen value problem statement is
[K]=lambda[M] Suppose there are two square symmetric matrices [K] and [M]. Since my work is related with structural analysis so they are typically stiffness and mass matrices. I am doing wave propagation study for a narrow band input load. In frequency domain, load amplitude is significant only between frequency [omega1 omega2]. So I am interested to find all eigen value and corresponding eigen vector only in this range.
The eigen value problem statement is
[K]=lambda[M] all eigen value between given range MATLAB Answers — New Questions
2026a Release Date?
Good morning,
does someone know when full 2026a will be released? Normal release month is March, I did not see or hear something about a planned delayed release. Would be nice to use a more stable version than 2025a for app buiding (pls don’t tell me to use 2025b)…
greetingsGood morning,
does someone know when full 2026a will be released? Normal release month is March, I did not see or hear something about a planned delayed release. Would be nice to use a more stable version than 2025a for app buiding (pls don’t tell me to use 2025b)…
greetings Good morning,
does someone know when full 2026a will be released? Normal release month is March, I did not see or hear something about a planned delayed release. Would be nice to use a more stable version than 2025a for app buiding (pls don’t tell me to use 2025b)…
greetings release MATLAB Answers — New Questions
How should I handle streaming inputs and outputs for my Simulink Compiler model (TCP/UDP, visualization, disp, S-function, C Caller, etc.)?
I have a model that I plan on deploying with Simulink Compiler. I would like to stream the inputs and outputs to the model, for example:Stream inputs/outputs with TCP/UDPPublish subscribe with ROS OPC client-server communicationRead from or write to a file or databaseStream to a live output visualization
I tried putting the input and output handling inside the model itself, with specific I/O blocks however I ran into problems with blocks not being supported for Rapid Accelerator mode. What is the recommended method to do this?I have a model that I plan on deploying with Simulink Compiler. I would like to stream the inputs and outputs to the model, for example:Stream inputs/outputs with TCP/UDPPublish subscribe with ROS OPC client-server communicationRead from or write to a file or databaseStream to a live output visualization
I tried putting the input and output handling inside the model itself, with specific I/O blocks however I ran into problems with blocks not being supported for Rapid Accelerator mode. What is the recommended method to do this? I have a model that I plan on deploying with Simulink Compiler. I would like to stream the inputs and outputs to the model, for example:Stream inputs/outputs with TCP/UDPPublish subscribe with ROS OPC client-server communicationRead from or write to a file or databaseStream to a live output visualization
I tried putting the input and output handling inside the model itself, with specific I/O blocks however I ran into problems with blocks not being supported for Rapid Accelerator mode. What is the recommended method to do this? simulinkcompiler, deployment, simulink, compiler, io MATLAB Answers — New Questions
Unable to create ROS2 node
I am trying to create a ROS2 node on Windows 11, MATLAB R2025b.
While either trying to create a node, or even testing with "ros2 node list", I receive an error:
>> node = ros2node("matlab_node");
Error using ros2node/createNode (line 552)
Error creating the ROS 2 node matlab_node.
Error in
ros2node (line 166)
createNode(obj, parser.Results.name, parser.Results.id);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Error using
ros.internal.Node/create
Server failed to start. Details: Transport stopped.
This was working hours ago…
reinstalling ROS toolbox and even MATLAB did not change outcome.
Thanks!I am trying to create a ROS2 node on Windows 11, MATLAB R2025b.
While either trying to create a node, or even testing with "ros2 node list", I receive an error:
>> node = ros2node("matlab_node");
Error using ros2node/createNode (line 552)
Error creating the ROS 2 node matlab_node.
Error in
ros2node (line 166)
createNode(obj, parser.Results.name, parser.Results.id);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Error using
ros.internal.Node/create
Server failed to start. Details: Transport stopped.
This was working hours ago…
reinstalling ROS toolbox and even MATLAB did not change outcome.
Thanks! I am trying to create a ROS2 node on Windows 11, MATLAB R2025b.
While either trying to create a node, or even testing with "ros2 node list", I receive an error:
>> node = ros2node("matlab_node");
Error using ros2node/createNode (line 552)
Error creating the ROS 2 node matlab_node.
Error in
ros2node (line 166)
createNode(obj, parser.Results.name, parser.Results.id);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Error using
ros.internal.Node/create
Server failed to start. Details: Transport stopped.
This was working hours ago…
reinstalling ROS toolbox and even MATLAB did not change outcome.
Thanks! ros2 node list, ros2node MATLAB Answers — New Questions
Writing PowerShell for the Eventually Consistent Entra ID Database
Suggestions for Efficient Transactions Against Entra ID Eventually Consistent Data
An interesting Microsoft development blog post addresses the subject of eventual consistency and how to design applications that use Entra ID data. The blog starts with “To scale reliably and remain resilient during failures, Microsoft Entra uses an eventually consistent directory model.”
The text goes on to explain how transactions happen in the Entra ID multi-region, multi-replica directory architecture. Essentially, transactions happen against local copies of the database and are then synchronized to the other database copies. At this point, the transaction is consistent everywhere across Entra ID and a request to fetch information about the affected object will receive the same information from any instance of Entra ID globally.
The bulk of the post offers suggestions about how application developers should interact with Entra ID. I’ve covered this topic in passing before, but thought it worthwhile to expand on the suggestions made in the blog with some example Microsoft Graph PowerShell SDK code.
Use Delegated Access
The first suggestion is to use delegated access when consistency is required because “delegated access may provide more predictable consistency.” This is easily done by setting the ConsistencyLevel parameter to Eventual in calls to cmdlets that fetch Entra ID data like Get-MgUser, Get-MgGroup, and Get-MgDevice: The CountVariable parameter is also passed to receive the count of objects returned by the request.
[array]$Users = Get-MgUser -Filter "country eq 'Ireland'" -ConsistencyLevel Eventual -All -CountVariable Count
Trust Write Responses
If a write operation (like creating a new group with New-MgGroup or updating a user account with Update-MgUser) doesn’t generate an error, treat the operation as complete. Don’t include the unnecessary overhead of a read to check that the write operation was successful. The PowerShell Try/Catch structure is a good way to detect errors without checking with a follow-up read:
Try {
Update-MgUser -UserId $UserId -JobTitle "Chief Poobah" -ErrorAction Stop
Write-Output "The update worked and the user's title was updated"
} Catch {
Write-Output "The update failed"
}
Use Identifiers Returned for New Objects
Cmdlets that create new Entra ID objects can return a variable containing details of the new object. Use the information from the variable to display details or for further interaction with the new object instead of incurring the additional overhead of reading details from Entra ID (the read might fail if the object isn’t fully synchronized). Here’s an example of creating a new group where the $Group variable is used to receive details of the new group:
Try {
$Group = New-MgGroup -Description "Teams Deployment Project" -DisplayName "Teams deployment project" -MailEnabled:$True -SecurityEnabled:$False -MailNickname "Teams.Deployment.Project" -GroupTypes "Unified" -ErrorAction Stop
Write-Output ("The new team {0} was created with identifier {1}" -f $Group.displayName, $Group.Id)
} Catch {
Write-Output "Sorry... failed to create the new group"
}
Eliminate Multi-Step Workflows
In all cases, avoid code that creates an object, reads the object to check its properties, and then updates the object properties. Instead, create the fully-populated object with a single command. If you’re used to PowerShell splatting, the technique of creating a hash table to hold property values will be second nature. This code populates two hash tables containing the password information and account properties for a new user account processed by New-MgUser to create a new fully-populated user object:
$PasswordProfile = @{}
$PasswordProfile.Add("forceChangePasswordNextSignIn", "true")
$PasswordProfile.Add("password","@TemporaryPassword123!")
$Parameters = @{}
$Parameters.Add("AccountEnabled", "true")
$Parameters.Add("OfficeLocation", "Galway")
$Parameters.Add("Department", "Business Development")
$Parameters.Add("DisplayName", "Carla Jones (BusDev)")
$Parameters.Add("State", "Connacht")
$Parameters.Add("PostalCode", "GY1H1842")
$Parameters.Add("StreetAddress", "Kennedy Center")
$Parameters.Add("City", "Galway")
$Parameters.Add('JobTitle', "Senior Development Manager")
$Parameters.Add("UserPrincipalName", "Carla.Jones@office365itpros.com")
$Parameters.Add("Mail", "Carla.Jones@office365itpros.com")
$Parameters.Add("MailNickName","Carla.Jones")
$Parameters.Add("passwordProfile", $PasswordProfile)
Try {
$NewUser = New-MgUser -BodyParameter $Parameters
Write-Output "New user account created for " $NewUser
} Catch {
Write-Output "Failed to create account"
}
Deal with Transient Read Failures
Because of the eventually consistent nature of Entra ID, it’s possible that a read against a newly created or newly updated object might fail or return a property value that you don’t expect. When this happens, give Entra ID time to synchronize by including some retry logic with exponential backoff.
This is a very simple example that shows the addition of the new user account to the new group created above. The identifiers should be fine because we’re using the values returned by Entra ID, but just in case the addition fails, the catch pauses for five seconds before retrying. In most cases, five seconds should be enough!
Try {
New-MgGroupMember -GroupId $Group.Id -DirectoryObjectId $NewUser.Id -ErrorAction Stop
Write-Output ("User {0} added to group {1}" -f $NewUser.displayName, $Group.DisplayName)
} Catch {
Write-Output "The update didn't work. Pausing for 5 seconds before retry"
Start-Sleep -Seconds 5
New-MgGroupMember -GroupId $Group.Id -DirectoryObjectId $NewUser.Id -ErrorAction Stop
}
Usually, everything just works (Figure 1), but it’s always good to be prepared for a surprise.

Make Retries Idempotent
Simply, make sure that retries that attempt repeated requests don’t end up creating duplicate objects.
None of the advice given in the post is rocket science and I’m sure that people already practice these techniques when working with Entra ID through PowerShell. It’s obviously in Microsoft’s best interests for people to avoid sloppiness in scripts because better code will reduce the demand on the Entra ID service. Following the guidance will also make scripts work better, and that’s never a bad thing.
Need help to write and manage PowerShell scripts for Microsoft 365, including Azure Automation runbooks? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle.
How to add a shared ylabel on the right hand-side of a figure, when combining tiledlayout and yyaxis?
In addition to a shared ylabel on the left hand-side of a figure, I want to put a shared ylabel on the right hand-side of the tiledlayout, when also using yyaxis. How can I achieve this? I have prepared the following MWE:
figure
t = tiledlayout(4,1);
for i = 1:4
nexttile
title("Tile"+i)
yyaxis left
plot(rand(1,10))
yyaxis right
plot(rand(1,10))
end
title(t,"Tiles")
xlabel(t,"x")
ylabel(t,"y left")
% ylabel(t,"y right")
Thanks in advance!
Edit:
My yticklabels on the left as well as on the right hand-side are relatively long, therefore, both shared ylabels need to factor the necessary distance in. The shared ylabel on the left hand-side does this automatically, the one on the right hand-side should do the same. I have updated the MWE (unfortunately, it now acts a bit buggy but it should illustrate the point, nonetheless):
figure
t = tiledlayout(4,1);
longYTickLabels_left = ["negative yticklabel left" "0" "positive yticklabel left" ];%edit: added
longYTickLabels_right = ["negative yticklabel right" "0" "positive yticklabel right"];%edit: added
for i = 1:4
nexttile
title("Tile"+i)
yyaxis left
plot(rand(1,10))
yticklabels(longYTickLabels_left)%edit: added
yyaxis right
plot(rand(1,10))
yticklabels(longYTickLabels_right)%edit: added
end
title(t,"Tiles")
xlabel(t,"x")
ylabel(t,"y left")
% ylabel(t,"y right")In addition to a shared ylabel on the left hand-side of a figure, I want to put a shared ylabel on the right hand-side of the tiledlayout, when also using yyaxis. How can I achieve this? I have prepared the following MWE:
figure
t = tiledlayout(4,1);
for i = 1:4
nexttile
title("Tile"+i)
yyaxis left
plot(rand(1,10))
yyaxis right
plot(rand(1,10))
end
title(t,"Tiles")
xlabel(t,"x")
ylabel(t,"y left")
% ylabel(t,"y right")
Thanks in advance!
Edit:
My yticklabels on the left as well as on the right hand-side are relatively long, therefore, both shared ylabels need to factor the necessary distance in. The shared ylabel on the left hand-side does this automatically, the one on the right hand-side should do the same. I have updated the MWE (unfortunately, it now acts a bit buggy but it should illustrate the point, nonetheless):
figure
t = tiledlayout(4,1);
longYTickLabels_left = ["negative yticklabel left" "0" "positive yticklabel left" ];%edit: added
longYTickLabels_right = ["negative yticklabel right" "0" "positive yticklabel right"];%edit: added
for i = 1:4
nexttile
title("Tile"+i)
yyaxis left
plot(rand(1,10))
yticklabels(longYTickLabels_left)%edit: added
yyaxis right
plot(rand(1,10))
yticklabels(longYTickLabels_right)%edit: added
end
title(t,"Tiles")
xlabel(t,"x")
ylabel(t,"y left")
% ylabel(t,"y right") In addition to a shared ylabel on the left hand-side of a figure, I want to put a shared ylabel on the right hand-side of the tiledlayout, when also using yyaxis. How can I achieve this? I have prepared the following MWE:
figure
t = tiledlayout(4,1);
for i = 1:4
nexttile
title("Tile"+i)
yyaxis left
plot(rand(1,10))
yyaxis right
plot(rand(1,10))
end
title(t,"Tiles")
xlabel(t,"x")
ylabel(t,"y left")
% ylabel(t,"y right")
Thanks in advance!
Edit:
My yticklabels on the left as well as on the right hand-side are relatively long, therefore, both shared ylabels need to factor the necessary distance in. The shared ylabel on the left hand-side does this automatically, the one on the right hand-side should do the same. I have updated the MWE (unfortunately, it now acts a bit buggy but it should illustrate the point, nonetheless):
figure
t = tiledlayout(4,1);
longYTickLabels_left = ["negative yticklabel left" "0" "positive yticklabel left" ];%edit: added
longYTickLabels_right = ["negative yticklabel right" "0" "positive yticklabel right"];%edit: added
for i = 1:4
nexttile
title("Tile"+i)
yyaxis left
plot(rand(1,10))
yticklabels(longYTickLabels_left)%edit: added
yyaxis right
plot(rand(1,10))
yticklabels(longYTickLabels_right)%edit: added
end
title(t,"Tiles")
xlabel(t,"x")
ylabel(t,"y left")
% ylabel(t,"y right") tiledlayout, yyaxis, ylabel, figure MATLAB Answers — New Questions
Bidirectional DC-DC Converter crashes during mode transition (charging to discharging) due to infinite di/dt
Hi everyone,
I am building a microgrid model in Simulink and I am hitting a brick wall during a specific weather transient event.
The Setup:
I have a 48V battery connected to a 200V DC Bus via a Bidirectional DC-DC Converter.
The DC Bus has a constant 1500W load, supported by Wind and Solar sources.
The converter uses cascaded PI controllers (Outer Voltage Loop, Inner Current Loop) to generate a PWM duty cycle via a Relational Operator and Triangle Wave (10 kHz).
The powergui is set to Discrete with a sample time of 1e-5.
The Problem:For the first 14.9 seconds, the Wind and Solar easily supply the load, and the excess power is pushed into the battery. The battery is charging (current is flowing in reverse).
At exactly t = 15.0 seconds, the wind and solar drop. The battery must instantly reverse current flow to discharge and support the 1500W load. At this exact millisecond, the simulation aborts. Scopes show a massive, instantaneous current spike as the current tries to reverse direction, causing the math solver to fail.
What I Have Already Tried:
Swapped to modern Discrete PID blocks with Anti-Windup (Clamping) to prevent integrator explosion.
Lowered the PI gains significantly to stop the controller from aggressively overreacting.
Disabled zero-crossing detection on the PID blocks.
Capped the maximum Duty Cycle at 0.85 to prevent infinite voltage commands.
I have attached a screenshot of my control loop and the scope showing the crash at 15.0s. Any advice or guidance on power electronics best practices in Simulink would be greatly appreciated!Hi everyone,
I am building a microgrid model in Simulink and I am hitting a brick wall during a specific weather transient event.
The Setup:
I have a 48V battery connected to a 200V DC Bus via a Bidirectional DC-DC Converter.
The DC Bus has a constant 1500W load, supported by Wind and Solar sources.
The converter uses cascaded PI controllers (Outer Voltage Loop, Inner Current Loop) to generate a PWM duty cycle via a Relational Operator and Triangle Wave (10 kHz).
The powergui is set to Discrete with a sample time of 1e-5.
The Problem:For the first 14.9 seconds, the Wind and Solar easily supply the load, and the excess power is pushed into the battery. The battery is charging (current is flowing in reverse).
At exactly t = 15.0 seconds, the wind and solar drop. The battery must instantly reverse current flow to discharge and support the 1500W load. At this exact millisecond, the simulation aborts. Scopes show a massive, instantaneous current spike as the current tries to reverse direction, causing the math solver to fail.
What I Have Already Tried:
Swapped to modern Discrete PID blocks with Anti-Windup (Clamping) to prevent integrator explosion.
Lowered the PI gains significantly to stop the controller from aggressively overreacting.
Disabled zero-crossing detection on the PID blocks.
Capped the maximum Duty Cycle at 0.85 to prevent infinite voltage commands.
I have attached a screenshot of my control loop and the scope showing the crash at 15.0s. Any advice or guidance on power electronics best practices in Simulink would be greatly appreciated! Hi everyone,
I am building a microgrid model in Simulink and I am hitting a brick wall during a specific weather transient event.
The Setup:
I have a 48V battery connected to a 200V DC Bus via a Bidirectional DC-DC Converter.
The DC Bus has a constant 1500W load, supported by Wind and Solar sources.
The converter uses cascaded PI controllers (Outer Voltage Loop, Inner Current Loop) to generate a PWM duty cycle via a Relational Operator and Triangle Wave (10 kHz).
The powergui is set to Discrete with a sample time of 1e-5.
The Problem:For the first 14.9 seconds, the Wind and Solar easily supply the load, and the excess power is pushed into the battery. The battery is charging (current is flowing in reverse).
At exactly t = 15.0 seconds, the wind and solar drop. The battery must instantly reverse current flow to discharge and support the 1500W load. At this exact millisecond, the simulation aborts. Scopes show a massive, instantaneous current spike as the current tries to reverse direction, causing the math solver to fail.
What I Have Already Tried:
Swapped to modern Discrete PID blocks with Anti-Windup (Clamping) to prevent integrator explosion.
Lowered the PI gains significantly to stop the controller from aggressively overreacting.
Disabled zero-crossing detection on the PID blocks.
Capped the maximum Duty Cycle at 0.85 to prevent infinite voltage commands.
I have attached a screenshot of my control loop and the scope showing the crash at 15.0s. Any advice or guidance on power electronics best practices in Simulink would be greatly appreciated! dc, inverter, crash MATLAB Answers — New Questions
Want to know the output format of audioread of .wav file captured by hydrophone
Geospectrum M36-600 with porpoise datalogger was used to capture noise. The code and respective output are given below. I want to know what is the output format of audioread? Is it normalized or volts or Pa?
CODE:
info = audioinfo(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’);
disp(info)
[y,Fs] = audioread(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’); % default: scaled floating-point
[yN,FsN] = audioread(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’,"native"); % native format when available
class(y)
min(y)
max(y)
OUTPUT:
class(yN)NoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’
CompressionMethod: ‘Uncompressed’
NumChannels: 1
SampleRate: 32000
TotalSamples: 129024
Duration: 4.0320
Title: []
Comment: []
Artist: []
BitsPerSample: 16
ans = ‘double’
ans = -1.5259e-04
ans = 1.5259e-04
ans = ‘int16’Geospectrum M36-600 with porpoise datalogger was used to capture noise. The code and respective output are given below. I want to know what is the output format of audioread? Is it normalized or volts or Pa?
CODE:
info = audioinfo(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’);
disp(info)
[y,Fs] = audioread(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’); % default: scaled floating-point
[yN,FsN] = audioread(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’,"native"); % native format when available
class(y)
min(y)
max(y)
OUTPUT:
class(yN)NoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’
CompressionMethod: ‘Uncompressed’
NumChannels: 1
SampleRate: 32000
TotalSamples: 129024
Duration: 4.0320
Title: []
Comment: []
Artist: []
BitsPerSample: 16
ans = ‘double’
ans = -1.5259e-04
ans = 1.5259e-04
ans = ‘int16’ Geospectrum M36-600 with porpoise datalogger was used to capture noise. The code and respective output are given below. I want to know what is the output format of audioread? Is it normalized or volts or Pa?
CODE:
info = audioinfo(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’);
disp(info)
[y,Fs] = audioread(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’); % default: scaled floating-point
[yN,FsN] = audioread(‘D:NIOTDSMmatlab codeNoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’,"native"); % native format when available
class(y)
min(y)
max(y)
OUTPUT:
class(yN)NoiseMatlab PC4.06.2025 HydrophoneVFDNear Motor20250604154138 199-203s.wav’
CompressionMethod: ‘Uncompressed’
NumChannels: 1
SampleRate: 32000
TotalSamples: 129024
Duration: 4.0320
Title: []
Comment: []
Artist: []
BitsPerSample: 16
ans = ‘double’
ans = -1.5259e-04
ans = 1.5259e-04
ans = ‘int16’ audioread, hydrophone, porpoisedatalogger MATLAB Answers — New Questions
How to correct the grouping variables in splitapply ?
Hi
Kindly see my attached function. It is a callback function for a switch button
I have already converted both my grouping variables to categorical arrrays, still I am getting the message saying: "A grouping variable must be a vector."
I dont understand what more can be and should be done to the grouping variables.
value = app.Switch.Value;
if strcmpi(value, ‘on’)
weightpercentages = [app.Callingapp.Osmotisk_data.Weight_percent_best_salt_1 app.Callingapp.Osmotisk_data.Weight_percent_best_salt_2];
weightpercentages=categorical(weightpercentages);
Combo=categorical(app.Callingapp.Osmotisk_data.Combinations_of_salts);
[g,id1,id2]=findgroups(Combo, weightpercentages);
hold(app.UIAxes, ‘on’)
splitapply(@(x,y)scatter(app.UIAxes,x,y,’filled’),app.temperature,app.Callingapp.Total_water_activity,g)
legend(app.UIAxes,string(id1) + ", "+string(id2) ,’location’,’northwest’)
xlabel(app.UIAxes,’Temperature’), ylabel(app.UIAxes,’Water activity’)
endHi
Kindly see my attached function. It is a callback function for a switch button
I have already converted both my grouping variables to categorical arrrays, still I am getting the message saying: "A grouping variable must be a vector."
I dont understand what more can be and should be done to the grouping variables.
value = app.Switch.Value;
if strcmpi(value, ‘on’)
weightpercentages = [app.Callingapp.Osmotisk_data.Weight_percent_best_salt_1 app.Callingapp.Osmotisk_data.Weight_percent_best_salt_2];
weightpercentages=categorical(weightpercentages);
Combo=categorical(app.Callingapp.Osmotisk_data.Combinations_of_salts);
[g,id1,id2]=findgroups(Combo, weightpercentages);
hold(app.UIAxes, ‘on’)
splitapply(@(x,y)scatter(app.UIAxes,x,y,’filled’),app.temperature,app.Callingapp.Total_water_activity,g)
legend(app.UIAxes,string(id1) + ", "+string(id2) ,’location’,’northwest’)
xlabel(app.UIAxes,’Temperature’), ylabel(app.UIAxes,’Water activity’)
end Hi
Kindly see my attached function. It is a callback function for a switch button
I have already converted both my grouping variables to categorical arrrays, still I am getting the message saying: "A grouping variable must be a vector."
I dont understand what more can be and should be done to the grouping variables.
value = app.Switch.Value;
if strcmpi(value, ‘on’)
weightpercentages = [app.Callingapp.Osmotisk_data.Weight_percent_best_salt_1 app.Callingapp.Osmotisk_data.Weight_percent_best_salt_2];
weightpercentages=categorical(weightpercentages);
Combo=categorical(app.Callingapp.Osmotisk_data.Combinations_of_salts);
[g,id1,id2]=findgroups(Combo, weightpercentages);
hold(app.UIAxes, ‘on’)
splitapply(@(x,y)scatter(app.UIAxes,x,y,’filled’),app.temperature,app.Callingapp.Total_water_activity,g)
legend(app.UIAxes,string(id1) + ", "+string(id2) ,’location’,’northwest’)
xlabel(app.UIAxes,’Temperature’), ylabel(app.UIAxes,’Water activity’)
end splitapply, matlab, groupingvariables MATLAB Answers — New Questions
Deep Learning HDL Workflow “Data size mismatch” after deployment – Possible device tree / AXI DMA configuration issue (ZCU111)
Hello,
I am working with Deep Learning HDL Toolbox on a custom reference design
with the Xilinx ZCU111 RFSoC board. I am able to successfully compile the network,
but I am encountering a deployment error.
Setup: – Board: ZCU111 RFSoC – Interface: PS GEM Ethernet – Reference design:
Custom (based on AXI-Stream DDR Memory Access : 3-AXIM) – Tool versions:
Vivado 2024.1, MATLAB (Deep Learning HDL Toolbox)
Workflow: I compile and deploy the network using: 1. compile(hW) 2.
deploy(hW) 3. predict(…)
Problem: The FPGA is programmed successfully, and the system reboots
correctly: – SSH connection is restored – Ping works
However, during deployment/predict, I get the following error on MATLAB:
Connection to the bitstream is no longer valid caused by error: Data
size mismatch.
Observations: – Bitstream programming is completed successfully – Device
tree is loaded and system boots – The error happens after deployment,
during runtime communication with FPGA.
Device Tree Concern: I suspect that the issue may be related to my device
tree definitions, especially: – dlprocessor IP – AXI stream to
memory-mapped interface (AXIS2AXIM / AXI2SMM) – DMA nodes (MM2S / S2MM)
Possible causes: Incorrect child node definitions
Questions: 1. What are the common causes of “Data size mismatch” in Deep
Learning HDL deployments? 2. Can this error be caused by incorrect
device tree configuration ? 3. Are there specific DTB
requirements for dlprocessor, AXIS2AXIM, and DMA nodes? 4. How can I
verify MATLAB runtime correctly binds to DTB nodes?
Also is there any official or working example of devicetree_dlhdl.dtb for:
Deep Learning HDL Toolbox
AXI-Stream DDR Memory Access (3-AXIM) reference design
ZCU111 (or similar Zynq UltraScale+ platforms)
I am especially interested in correct definitions for:
dlprocessor
AXIS2AXIM / AXI2SMM
DMA nodes (MM2S / S2MM)
mathworks-specific properties (mwipcore, channels, etc.)
If anyone has a working DTB or can point to an example (documentation, repo, or generated output), it would be very helpful.
Thanks!Hello,
I am working with Deep Learning HDL Toolbox on a custom reference design
with the Xilinx ZCU111 RFSoC board. I am able to successfully compile the network,
but I am encountering a deployment error.
Setup: – Board: ZCU111 RFSoC – Interface: PS GEM Ethernet – Reference design:
Custom (based on AXI-Stream DDR Memory Access : 3-AXIM) – Tool versions:
Vivado 2024.1, MATLAB (Deep Learning HDL Toolbox)
Workflow: I compile and deploy the network using: 1. compile(hW) 2.
deploy(hW) 3. predict(…)
Problem: The FPGA is programmed successfully, and the system reboots
correctly: – SSH connection is restored – Ping works
However, during deployment/predict, I get the following error on MATLAB:
Connection to the bitstream is no longer valid caused by error: Data
size mismatch.
Observations: – Bitstream programming is completed successfully – Device
tree is loaded and system boots – The error happens after deployment,
during runtime communication with FPGA.
Device Tree Concern: I suspect that the issue may be related to my device
tree definitions, especially: – dlprocessor IP – AXI stream to
memory-mapped interface (AXIS2AXIM / AXI2SMM) – DMA nodes (MM2S / S2MM)
Possible causes: Incorrect child node definitions
Questions: 1. What are the common causes of “Data size mismatch” in Deep
Learning HDL deployments? 2. Can this error be caused by incorrect
device tree configuration ? 3. Are there specific DTB
requirements for dlprocessor, AXIS2AXIM, and DMA nodes? 4. How can I
verify MATLAB runtime correctly binds to DTB nodes?
Also is there any official or working example of devicetree_dlhdl.dtb for:
Deep Learning HDL Toolbox
AXI-Stream DDR Memory Access (3-AXIM) reference design
ZCU111 (or similar Zynq UltraScale+ platforms)
I am especially interested in correct definitions for:
dlprocessor
AXIS2AXIM / AXI2SMM
DMA nodes (MM2S / S2MM)
mathworks-specific properties (mwipcore, channels, etc.)
If anyone has a working DTB or can point to an example (documentation, repo, or generated output), it would be very helpful.
Thanks! Hello,
I am working with Deep Learning HDL Toolbox on a custom reference design
with the Xilinx ZCU111 RFSoC board. I am able to successfully compile the network,
but I am encountering a deployment error.
Setup: – Board: ZCU111 RFSoC – Interface: PS GEM Ethernet – Reference design:
Custom (based on AXI-Stream DDR Memory Access : 3-AXIM) – Tool versions:
Vivado 2024.1, MATLAB (Deep Learning HDL Toolbox)
Workflow: I compile and deploy the network using: 1. compile(hW) 2.
deploy(hW) 3. predict(…)
Problem: The FPGA is programmed successfully, and the system reboots
correctly: – SSH connection is restored – Ping works
However, during deployment/predict, I get the following error on MATLAB:
Connection to the bitstream is no longer valid caused by error: Data
size mismatch.
Observations: – Bitstream programming is completed successfully – Device
tree is loaded and system boots – The error happens after deployment,
during runtime communication with FPGA.
Device Tree Concern: I suspect that the issue may be related to my device
tree definitions, especially: – dlprocessor IP – AXI stream to
memory-mapped interface (AXIS2AXIM / AXI2SMM) – DMA nodes (MM2S / S2MM)
Possible causes: Incorrect child node definitions
Questions: 1. What are the common causes of “Data size mismatch” in Deep
Learning HDL deployments? 2. Can this error be caused by incorrect
device tree configuration ? 3. Are there specific DTB
requirements for dlprocessor, AXIS2AXIM, and DMA nodes? 4. How can I
verify MATLAB runtime correctly binds to DTB nodes?
Also is there any official or working example of devicetree_dlhdl.dtb for:
Deep Learning HDL Toolbox
AXI-Stream DDR Memory Access (3-AXIM) reference design
ZCU111 (or similar Zynq UltraScale+ platforms)
I am especially interested in correct definitions for:
dlprocessor
AXIS2AXIM / AXI2SMM
DMA nodes (MM2S / S2MM)
mathworks-specific properties (mwipcore, channels, etc.)
If anyone has a working DTB or can point to an example (documentation, repo, or generated output), it would be very helpful.
Thanks! deep learning, cnn, deep learning hdl toolbox, vivado, zcu111 rfsoc board, fpga MATLAB Answers — New Questions
How can I : Develop equations to define geometric primitives?
I am trying to develop a code that will define geometric primitives using equations. the shapes to be identified are, square, circle, rectangle and triangle. When i run my programme it seems to detect all shapes as rectangle.I am trying to develop a code that will define geometric primitives using equations. the shapes to be identified are, square, circle, rectangle and triangle. When i run my programme it seems to detect all shapes as rectangle. I am trying to develop a code that will define geometric primitives using equations. the shapes to be identified are, square, circle, rectangle and triangle. When i run my programme it seems to detect all shapes as rectangle. image processing MATLAB Answers — New Questions
Symbolic solve not returning all values
Hello everyone! I am new to MATLAB, and I am trying to use it to solve for some variables in a system of equations (this is for the node-voltage equations of a filter, but that isn’t fully relevant)
syms Va Vi Vhp Vlp Vbp R2 R3 R1 Rf R s C RH RB RL RF Vo
eqn0 = (( (Va-Vi)/R2) + ( (Va-Vbp)/R3) )== 0;
eqn1 = ( ((Va-Vlp)/R1) + ( (Va-Vhp)/Rf) )==0 ;
eqn2 = (-(Vhp/R) -(Vbp*s*C))==0;
eqn3 = (-(Vbp/R) – (Vlp*s*C))==0;
eqn4 = (-Vhp/RH -Vbp/RB -Vlp/RL – Vo/RF==0);
S = solve(eqn1, eqn2, eqn3, eqn0, eqn4)
Va, Vi, Vhp, Vlp, Vbp, and Vo are all "unknowns", while the rest are supposed to be treated as constants. Ideally, I want it to solve for H(s) = (Vo/Vi) .. Or really, I’d prefer to just be able to find out what every term rearranges to (i.e solving for Vbp, Vhp, Vlp, in terms of the other ones).
But when I run "solve", I get as follows.
Va: [2×1 sym]
Vbp: [2×1 sym]
Vhp: [2×1 sym]
Vi: [2×1 sym]
s: [2×1 sym]
Within these solutions are two (? why? is it not linear?.. Im not sure..) different expressions.
% For S.Vbp
ans =
-(Vlp*(RH – (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo – RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
-(Vlp*(RH + (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo – RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
%Besides the fact there’s *two* equations, this is what I want: just a big
%list of rearranged variables. But again: why two equations!
I am new to MATLAB and I do not really have a concept of the nature of linear equations (I haven’t taken linear algebra) besides "you need one for every variable you want to find", so I do not know where this issue may be coming from. Is it because all the other "variables" (constants) are being treated as variables and there aren’t enough equations? I’ve checked my equations with two friends and I am confident there’s nothing wrong with them.
Thanks!Hello everyone! I am new to MATLAB, and I am trying to use it to solve for some variables in a system of equations (this is for the node-voltage equations of a filter, but that isn’t fully relevant)
syms Va Vi Vhp Vlp Vbp R2 R3 R1 Rf R s C RH RB RL RF Vo
eqn0 = (( (Va-Vi)/R2) + ( (Va-Vbp)/R3) )== 0;
eqn1 = ( ((Va-Vlp)/R1) + ( (Va-Vhp)/Rf) )==0 ;
eqn2 = (-(Vhp/R) -(Vbp*s*C))==0;
eqn3 = (-(Vbp/R) – (Vlp*s*C))==0;
eqn4 = (-Vhp/RH -Vbp/RB -Vlp/RL – Vo/RF==0);
S = solve(eqn1, eqn2, eqn3, eqn0, eqn4)
Va, Vi, Vhp, Vlp, Vbp, and Vo are all "unknowns", while the rest are supposed to be treated as constants. Ideally, I want it to solve for H(s) = (Vo/Vi) .. Or really, I’d prefer to just be able to find out what every term rearranges to (i.e solving for Vbp, Vhp, Vlp, in terms of the other ones).
But when I run "solve", I get as follows.
Va: [2×1 sym]
Vbp: [2×1 sym]
Vhp: [2×1 sym]
Vi: [2×1 sym]
s: [2×1 sym]
Within these solutions are two (? why? is it not linear?.. Im not sure..) different expressions.
% For S.Vbp
ans =
-(Vlp*(RH – (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo – RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
-(Vlp*(RH + (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo – RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
%Besides the fact there’s *two* equations, this is what I want: just a big
%list of rearranged variables. But again: why two equations!
I am new to MATLAB and I do not really have a concept of the nature of linear equations (I haven’t taken linear algebra) besides "you need one for every variable you want to find", so I do not know where this issue may be coming from. Is it because all the other "variables" (constants) are being treated as variables and there aren’t enough equations? I’ve checked my equations with two friends and I am confident there’s nothing wrong with them.
Thanks! Hello everyone! I am new to MATLAB, and I am trying to use it to solve for some variables in a system of equations (this is for the node-voltage equations of a filter, but that isn’t fully relevant)
syms Va Vi Vhp Vlp Vbp R2 R3 R1 Rf R s C RH RB RL RF Vo
eqn0 = (( (Va-Vi)/R2) + ( (Va-Vbp)/R3) )== 0;
eqn1 = ( ((Va-Vlp)/R1) + ( (Va-Vhp)/Rf) )==0 ;
eqn2 = (-(Vhp/R) -(Vbp*s*C))==0;
eqn3 = (-(Vbp/R) – (Vlp*s*C))==0;
eqn4 = (-Vhp/RH -Vbp/RB -Vlp/RL – Vo/RF==0);
S = solve(eqn1, eqn2, eqn3, eqn0, eqn4)
Va, Vi, Vhp, Vlp, Vbp, and Vo are all "unknowns", while the rest are supposed to be treated as constants. Ideally, I want it to solve for H(s) = (Vo/Vi) .. Or really, I’d prefer to just be able to find out what every term rearranges to (i.e solving for Vbp, Vhp, Vlp, in terms of the other ones).
But when I run "solve", I get as follows.
Va: [2×1 sym]
Vbp: [2×1 sym]
Vhp: [2×1 sym]
Vi: [2×1 sym]
s: [2×1 sym]
Within these solutions are two (? why? is it not linear?.. Im not sure..) different expressions.
% For S.Vbp
ans =
-(Vlp*(RH – (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo – RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
-(Vlp*(RH + (-(RH*(4*RB^2*RF*Vlp + 4*RB^2*RL*Vo – RF*RH*RL*Vlp))/(RF*RL*Vlp))^(1/2)))/(2*RB)
%Besides the fact there’s *two* equations, this is what I want: just a big
%list of rearranged variables. But again: why two equations!
I am new to MATLAB and I do not really have a concept of the nature of linear equations (I haven’t taken linear algebra) besides "you need one for every variable you want to find", so I do not know where this issue may be coming from. Is it because all the other "variables" (constants) are being treated as variables and there aren’t enough equations? I’ve checked my equations with two friends and I am confident there’s nothing wrong with them.
Thanks! symbolic MATLAB Answers — New Questions
Set MATLAB as default for .m files in Ubuntu without opening an empty editor
According to the previous thread, MATLAB can be made to open .m files by default in Ubuntu by editing the matlab.desktop file (usually in /usr/share/applications) and changing:
Exec=matlab -desktop
to
Exec=matlab -desktop -r "edit %f"
https://uk.mathworks.com/matlabcentral/answers/565784-defautl-to-open-m-files-in-matlab-linux
This has the side effect that opening MATLAB from its icon causes an empty editor window to be open. Can anyone advise how to avoid this? It looks like using X-Ayatana-Desktop-Shortcuts may help, but I cannot figure out how to make just opening the command window the default and opening the editor to happen only if a file is specified.According to the previous thread, MATLAB can be made to open .m files by default in Ubuntu by editing the matlab.desktop file (usually in /usr/share/applications) and changing:
Exec=matlab -desktop
to
Exec=matlab -desktop -r "edit %f"
https://uk.mathworks.com/matlabcentral/answers/565784-defautl-to-open-m-files-in-matlab-linux
This has the side effect that opening MATLAB from its icon causes an empty editor window to be open. Can anyone advise how to avoid this? It looks like using X-Ayatana-Desktop-Shortcuts may help, but I cannot figure out how to make just opening the command window the default and opening the editor to happen only if a file is specified. According to the previous thread, MATLAB can be made to open .m files by default in Ubuntu by editing the matlab.desktop file (usually in /usr/share/applications) and changing:
Exec=matlab -desktop
to
Exec=matlab -desktop -r "edit %f"
https://uk.mathworks.com/matlabcentral/answers/565784-defautl-to-open-m-files-in-matlab-linux
This has the side effect that opening MATLAB from its icon causes an empty editor window to be open. Can anyone advise how to avoid this? It looks like using X-Ayatana-Desktop-Shortcuts may help, but I cannot figure out how to make just opening the command window the default and opening the editor to happen only if a file is specified. linux, ubuntu, x-ayatana-desktop-shortcuts MATLAB Answers — New Questions









