Category: News
How do I request a return for a Student Version or Home Use License?
I purchased a Student Version or Home Use License from The MathWorks and would like to return the License for a full refund.
How do I return my MATLAB Student or Home Use License?I purchased a Student Version or Home Use License from The MathWorks and would like to return the License for a full refund.
How do I return my MATLAB Student or Home Use License? I purchased a Student Version or Home Use License from The MathWorks and would like to return the License for a full refund.
How do I return my MATLAB Student or Home Use License? MATLAB Answers — New Questions
ERA5 average hourly data and yearly data
I have data netcdf from ERA hourly, i choose 1940-2024 for all of days ech month and also because of value of data i consider just 4 hours 0:00, 6:00, 12:00, 18:00 for every grid point and my parameters are u10 & v10. my goal is to have in a map average time series that compute total days we have wind speed more than 15 m/s, and we khnow that wind speed = sqrt (u^2+v^2),
my data time is for example for jan is as 1940-01-01-0:00, 1940-01-01-6:00, ….., 2024-01-31-18:00. i need atfirst get average hourly to be daily data for every grid point every year and than compute for every grid point total days have wind speed more than 15 m/s , and after that for every grid point compute average 85 yerly to show on the map , please guide me
my code is
clear
clc
year = 1940:2024;
filename1 = ‘uv1.nc’;filename2 = ‘uv2.nc’;filename3 = ‘uv3.nc’;filename4 = ‘uv4.nc’;filename5 = ‘uv5.nc’;filename6 = ‘uv6.nc’;
filename7 = ‘uv7.nc’;filename8 = ‘uv8.nc’;filename9 = ‘uv9.nc’;filename10 = ‘uv10.nc’;filename11 = ‘uv11.nc’;filename12 = ‘uv12.nc’;
u1 = ncread(filename1, ‘u10’);u2 = ncread(filename2, ‘u10’);u3 = ncread(filename3, ‘u10’);u4 = ncread(filename4, ‘u10’);
u5 = ncread(filename5, ‘u10’);u6 = ncread(filename6, ‘u10’);u7 = ncread(filename7, ‘u10’);u8 = ncread(filename8, ‘u10’);
u9 = ncread(filename9, ‘u10’);u10 = ncread(filename10, ‘u10’);u11 = ncread(filename11, ‘u10’);u12 = ncread(filename12, ‘u10’);
v1 = ncread(filename1, ‘v10’);v2 = ncread(filename2, ‘v10’);v3 = ncread(filename3, ‘v10’);v4 = ncread(filename4, ‘v10’);
v5 = ncread(filename5, ‘v10’);v6 = ncread(filename6, ‘v10’);v7 = ncread(filename7, ‘v10’);v8 = ncread(filename8, ‘v10’);
v9 = ncread(filename9, ‘v10’);v10 = ncread(filename10, ‘v10’);v11 = ncread(filename11, ‘v10’); v12 = ncread(filename12, ‘v10’);
time1 = double(ncread(filename1, ‘valid_time’));time2 = double(ncread(filename2, ‘valid_time’));time3 = double(ncread(filename3, ‘valid_time’));
time4 = double(ncread(filename4, ‘valid_time’));time5 = double(ncread(filename5, ‘valid_time’));time6 = double(ncread(filename6, ‘valid_time’));
time7 = double(ncread(filename7, ‘valid_time’));time8 = double(ncread(filename8, ‘valid_time’));time9 = double(ncread(filename9, ‘valid_time’));
time10 = double(ncread(filename10, ‘valid_time’));time11 = double(ncread(filename11, ‘valid_time’));time12 = double(ncread(filename12, ‘valid_time’));
lat = double(ncread(filename1,’latitude’));lon = double(ncread(filename1,’longitude’));[Lat,Lon] = meshgrid(lat,lon);
% % compute land-sea mask and wind speed for every month Jan to dec
land = island(Lat,Lon);
ws1 = sqrt(u1.^2 + v1.^2);ws2 = sqrt(u2.^2 + v2.^2);ws3 = sqrt(u3.^2 + v3.^2);ws4 = sqrt(u4.^2 + v4.^2);
ws5 = sqrt(u5.^2 + v5.^2);ws6 = sqrt(u6.^2 + v6.^2);ws7 = sqrt(u7.^2 + v7.^2);ws8 = sqrt(u8.^2 + v8.^2);
ws9 = sqrt(u9.^2 + v9.^2);ws10 = sqrt(u10.^2 + v10.^2);ws11 = sqrt(u11.^2 + v11.^2);ws12 = sqrt(u12.^2 + v12.^2);
ws1(land==0)=NaN;ws2(land==0)=NaN;ws3(land==0)=NaN;ws4(land==0)=NaN;ws5(land==0)=NaN;ws6(land==0)=NaN;
ws7(land==0)=NaN;ws8(land==0)=NaN;ws9(land==0)=NaN;ws10(land==0)=NaN;ws11(land==0)=NaN;ws12(land==0)=NaN;I have data netcdf from ERA hourly, i choose 1940-2024 for all of days ech month and also because of value of data i consider just 4 hours 0:00, 6:00, 12:00, 18:00 for every grid point and my parameters are u10 & v10. my goal is to have in a map average time series that compute total days we have wind speed more than 15 m/s, and we khnow that wind speed = sqrt (u^2+v^2),
my data time is for example for jan is as 1940-01-01-0:00, 1940-01-01-6:00, ….., 2024-01-31-18:00. i need atfirst get average hourly to be daily data for every grid point every year and than compute for every grid point total days have wind speed more than 15 m/s , and after that for every grid point compute average 85 yerly to show on the map , please guide me
my code is
clear
clc
year = 1940:2024;
filename1 = ‘uv1.nc’;filename2 = ‘uv2.nc’;filename3 = ‘uv3.nc’;filename4 = ‘uv4.nc’;filename5 = ‘uv5.nc’;filename6 = ‘uv6.nc’;
filename7 = ‘uv7.nc’;filename8 = ‘uv8.nc’;filename9 = ‘uv9.nc’;filename10 = ‘uv10.nc’;filename11 = ‘uv11.nc’;filename12 = ‘uv12.nc’;
u1 = ncread(filename1, ‘u10’);u2 = ncread(filename2, ‘u10’);u3 = ncread(filename3, ‘u10’);u4 = ncread(filename4, ‘u10’);
u5 = ncread(filename5, ‘u10’);u6 = ncread(filename6, ‘u10’);u7 = ncread(filename7, ‘u10’);u8 = ncread(filename8, ‘u10’);
u9 = ncread(filename9, ‘u10’);u10 = ncread(filename10, ‘u10’);u11 = ncread(filename11, ‘u10’);u12 = ncread(filename12, ‘u10’);
v1 = ncread(filename1, ‘v10’);v2 = ncread(filename2, ‘v10’);v3 = ncread(filename3, ‘v10’);v4 = ncread(filename4, ‘v10’);
v5 = ncread(filename5, ‘v10’);v6 = ncread(filename6, ‘v10’);v7 = ncread(filename7, ‘v10’);v8 = ncread(filename8, ‘v10’);
v9 = ncread(filename9, ‘v10’);v10 = ncread(filename10, ‘v10’);v11 = ncread(filename11, ‘v10’); v12 = ncread(filename12, ‘v10’);
time1 = double(ncread(filename1, ‘valid_time’));time2 = double(ncread(filename2, ‘valid_time’));time3 = double(ncread(filename3, ‘valid_time’));
time4 = double(ncread(filename4, ‘valid_time’));time5 = double(ncread(filename5, ‘valid_time’));time6 = double(ncread(filename6, ‘valid_time’));
time7 = double(ncread(filename7, ‘valid_time’));time8 = double(ncread(filename8, ‘valid_time’));time9 = double(ncread(filename9, ‘valid_time’));
time10 = double(ncread(filename10, ‘valid_time’));time11 = double(ncread(filename11, ‘valid_time’));time12 = double(ncread(filename12, ‘valid_time’));
lat = double(ncread(filename1,’latitude’));lon = double(ncread(filename1,’longitude’));[Lat,Lon] = meshgrid(lat,lon);
% % compute land-sea mask and wind speed for every month Jan to dec
land = island(Lat,Lon);
ws1 = sqrt(u1.^2 + v1.^2);ws2 = sqrt(u2.^2 + v2.^2);ws3 = sqrt(u3.^2 + v3.^2);ws4 = sqrt(u4.^2 + v4.^2);
ws5 = sqrt(u5.^2 + v5.^2);ws6 = sqrt(u6.^2 + v6.^2);ws7 = sqrt(u7.^2 + v7.^2);ws8 = sqrt(u8.^2 + v8.^2);
ws9 = sqrt(u9.^2 + v9.^2);ws10 = sqrt(u10.^2 + v10.^2);ws11 = sqrt(u11.^2 + v11.^2);ws12 = sqrt(u12.^2 + v12.^2);
ws1(land==0)=NaN;ws2(land==0)=NaN;ws3(land==0)=NaN;ws4(land==0)=NaN;ws5(land==0)=NaN;ws6(land==0)=NaN;
ws7(land==0)=NaN;ws8(land==0)=NaN;ws9(land==0)=NaN;ws10(land==0)=NaN;ws11(land==0)=NaN;ws12(land==0)=NaN; I have data netcdf from ERA hourly, i choose 1940-2024 for all of days ech month and also because of value of data i consider just 4 hours 0:00, 6:00, 12:00, 18:00 for every grid point and my parameters are u10 & v10. my goal is to have in a map average time series that compute total days we have wind speed more than 15 m/s, and we khnow that wind speed = sqrt (u^2+v^2),
my data time is for example for jan is as 1940-01-01-0:00, 1940-01-01-6:00, ….., 2024-01-31-18:00. i need atfirst get average hourly to be daily data for every grid point every year and than compute for every grid point total days have wind speed more than 15 m/s , and after that for every grid point compute average 85 yerly to show on the map , please guide me
my code is
clear
clc
year = 1940:2024;
filename1 = ‘uv1.nc’;filename2 = ‘uv2.nc’;filename3 = ‘uv3.nc’;filename4 = ‘uv4.nc’;filename5 = ‘uv5.nc’;filename6 = ‘uv6.nc’;
filename7 = ‘uv7.nc’;filename8 = ‘uv8.nc’;filename9 = ‘uv9.nc’;filename10 = ‘uv10.nc’;filename11 = ‘uv11.nc’;filename12 = ‘uv12.nc’;
u1 = ncread(filename1, ‘u10’);u2 = ncread(filename2, ‘u10’);u3 = ncread(filename3, ‘u10’);u4 = ncread(filename4, ‘u10’);
u5 = ncread(filename5, ‘u10’);u6 = ncread(filename6, ‘u10’);u7 = ncread(filename7, ‘u10’);u8 = ncread(filename8, ‘u10’);
u9 = ncread(filename9, ‘u10’);u10 = ncread(filename10, ‘u10’);u11 = ncread(filename11, ‘u10’);u12 = ncread(filename12, ‘u10’);
v1 = ncread(filename1, ‘v10’);v2 = ncread(filename2, ‘v10’);v3 = ncread(filename3, ‘v10’);v4 = ncread(filename4, ‘v10’);
v5 = ncread(filename5, ‘v10’);v6 = ncread(filename6, ‘v10’);v7 = ncread(filename7, ‘v10’);v8 = ncread(filename8, ‘v10’);
v9 = ncread(filename9, ‘v10’);v10 = ncread(filename10, ‘v10’);v11 = ncread(filename11, ‘v10’); v12 = ncread(filename12, ‘v10’);
time1 = double(ncread(filename1, ‘valid_time’));time2 = double(ncread(filename2, ‘valid_time’));time3 = double(ncread(filename3, ‘valid_time’));
time4 = double(ncread(filename4, ‘valid_time’));time5 = double(ncread(filename5, ‘valid_time’));time6 = double(ncread(filename6, ‘valid_time’));
time7 = double(ncread(filename7, ‘valid_time’));time8 = double(ncread(filename8, ‘valid_time’));time9 = double(ncread(filename9, ‘valid_time’));
time10 = double(ncread(filename10, ‘valid_time’));time11 = double(ncread(filename11, ‘valid_time’));time12 = double(ncread(filename12, ‘valid_time’));
lat = double(ncread(filename1,’latitude’));lon = double(ncread(filename1,’longitude’));[Lat,Lon] = meshgrid(lat,lon);
% % compute land-sea mask and wind speed for every month Jan to dec
land = island(Lat,Lon);
ws1 = sqrt(u1.^2 + v1.^2);ws2 = sqrt(u2.^2 + v2.^2);ws3 = sqrt(u3.^2 + v3.^2);ws4 = sqrt(u4.^2 + v4.^2);
ws5 = sqrt(u5.^2 + v5.^2);ws6 = sqrt(u6.^2 + v6.^2);ws7 = sqrt(u7.^2 + v7.^2);ws8 = sqrt(u8.^2 + v8.^2);
ws9 = sqrt(u9.^2 + v9.^2);ws10 = sqrt(u10.^2 + v10.^2);ws11 = sqrt(u11.^2 + v11.^2);ws12 = sqrt(u12.^2 + v12.^2);
ws1(land==0)=NaN;ws2(land==0)=NaN;ws3(land==0)=NaN;ws4(land==0)=NaN;ws5(land==0)=NaN;ws6(land==0)=NaN;
ws7(land==0)=NaN;ws8(land==0)=NaN;ws9(land==0)=NaN;ws10(land==0)=NaN;ws11(land==0)=NaN;ws12(land==0)=NaN; netcdf, climate, stormy MATLAB Answers — New Questions
Is there any kind of firewall models and networking add-on available in simulink?
I am modelling a cyber-physical system. However, I want to verify the cyber properties of my system. I wonder if there is any networking add on, ethernet channel. whcih just model the networking components of my system like firewall, router etc.I am modelling a cyber-physical system. However, I want to verify the cyber properties of my system. I wonder if there is any networking add on, ethernet channel. whcih just model the networking components of my system like firewall, router etc. I am modelling a cyber-physical system. However, I want to verify the cyber properties of my system. I wonder if there is any networking add on, ethernet channel. whcih just model the networking components of my system like firewall, router etc. simulink, cyber physical system MATLAB Answers — New Questions
I’m new to matlab i want to estimate kinetic parameter from experimental data.
I have substrate concentration, biomass concentration and production concentration as a function of time now i want to fit logistic model, using curve fit tool. Can anyone pls help to use the curve fit tool to kinetic parametersI have substrate concentration, biomass concentration and production concentration as a function of time now i want to fit logistic model, using curve fit tool. Can anyone pls help to use the curve fit tool to kinetic parameters I have substrate concentration, biomass concentration and production concentration as a function of time now i want to fit logistic model, using curve fit tool. Can anyone pls help to use the curve fit tool to kinetic parameters cfit MATLAB Answers — New Questions
How to Report the Sponsors of Entra ID Guest Accounts
Sponsors Are The People Who Invite Guests to Join a Tenant
Nearly two years ago, Entra ID added the ability to assign sponsors to guest accounts. A sponsor is someone in the tenant who can attest to the need to give an external person a guest account (or so the theory goes). Since then, Entra ID changed its processing so that the person who invites someone to join a tenant as a guest automatically becomes their sponsor less another person is explicitly selected during the invitation process. In most cases, no one will bother changing the sponsor (or know that they can), and the person who issues the invite is the sponsor.
Assessing whether old guest accounts should remain in a tenant is a good practice to perform periodically. It’s easy to create a report about guest accounts that includes details like the date created, last sign in date, days since the last sign in, any groups a guest belongs to, and so on. If you then decide to remove some guest accounts, you might like to flag the decision to the sponsors for those accounts.
Finding Guest Accounts
The Microsoft Graph PowerShell SDK has changed a lot since I originally wrote about sponsors, so here’s some new code to report guests and their sponsors (you can download the script from GitHub).
The first task is to find guest accounts and retrieve their sponsors. This is easily done by running the Get-MgUser cmdlet with a suitable filter and making sure to retrieve and expand the Sponsors property:
Write-Host "Finding guest accounts to analyze..." -ForegroundColor Green [array]$Guests = Get-MgUser -Filter "userType eq 'Guest'" -All -Property Id, DisplayName, Sponsors, CreatedDateTime, SignInActivity, Mail -ExpandProperty Sponsors | Sort-Object DisplayName If (!($Guests)) { Write-Host "No guest accounts found." -ForegroundColor Red }
Reporting Guest Accounts and Their Sponsors
After that, it’s a matter of looping through the guest accounts to extract and report the relevant information. Here’s the code:
Write-Host ("Checking {0} guest accounts..." -f $Guests.Count) -ForegroundColor Green $Report = [System.Collections.Generic.List[Object]]::new() ForEach ($Guest in $Guests) { $SponsorNames = $null If ($Null -eq $Guest.Sponsors.Id) { $SponsorNames = "No sponsor assigned" } Else { $SponsorNames = $Guest.Sponsors.additionalProperties.displayName -join ", " } $SignInDate = $null If ([string]::IsNullOrEmpty($Guest.SignInActivity.LastSuccessfulSignInDateTime)) { $SignInDate = "No sign-in activity" [int]$DaysSinceSignIn = (New-TimeSpan $Guest.CreatedDateTime).Days } Else { $SignInDate = Get-Date($Guest.SignInActivity.LastSuccessfulSignInDateTime) -format 'dd-MMM-yyyy HH:mm' [int]$DaysSinceSignIn = (New-TimeSpan $SignInDate).Days } $ReportLine = [PSCustomObject] @{ Name = $Guest.DisplayName Email = $Guest.Mail 'Sponsor Names' = $SponsorNames Created = Get-Date($Guest.CreatedDateTime) -format 'dd-MMM-yyyy HH:mm' 'Last Sign In' = $SignInDate 'Days Since Sign In' = $DaysSinceSignIn.ToString() } $Report.Add($ReportLine) } $Report | Out-GridView -Title "Entra ID Guest Account Sponsors"
The number of days since sign in is calculated from the last successful sign-in date recorded by Entra ID for the account. If this information isn’t available (because the sign-in occurred before Entra introduced the last successful sign-in date property in late 2023), the creation date for the account is used. Figure 1 is an example of the output report.

Some guest accounts don’t have sponsors because they were added to the tenant before Entra ID updated its processes to make the person who invites a guest their sponsor.
Figuring Out Old Guests
Because we compute the number of days since the last sign-in, it’s easy to list the set of guests that haven’t signed in since a set threshold. After that, it’s up to you how to contact the sponsors to ask them what to do with their old guests.
# List all the guest accounts (and their sponsors) that haven't signed in for more than the threshold number of days $OldGuests = $Report | Where-Object {$_.'Days Since Sign In' -as [int] -gt $Threshold} Write-Host "" Write-Host ("The following guest accounts have not signed in for more than {0}} days:" -f $Threshold) -ForegroundColor Red Write-Host "" $OldGuests | Format-Table Name, 'Sponsor Names', 'Days Since Sign In', 'Last Sign In' -AutoSize
Tenants don’t have to use the sponsor information if they don’t want to. However, given that Entra ID now populates the sponsor data for new guest accounts, it seems like a pity not to use it.
Learn how to exploit the data available to Microsoft 365 tenant administrators through the Office 365 for IT Pros eBook. We love figuring out how things work.
integration tolerance has not met
Hi
I encountered an issue in implementing the growth rate of the tumor. In the following equation, both tumor carrying capacity and tumor volume are species
(d/dt)TumorVolume = r * TumorVolume * log(TumorCarryingCapacity/TumorVolume)
I received a message error that the integration tolerance has not met. I believe it is because tumor carrying capacity and tumor volume are species and they have to be that.
How would I solve this?
Appreciate your helpHi
I encountered an issue in implementing the growth rate of the tumor. In the following equation, both tumor carrying capacity and tumor volume are species
(d/dt)TumorVolume = r * TumorVolume * log(TumorCarryingCapacity/TumorVolume)
I received a message error that the integration tolerance has not met. I believe it is because tumor carrying capacity and tumor volume are species and they have to be that.
How would I solve this?
Appreciate your help Hi
I encountered an issue in implementing the growth rate of the tumor. In the following equation, both tumor carrying capacity and tumor volume are species
(d/dt)TumorVolume = r * TumorVolume * log(TumorCarryingCapacity/TumorVolume)
I received a message error that the integration tolerance has not met. I believe it is because tumor carrying capacity and tumor volume are species and they have to be that.
How would I solve this?
Appreciate your help integration tolerance MATLAB Answers — New Questions
NaN output only when using three ouput for QR
I’m trying to use the canoncorr function. I removed all features with NaN values from my two input matrices. Still, I get the error
Error using canoncorr (line 86)
X must contain at least one non-constant column.
This is because the function qr in
[Q1,T11,perm1] = qr(X,0);
returns all-NaN Q1 and T11, therefore at the next line rankX is 0.
Nonetheless, I noted that if I run only [Q1,T11] = qr(X,0); or [T11] = qr(X,0); all looks ok.
Any guess on what is going on?
Thank youI’m trying to use the canoncorr function. I removed all features with NaN values from my two input matrices. Still, I get the error
Error using canoncorr (line 86)
X must contain at least one non-constant column.
This is because the function qr in
[Q1,T11,perm1] = qr(X,0);
returns all-NaN Q1 and T11, therefore at the next line rankX is 0.
Nonetheless, I noted that if I run only [Q1,T11] = qr(X,0); or [T11] = qr(X,0); all looks ok.
Any guess on what is going on?
Thank you I’m trying to use the canoncorr function. I removed all features with NaN values from my two input matrices. Still, I get the error
Error using canoncorr (line 86)
X must contain at least one non-constant column.
This is because the function qr in
[Q1,T11,perm1] = qr(X,0);
returns all-NaN Q1 and T11, therefore at the next line rankX is 0.
Nonetheless, I noted that if I run only [Q1,T11] = qr(X,0); or [T11] = qr(X,0); all looks ok.
Any guess on what is going on?
Thank you qr, matlab, canoncorr MATLAB Answers — New Questions
writecell messes up merge and center when writing to Excel
I tried to switch some of my old xlswrite functions over to writecell as this newer function seems superior in terms of efficiency, however I found that when writing data to cells that have already been merged and centered in an Excel file, writecell wipes out the merge/center. In fact, it seems like writecell wipes other formatting as well (column widths are resized to fit the data). This is pretty annoying as I am just trying to write cell data in specific cells without altering the formatting of the file.
xlswrite does not have this issue. It just puts the data in there.
Any workarounds that don’t involve activexserver would be appreciated. At a minimum I would like to understand why this is happening.I tried to switch some of my old xlswrite functions over to writecell as this newer function seems superior in terms of efficiency, however I found that when writing data to cells that have already been merged and centered in an Excel file, writecell wipes out the merge/center. In fact, it seems like writecell wipes other formatting as well (column widths are resized to fit the data). This is pretty annoying as I am just trying to write cell data in specific cells without altering the formatting of the file.
xlswrite does not have this issue. It just puts the data in there.
Any workarounds that don’t involve activexserver would be appreciated. At a minimum I would like to understand why this is happening. I tried to switch some of my old xlswrite functions over to writecell as this newer function seems superior in terms of efficiency, however I found that when writing data to cells that have already been merged and centered in an Excel file, writecell wipes out the merge/center. In fact, it seems like writecell wipes other formatting as well (column widths are resized to fit the data). This is pretty annoying as I am just trying to write cell data in specific cells without altering the formatting of the file.
xlswrite does not have this issue. It just puts the data in there.
Any workarounds that don’t involve activexserver would be appreciated. At a minimum I would like to understand why this is happening. writecell xlswrite formatting MATLAB Answers — New Questions
Confusion with Coordinates System of objectDetection() in trackerGNN
I have a confusion regarding objectDetection() as we input that into trackerGNN. If I give measurements in this form and specify the field Frame of MeasurementParameters to be ‘Spherical’. Then I run tracker and get measurements using getTrackPositions(……., "constvel"). Then I have to convert that into cartesian coordinates for plotting using plotTrack().
But the issue is that I get the same exact "squigly lines" on plot if I dont specify MeasurmentParameters field at all. None other parameters changed (No change in this phenomenon is observed if we change units from theta to degrees).
So either the case is that trackerGNN interprets as x and y measurements at face value regardless of whether I specify it to be Spherical or not. Or there is something I missed. Either way, Please clarify what is going on.I have a confusion regarding objectDetection() as we input that into trackerGNN. If I give measurements in this form and specify the field Frame of MeasurementParameters to be ‘Spherical’. Then I run tracker and get measurements using getTrackPositions(……., "constvel"). Then I have to convert that into cartesian coordinates for plotting using plotTrack().
But the issue is that I get the same exact "squigly lines" on plot if I dont specify MeasurmentParameters field at all. None other parameters changed (No change in this phenomenon is observed if we change units from theta to degrees).
So either the case is that trackerGNN interprets as x and y measurements at face value regardless of whether I specify it to be Spherical or not. Or there is something I missed. Either way, Please clarify what is going on. I have a confusion regarding objectDetection() as we input that into trackerGNN. If I give measurements in this form and specify the field Frame of MeasurementParameters to be ‘Spherical’. Then I run tracker and get measurements using getTrackPositions(……., "constvel"). Then I have to convert that into cartesian coordinates for plotting using plotTrack().
But the issue is that I get the same exact "squigly lines" on plot if I dont specify MeasurmentParameters field at all. None other parameters changed (No change in this phenomenon is observed if we change units from theta to degrees).
So either the case is that trackerGNN interprets as x and y measurements at face value regardless of whether I specify it to be Spherical or not. Or there is something I missed. Either way, Please clarify what is going on. trackergnn MATLAB Answers — New Questions
Important Purview eDiscovery Changes Take Effect in May 2025
Part of Revamp of Purview eDiscovery to Embrace a Unified Framework
Microsoft is in the middle of a campaign to modernize the Purview eDiscovery solution. Previously, I wrote about the announcement and the possible impact on tenants and eDiscovery investigators. The big idea here is that Purview eDiscovery is moving to a unified framework covering all types of eDiscovery activities with the functionality available to users being determined by the license they hold. In a nutshell, E3 means standard eDiscovery, and E5 means access to premium eDiscovery.
The nature of these things is that the devil is in the detail, which only comes out as Microsoft introduces changes to implement the grand plan. An example is in message center notification MC1055528 (14 April 2025), which explains a set of component retirements to implement some big changes from May 26, 2025.
Content Searches Presented in an eDiscovery Case
First, the Content Search option in the Classic eDiscovery (i.e., the eDiscovery UI that Microsoft revamped (badly) in 2021) will disappear. Its replacement is a new Content Search option that displays the set of content searches within the new eDiscovery UI. Be aware that the new UI (which is also used with old cases) is very different to what’s available in classic eDiscovery. The query and locations (search targets) are moved over, but the process of running searches and examining samples of results found by searches is very different.
Essentially, there’s one big eDiscovery case (called Content Search) that holds all the content searches. As you can see from Figure 1, I have content searches going back to January 2015. Someday soon I must clean out the old searches.

Note the two little icons above the list of searches. TR is for me, and EM indicates that my account holds the eDiscovery Manager role.
Removal of Classic eDiscovery Option
Today, the eDiscovery section of the Purview compliance portal includes a Classic eDiscovery option. This option is going away and is replaced by the Cases option. Essentially, all the old eDiscovery cases become standard eDiscovery cases in the new framework. The Content Search case that holds all the old content searches is one of the new cases.
Removal of Export Capability from PowerShell Cmdlets
The compliance PowerShell module contains a set of cmdlets to manage eDiscovery content searches and cases. Microsoft says that they will disable (remove) the export-related parameters from the cmdlets that manage content search actions:
- New-ComplianceSearchAction -Export parameter
- Get-ComplianceSearchAction -Export parameter
- Set-ComplianceSearchAction -ChangeExportKey parameter
All other eDiscovery cmdlets are unaffected, so you might ask why Microsoft is focusing on the export feature. I assume that two factors are in play:
- Microsoft wants to remove content searches eventually. Removing the ability to export the results of content searches with PowerShell forces standard users to export search results via the Purview portal.
- Different export mechanisms are used. Content searches move the results of full searches (not estimate searches) to a protected location in Azure and exports the data from there using the content download tool. Users must have the correct export key to download data. In the new eDiscovery, the export process creates export packages that are downloaded from the Purview compliance portal.
Removing the ability to export search results via PowerShell might impact some scripts. Going forward, the only way to programmatically control eDiscovery exports is with the eDiscovery Graph API (the reviewSet export API). The downside here is that the Graph API only supports premium eDiscovery cases, so if your license only allows standard eDiscovery, you can’t use the API.
A Potentially Disruptive Change
The takeaway is that processes that use content searches for various kinds of investigations must be revised before Microsoft pulls the plug on the older eDiscovery mechanism on May 26, 2025. The steps to find material through eDiscovery are different, the UI is different, and some of the terms used in the GUI and documentation are different. All in all, this is a big change that will also affect tenant administrators who use content searches for different reasons, like finding SharePoint Online files without retention labels. Prepare for some disruption!
Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.
How to send one array element at a time to a subsystem every 0.5 seconds in Simulink?
Hi all, I’m working on a Simulink model where a MATLAB Function block outputs an array of control commands (the command array is generated once at the start of simulation). I’d like to send one command at a time from this array to a subsystem input, with a rate of 2 Hz (i.e., one value every 0.5 seconds).
What’s the best way to implement this?
Thanks in advance!Hi all, I’m working on a Simulink model where a MATLAB Function block outputs an array of control commands (the command array is generated once at the start of simulation). I’d like to send one command at a time from this array to a subsystem input, with a rate of 2 Hz (i.e., one value every 0.5 seconds).
What’s the best way to implement this?
Thanks in advance! Hi all, I’m working on a Simulink model where a MATLAB Function block outputs an array of control commands (the command array is generated once at the start of simulation). I’d like to send one command at a time from this array to a subsystem input, with a rate of 2 Hz (i.e., one value every 0.5 seconds).
What’s the best way to implement this?
Thanks in advance! simulink MATLAB Answers — New Questions
How to do recursive least square for online parameter estimation
I have stucked in this details for months now
I have constructed my simulink model which is a little complicated (containing a PV array + DC/DC converter ) using simscape
the simulation is working for this first stage
The second stage is to use online parameter estimation to estimate the time varying parameter of the PV cell
i have the simulated data Pmpp and the experimetal data Pmpp
now i want to do it online to update comtimuosly the parameters
the problem is that most of the apps and blocks in simulink support using an Autoregressive models like ARX ARMA …
But iwant to do it with my simulink model
Any helpI have stucked in this details for months now
I have constructed my simulink model which is a little complicated (containing a PV array + DC/DC converter ) using simscape
the simulation is working for this first stage
The second stage is to use online parameter estimation to estimate the time varying parameter of the PV cell
i have the simulated data Pmpp and the experimetal data Pmpp
now i want to do it online to update comtimuosly the parameters
the problem is that most of the apps and blocks in simulink support using an Autoregressive models like ARX ARMA …
But iwant to do it with my simulink model
Any help I have stucked in this details for months now
I have constructed my simulink model which is a little complicated (containing a PV array + DC/DC converter ) using simscape
the simulation is working for this first stage
The second stage is to use online parameter estimation to estimate the time varying parameter of the PV cell
i have the simulated data Pmpp and the experimetal data Pmpp
now i want to do it online to update comtimuosly the parameters
the problem is that most of the apps and blocks in simulink support using an Autoregressive models like ARX ARMA …
But iwant to do it with my simulink model
Any help recursive, least square, parameter estimation, online MATLAB Answers — New Questions
Average Optical Flow vectors and plot over multiple frames
Hello,
I am trying to get the average optical flow vectors for a whole video (e.g. for a 10 second video). Currently I am using the opticalFlowFarneback method from Estimate optical flow example with the Computer Vision Toolbox (https://www.mathworks.com/help/vision/ref/opticalflowhs.estimateflow.html):
%% Estimating Optical Flow
% This example uses the Farneback Method to to estimate the direction and speed of moving
% cars in the video
% Copyright 2018 The MathWorks, Inc.
%% Read the video into MATLAB
vidReader = VideoReader(‘visiontraffic.avi’);
opticFlow = opticalFlowFarneback;
%% Estimate Optical Flow of each frame
while hasFrame(vidReader)
frameRGB = readFrame(vidReader);
frameGray = rgb2gray(frameRGB);
flow = estimateFlow(opticFlow,frameGray);
imshow(frameRGB)
hold on
% Plot the flow vectors
plot(flow,’DecimationFactor’,[25 25],’ScaleFactor’, 2)
% Find the handle to the quiver object
q = findobj(gca,’type’,’Quiver’);
% Change the color of the arrows to red
q.Color = ‘r’;
drawnow
hold off
end
Although this produces a nice visualization of flow vectors between two frames (see attached image), I need more like an average of flow vectors across all frames of the video. I am quite new to MatLab, I would be super thankful for any feedback how to change abovementioned code.Hello,
I am trying to get the average optical flow vectors for a whole video (e.g. for a 10 second video). Currently I am using the opticalFlowFarneback method from Estimate optical flow example with the Computer Vision Toolbox (https://www.mathworks.com/help/vision/ref/opticalflowhs.estimateflow.html):
%% Estimating Optical Flow
% This example uses the Farneback Method to to estimate the direction and speed of moving
% cars in the video
% Copyright 2018 The MathWorks, Inc.
%% Read the video into MATLAB
vidReader = VideoReader(‘visiontraffic.avi’);
opticFlow = opticalFlowFarneback;
%% Estimate Optical Flow of each frame
while hasFrame(vidReader)
frameRGB = readFrame(vidReader);
frameGray = rgb2gray(frameRGB);
flow = estimateFlow(opticFlow,frameGray);
imshow(frameRGB)
hold on
% Plot the flow vectors
plot(flow,’DecimationFactor’,[25 25],’ScaleFactor’, 2)
% Find the handle to the quiver object
q = findobj(gca,’type’,’Quiver’);
% Change the color of the arrows to red
q.Color = ‘r’;
drawnow
hold off
end
Although this produces a nice visualization of flow vectors between two frames (see attached image), I need more like an average of flow vectors across all frames of the video. I am quite new to MatLab, I would be super thankful for any feedback how to change abovementioned code. Hello,
I am trying to get the average optical flow vectors for a whole video (e.g. for a 10 second video). Currently I am using the opticalFlowFarneback method from Estimate optical flow example with the Computer Vision Toolbox (https://www.mathworks.com/help/vision/ref/opticalflowhs.estimateflow.html):
%% Estimating Optical Flow
% This example uses the Farneback Method to to estimate the direction and speed of moving
% cars in the video
% Copyright 2018 The MathWorks, Inc.
%% Read the video into MATLAB
vidReader = VideoReader(‘visiontraffic.avi’);
opticFlow = opticalFlowFarneback;
%% Estimate Optical Flow of each frame
while hasFrame(vidReader)
frameRGB = readFrame(vidReader);
frameGray = rgb2gray(frameRGB);
flow = estimateFlow(opticFlow,frameGray);
imshow(frameRGB)
hold on
% Plot the flow vectors
plot(flow,’DecimationFactor’,[25 25],’ScaleFactor’, 2)
% Find the handle to the quiver object
q = findobj(gca,’type’,’Quiver’);
% Change the color of the arrows to red
q.Color = ‘r’;
drawnow
hold off
end
Although this produces a nice visualization of flow vectors between two frames (see attached image), I need more like an average of flow vectors across all frames of the video. I am quite new to MatLab, I would be super thankful for any feedback how to change abovementioned code. optical flow, plot, plotting, quiver, video processing, video, vector, vectors MATLAB Answers — New Questions
How to create multiple Fuzzy Inference Systems (FIS) simultaneously without using a for-loop
I am continuously changing my membership function values in my code. I can run a loop and create as many Fuzzy Inference systems(FISs) as I want. But I want to create all of them simultaneously so that I can cut down on the execution time. I looked up the codes of many inbuilt functions like newfis,addvar etc. They support the creation of one FIS at a time. So is there any other way of solving this problem without having to modify the inbuilt functions?
Thanks in advance.I am continuously changing my membership function values in my code. I can run a loop and create as many Fuzzy Inference systems(FISs) as I want. But I want to create all of them simultaneously so that I can cut down on the execution time. I looked up the codes of many inbuilt functions like newfis,addvar etc. They support the creation of one FIS at a time. So is there any other way of solving this problem without having to modify the inbuilt functions?
Thanks in advance. I am continuously changing my membership function values in my code. I can run a loop and create as many Fuzzy Inference systems(FISs) as I want. But I want to create all of them simultaneously so that I can cut down on the execution time. I looked up the codes of many inbuilt functions like newfis,addvar etc. They support the creation of one FIS at a time. So is there any other way of solving this problem without having to modify the inbuilt functions?
Thanks in advance. fuzzy logic MATLAB Answers — New Questions
finding longest length
Hi ,I have a matrix as follows
I =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 1 0 1 0 0 0 1 0
0 1 0 1 1 0 1 0 0 1
1 0 0 0 1 0 1 1 0 0
0 0 0 0 1 0 1 0 0 0
0 1 1 1 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
I need the output as follows:
I =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1 0
0 1 0 1 0 0 0 0 0 1
1 0 0 0 0 0 0 1 0 0
0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
i.e only the longest length of pixel that touches two opposite boundary.can any body help please?ThanksHi ,I have a matrix as follows
I =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 1 0 1 0 0 0 1 0
0 1 0 1 1 0 1 0 0 1
1 0 0 0 1 0 1 1 0 0
0 0 0 0 1 0 1 0 0 0
0 1 1 1 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
I need the output as follows:
I =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1 0
0 1 0 1 0 0 0 0 0 1
1 0 0 0 0 0 0 1 0 0
0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
i.e only the longest length of pixel that touches two opposite boundary.can any body help please?Thanks Hi ,I have a matrix as follows
I =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 1 0 1 0 0 0 1 0
0 1 0 1 1 0 1 0 0 1
1 0 0 0 1 0 1 1 0 0
0 0 0 0 1 0 1 0 0 0
0 1 1 1 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
I need the output as follows:
I =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1 0
0 1 0 1 0 0 0 0 0 1
1 0 0 0 0 0 0 1 0 0
0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
i.e only the longest length of pixel that touches two opposite boundary.can any body help please?Thanks pixel, lenght MATLAB Answers — New Questions
Error with addpath in MATLAB Runtime when Using ROS 2 Custom Messages in a Deployed Application
I am developing a MATLAB application that uses ROS 2 and requires custom messages. The code works fine in the MATLAB development environment, but when I compile it using MATLAB Compiler and try to run the deployed application, I encounter the following error:
Error using matlabpath
Modifying the search path is not supported by MATLAB Compiler. Remove functions that modify the search path from your MATLAB code. To make files visible to your deployed application, add the parent folder to your MATLAB session.
Error in path (line 109)
Error in addpath>doPathAddition (line 126)
Error in addpath (line 90)
Error in ros.internal.getEmptyMessage>getCachedMap (line 53)
Error in ros.internal.getEmptyMessage (line 33)
Error in ros.internal.utilities.findMsgDepends (line 17)
Error in ros.internal.utilities.getPathOfDependentDlls (line 16)
Error in ros2publisher/createPublisher (line 460)
Error in ros2publisher (line 267)
How can I properly include the custom ROS 2 messages in a deployed MATLAB application without triggering this error? Is there a way to avoid the dynamic modification of the path or preload the required dependencies before deployment?
Any guidance on handling custom ROS 2 messages in MATLAB Runtime would be greatly appreciated.I am developing a MATLAB application that uses ROS 2 and requires custom messages. The code works fine in the MATLAB development environment, but when I compile it using MATLAB Compiler and try to run the deployed application, I encounter the following error:
Error using matlabpath
Modifying the search path is not supported by MATLAB Compiler. Remove functions that modify the search path from your MATLAB code. To make files visible to your deployed application, add the parent folder to your MATLAB session.
Error in path (line 109)
Error in addpath>doPathAddition (line 126)
Error in addpath (line 90)
Error in ros.internal.getEmptyMessage>getCachedMap (line 53)
Error in ros.internal.getEmptyMessage (line 33)
Error in ros.internal.utilities.findMsgDepends (line 17)
Error in ros.internal.utilities.getPathOfDependentDlls (line 16)
Error in ros2publisher/createPublisher (line 460)
Error in ros2publisher (line 267)
How can I properly include the custom ROS 2 messages in a deployed MATLAB application without triggering this error? Is there a way to avoid the dynamic modification of the path or preload the required dependencies before deployment?
Any guidance on handling custom ROS 2 messages in MATLAB Runtime would be greatly appreciated. I am developing a MATLAB application that uses ROS 2 and requires custom messages. The code works fine in the MATLAB development environment, but when I compile it using MATLAB Compiler and try to run the deployed application, I encounter the following error:
Error using matlabpath
Modifying the search path is not supported by MATLAB Compiler. Remove functions that modify the search path from your MATLAB code. To make files visible to your deployed application, add the parent folder to your MATLAB session.
Error in path (line 109)
Error in addpath>doPathAddition (line 126)
Error in addpath (line 90)
Error in ros.internal.getEmptyMessage>getCachedMap (line 53)
Error in ros.internal.getEmptyMessage (line 33)
Error in ros.internal.utilities.findMsgDepends (line 17)
Error in ros.internal.utilities.getPathOfDependentDlls (line 16)
Error in ros2publisher/createPublisher (line 460)
Error in ros2publisher (line 267)
How can I properly include the custom ROS 2 messages in a deployed MATLAB application without triggering this error? Is there a way to avoid the dynamic modification of the path or preload the required dependencies before deployment?
Any guidance on handling custom ROS 2 messages in MATLAB Runtime would be greatly appreciated. ros2, matlab-runtime, custom-messages, path, error MATLAB Answers — New Questions
Licensing Auto-Label Policies for Sensitivity Labels
Peeling Away the Layers to Find the Cheapest Auto-Label Option
Last week, I discussed how to use auto-label policies to apply sensitivity labels to old files in SharePoint Online sites to prevent their discovery and use by Microsoft 365 Copilot. The approach works but it’s only viable if a Microsoft 365 tenant has the necessary licenses to support auto-label policies.
Understanding Microsoft licensing is an art form and getting things right is important when a licensing decision might affect everyone in a tenant. In this instance, the requirements for information protection service-side automatic sensitivity labeling from the Purview service descriptions and license guidelines page seem pretty straightforward (Figure 1).

The same information is available in the Microsoft 365 Compliance Licensing Comparison Excel worksheet (also available as a PDF).
Licensing Trainable Classifiers
Purview extends over many different solutions. In my original article, I suggest using a trainable classifier to locate old files, so we need to check that licenses under consideration also cover trainable classifiers. The same page says:
“To auto-apply retention labels using a trainable classifier, the following licenses provide user rights:
- Microsoft 365 E5/A5/G5
- Microsoft 365 E5/A5/G5/F5 Compliance and F5 Security & Compliance
- Microsoft 365 E5/A5/F5/G5 Information Protection and Governance”
Licensing Costs
It seems clear then that the licensing requirement is met by having one of these SKUs (listed in order of cost):
- Microsoft 365 E5 (or Office 365 E5).
- The Microsoft E5 Compliance add-on ($12/user/month)
- The Microsoft E5 Information Protection and Governance add-on ($7/user/month).
Microsoft 365 E5 Information Protection and Governance add-on is a subset of the Microsoft 365 E5 Compliance product. According to this page, the Information Protection and Governance add-in is available for the following base licenses (Figure 2):

Interestingly, although Microsoft 365 Business Premium supports the E5 Security add-on, Microsoft still doesn’t support the E5 Compliance add-on for these customers – but Microsoft 365 Business Premium tenants can buy the Information Protection and Governance add-on. It’s an anomaly.
The takeaway is that if a tenant can restrict its licensing requirements to as tight a set as possible, it might be possible to reduce the overall cost for extra licenses quite considerably.
Who Needs the Licenses?
Microsoft’s general licensing guideline for Purview solutions is that anyone who benefits from a feature must be licensed for that feature. In practical terms, this means that anyone with access to a SharePoint Online site that’s processed by an auto-label policy requires a license. The same rule applies to other forms of auto-labeling, such as defining a default sensitivity label for a document library.
The DIY Option to Sensitivity Labeling
Let’s imagine that you don’t want to pay Microsoft any more licensing fees but still want to apply a sensitivity label to a bunch of old files. It’s possible to do this with a DIY app, but it will still cost because the Graph assignSensitivityLabel API is a metered API and costs $0.00185 each time the API applies a label to a file, or $185 per 100,000 files.
Sensitivity labels can’t process every type of file that’s found in SharePoint Online. The API can only deal with Office documents and PDF files. Older Office documents (.DOC, .XLS, and .PPT files) are unsupported, so some testing is needed to establish exactly what in the target content can be processed.
If you only plan to apply sensitivity labels to a set of known files and don’t need to use advanced capabilities like trainable classifiers to find items like invoices, customer orders, project plans, and so on, then the DIY option could be the right choice. The code to report the files in a SharePoint document library isn’t hard, and once you have a list of files, you can review and trim the set and then use it as input to an app to apply sensitivity labels.
Depending on how many files are to be processed, the DIY
approach can save a lot of money over licensing costs. Apart from having to pay to create, test, deploy, and support the code, the downside is that DIY labeling is a one-off mechanism without the benefits of ongoing automatic labeling or any of the other advanced processing built into Purview. You pay your money and make your choice!
Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.
The settling time in matlab differs from the calculated value
Hi,
Why does Matlab calculate the settling time which measures the time for the error to fall below 2% of the peak value of the error for the closed-loop function T given below differently from the calculated value?
Cheers,
T= 4/( s^2 + 1.6 s+4)
Calculated settling time=4/(wn*zeta)=5 s;
where wn=2, zeta=0.4.
s = stepinfo(T)
s =
struct with fields:
RiseTime: 0.7326
TransientTime: 4.2047
SettlingTime: 4.2047
SettlingMin: 0.9065
SettlingMax: 1.2537
Overshoot: 25.3741
Undershoot: 0
Peak: 1.2537
PeakTime: 1.7269Hi,
Why does Matlab calculate the settling time which measures the time for the error to fall below 2% of the peak value of the error for the closed-loop function T given below differently from the calculated value?
Cheers,
T= 4/( s^2 + 1.6 s+4)
Calculated settling time=4/(wn*zeta)=5 s;
where wn=2, zeta=0.4.
s = stepinfo(T)
s =
struct with fields:
RiseTime: 0.7326
TransientTime: 4.2047
SettlingTime: 4.2047
SettlingMin: 0.9065
SettlingMax: 1.2537
Overshoot: 25.3741
Undershoot: 0
Peak: 1.2537
PeakTime: 1.7269 Hi,
Why does Matlab calculate the settling time which measures the time for the error to fall below 2% of the peak value of the error for the closed-loop function T given below differently from the calculated value?
Cheers,
T= 4/( s^2 + 1.6 s+4)
Calculated settling time=4/(wn*zeta)=5 s;
where wn=2, zeta=0.4.
s = stepinfo(T)
s =
struct with fields:
RiseTime: 0.7326
TransientTime: 4.2047
SettlingTime: 4.2047
SettlingMin: 0.9065
SettlingMax: 1.2537
Overshoot: 25.3741
Undershoot: 0
Peak: 1.2537
PeakTime: 1.7269 the settling time in matlab differs MATLAB Answers — New Questions
Connect line using add_line command to same port connections
While I tried to collect lines in paralel, an error popup:
>> Battery_Array_tmp
Error using Battery_Array_tmp (line 33)
The first port already has a line connection
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),’Autorouting’,’on’);
end
Can someone assist to solve it?
I adding part of rellevant script:
%%%% Scriptto creat top design – withot Batteries/
%%%% only to speedup simulation time during debug Block connections
open_system(‘Battery_arc_tmp’)
mdl = ‘Battery_arc_tmp’;
battery_model = find_system(mdl,’FindAll’,’on’,’Name’,’Battery_arc_tmp’);
numRows = 3;
% Get handle to existing (external) POS and NEG ports
Plus_MC = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’POS’);
Minus_MC = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’NEG’);
%%% add MC_cube – basic String_unit:
for i=1:2 %% set two columns
colPos = 500; %% spaces between columns
for v=1:numRows %% loop for 5 String per column
nl=num2str(v + numRows*(i-1));
if i==1
% Add_MC_cube(v) = add_block(‘MC_Cube/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
% % % % % % MC_TMP empty Submodule – only for quick compilation….
Add_MC_cube(v) = add_block(‘MC_TMP/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
else
% Add_MC_cube(v) = add_block(‘MC_Cube2/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
% % % % % % MC_TMP empty Submodule – only for quick compilation….
Add_MC_cube(v) = add_block(‘MC_TMP2/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
end
posc = get(Add_MC_cube(v),’Position’);
set(Add_MC_cube(v),’Position’,posc + [100+(i-1)*colPos 100*(v-1)+45 100+(i-1)*colPos 100*(v-1)+45])
PH_Add_MC_cube{v,i}=get(Add_MC_cube(v),’PortHandles’);
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),’Autorouting’,’on’);
end
end
end
while connecting 2 module there is no problem/
But when increase above 2 module i gos an error message (above)..
please, see pic attached…
Thank for assist.
TommyWhile I tried to collect lines in paralel, an error popup:
>> Battery_Array_tmp
Error using Battery_Array_tmp (line 33)
The first port already has a line connection
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),’Autorouting’,’on’);
end
Can someone assist to solve it?
I adding part of rellevant script:
%%%% Scriptto creat top design – withot Batteries/
%%%% only to speedup simulation time during debug Block connections
open_system(‘Battery_arc_tmp’)
mdl = ‘Battery_arc_tmp’;
battery_model = find_system(mdl,’FindAll’,’on’,’Name’,’Battery_arc_tmp’);
numRows = 3;
% Get handle to existing (external) POS and NEG ports
Plus_MC = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’POS’);
Minus_MC = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’NEG’);
%%% add MC_cube – basic String_unit:
for i=1:2 %% set two columns
colPos = 500; %% spaces between columns
for v=1:numRows %% loop for 5 String per column
nl=num2str(v + numRows*(i-1));
if i==1
% Add_MC_cube(v) = add_block(‘MC_Cube/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
% % % % % % MC_TMP empty Submodule – only for quick compilation….
Add_MC_cube(v) = add_block(‘MC_TMP/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
else
% Add_MC_cube(v) = add_block(‘MC_Cube2/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
% % % % % % MC_TMP empty Submodule – only for quick compilation….
Add_MC_cube(v) = add_block(‘MC_TMP2/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
end
posc = get(Add_MC_cube(v),’Position’);
set(Add_MC_cube(v),’Position’,posc + [100+(i-1)*colPos 100*(v-1)+45 100+(i-1)*colPos 100*(v-1)+45])
PH_Add_MC_cube{v,i}=get(Add_MC_cube(v),’PortHandles’);
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),’Autorouting’,’on’);
end
end
end
while connecting 2 module there is no problem/
But when increase above 2 module i gos an error message (above)..
please, see pic attached…
Thank for assist.
Tommy While I tried to collect lines in paralel, an error popup:
>> Battery_Array_tmp
Error using Battery_Array_tmp (line 33)
The first port already has a line connection
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),’Autorouting’,’on’);
end
Can someone assist to solve it?
I adding part of rellevant script:
%%%% Scriptto creat top design – withot Batteries/
%%%% only to speedup simulation time during debug Block connections
open_system(‘Battery_arc_tmp’)
mdl = ‘Battery_arc_tmp’;
battery_model = find_system(mdl,’FindAll’,’on’,’Name’,’Battery_arc_tmp’);
numRows = 3;
% Get handle to existing (external) POS and NEG ports
Plus_MC = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’POS’);
Minus_MC = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’NEG’);
%%% add MC_cube – basic String_unit:
for i=1:2 %% set two columns
colPos = 500; %% spaces between columns
for v=1:numRows %% loop for 5 String per column
nl=num2str(v + numRows*(i-1));
if i==1
% Add_MC_cube(v) = add_block(‘MC_Cube/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
% % % % % % MC_TMP empty Submodule – only for quick compilation….
Add_MC_cube(v) = add_block(‘MC_TMP/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
else
% Add_MC_cube(v) = add_block(‘MC_Cube2/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
% % % % % % MC_TMP empty Submodule – only for quick compilation….
Add_MC_cube(v) = add_block(‘MC_TMP2/STRING_MC_Cube 1’, [mdl,’/STRING_MC_Cube ‘,nl]);
end
posc = get(Add_MC_cube(v),’Position’);
set(Add_MC_cube(v),’Position’,posc + [100+(i-1)*colPos 100*(v-1)+45 100+(i-1)*colPos 100*(v-1)+45])
PH_Add_MC_cube{v,i}=get(Add_MC_cube(v),’PortHandles’);
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),’Autorouting’,’on’);
end
end
end
while connecting 2 module there is no problem/
But when increase above 2 module i gos an error message (above)..
please, see pic attached…
Thank for assist.
Tommy matlab, simulink MATLAB Answers — New Questions
quadgk AbsTol/RelTol parameters combinations
Dear network.
I am having trouble getting the desired result of an integral involving Bessel functions Jo and Yo.
Need your help with a powerful set of combinations of the AbsTol/RelTol parameters that will help me get a low-error result
This is the equation I am trying to solve, with t as a parameter:Dear network.
I am having trouble getting the desired result of an integral involving Bessel functions Jo and Yo.
Need your help with a powerful set of combinations of the AbsTol/RelTol parameters that will help me get a low-error result
This is the equation I am trying to solve, with t as a parameter: Dear network.
I am having trouble getting the desired result of an integral involving Bessel functions Jo and Yo.
Need your help with a powerful set of combinations of the AbsTol/RelTol parameters that will help me get a low-error result
This is the equation I am trying to solve, with t as a parameter: quadgk abstol reltol MATLAB Answers — New Questions