Month: December 2025
Training People to Use Microsoft 365 Copilot Effectively
Making Sure People Know How to Use Copilot
I don’t usually seek technology advice from taxation authorities, but a recent LinkedIn post explaining how the UK Revenue and Customs authority (HMRC) prepares people to use Microsoft 365 Copilot seems to take a sensible approach. The course uses a mixture of short video and reading over four modules to explain:
- An introduction to AI and Microsoft 365 Copilot (30 minutes).
- How to access Microsoft 365 Copilot (20 minutes).
- Writing effective prompts (15 minutes).
- Security and AI-generated hallucinations (15 minutes).
HMRC has 50,000 Microsoft 365 Copilot licenses, so they’ve made quite an investment ($18 million annually list price). Being good with figures, I’m sure that HMRC is keen on realizing a return on their investment, and that means making sure that people can use Copilot effectively to achieve measurable business outcomes. I’m sure that they’re measuring how people use Copilot to identify where people need some extra help and possibly to free up licenses for reassignment to other employees.
The Rapid Change of Copilot
One challenge for Copilot training is that Microsoft changes the Microsoft 365 Copilot chat app (BizChat) and the Copilot integrations with the Office apps so quickly. For example, here are four recent examples of changes to Copilot announced by Microsoft:
MC1193695 (10 December 2025): Introduction of natural language commands to allow Outlook users to triage busy inboxes. The supported options include pin/unpin messages, flag items, mark tasks as complete, and mark messages as read or unread.
MC1192003 (4 December 2025, Microsoft 365 roadmap item 532736): A model selector switch is available to allow users to select how much reasoning to apply when answering prompts. The options are automatic, quick response, and think deeper. Obviously, users need some guidance about when to go for quick responses and when it’s better to have Copilot reason a little deeper.
MC1187799 (last updated 26 November 2025). Tenants that enable the Anthrophic models (soon to be the norm) see new agents in Word, Excel, and PowerPoint to help working with content in these files. These are “frontier” options for now, but they will be core functionality in due course.
MC1189911 (25 November 2025): Users can schedule prompts to run automatically. Prompts created in BizChat and in agents like Analyst and Idea Coach can be scheduled to run automatically (Figure 1).

MC1197144 (15 December 2025): The inclusion of natural language calendar search in Microsoft 365 Copilot. The results include who attended a meeting and what was shared during an event.
Other topics, such as using BizChat to reason over the contents of a shared or delegate mailbox are of interest to people who need to interact with these types of mailboxes.
What’s obvious from the type and quantity of change is that follow up training is required to supplement a solid initial foundation. The training could be provided as short videos accessed through a SharePoint Online site or a Teams channel.
We’ve Been Here Before
The volume of change seen in Microsoft 365 Copilot (or indeed, across the agentic landscape within Microsoft 365) is reminiscent of Teams in the 2019-2023 period. At the time, Teams seemed to be adding new features or adjusting the user interface weekly, especially when the Covid-19 pandemic took hold and people had to work from home. The resulting spike in demand in Teams usage drove improvements in scalability alongside planned work on features like private and shared channels. It was an exciting time to work with Teams.
Teams is a pillar Microsoft 365 application, but Microsoft gives Teams precious little oxygen in terms of publicity in recent analyst briefings or large events. Microsoft last updated the number for Teams monthly active users (320 million) in October 2023. I can’t recall seeing much about Teams at the recent Ignite conference. The agenda was dominated by Copilot and agents to align with Microsoft marketing imperatives. Perhaps Copilot and agents will reach an equivalent state of banalness by 2029, or whenever Microsoft launches its next great campaign.
Training is Core to Success
In any case, the point is that good user training is an essential success factor for the deployment of any software application. This was true for Teams and it’s true for Microsoft 365 Copilot. Throwing someone a Copilot license and advising them to “get on with it” isn’t likely to succeed. That is, unless that person is an avid student that keeps themselves updated over time. There are few users in that category.
Keep up with the changing world of the Microsoft 365 ecosystem by subscribing to the Office 365 for IT Pros eBook. Monthly updates mean that our subscribers learn about new developments as they happen.
How do I uninstall the Network License Manager?
How do I uninstall the Network License Manager?How do I uninstall the Network License Manager? How do I uninstall the Network License Manager? MATLAB Answers — New Questions
How do I download a specific update level of MATLAB into a Docker container?
I’m trying to create a Docker container that has MATLAB installed in it. The images on Docker Hub seem to only download MATLAB at the latest update level. How can I put, for example, R2022b Update 3 into a container?I’m trying to create a Docker container that has MATLAB installed in it. The images on Docker Hub seem to only download MATLAB at the latest update level. How can I put, for example, R2022b Update 3 into a container? I’m trying to create a Docker container that has MATLAB installed in it. The images on Docker Hub seem to only download MATLAB at the latest update level. How can I put, for example, R2022b Update 3 into a container? MATLAB Answers — New Questions
How do I declare a multiline array?
Hello, I have a following problem:
I have to declare an array that is very long and splits into multiple lines. How can I divide it, so that Matlab knows it’s one array? Are there any separators I can use at the end of the line?
if true
y = [180 183 188 191 195 199 201 195 207 210 212 216 220 221 224
221 225 229 234 237 239 242 242 244 245 244 246 245 246 247 249
251 252 257 260 263 268 271 272 275 277 279 283 286 291 296 302
306 311 316]
endHello, I have a following problem:
I have to declare an array that is very long and splits into multiple lines. How can I divide it, so that Matlab knows it’s one array? Are there any separators I can use at the end of the line?
if true
y = [180 183 188 191 195 199 201 195 207 210 212 216 220 221 224
221 225 229 234 237 239 242 242 244 245 244 246 245 246 247 249
251 252 257 260 263 268 271 272 275 277 279 283 286 291 296 302
306 311 316]
end Hello, I have a following problem:
I have to declare an array that is very long and splits into multiple lines. How can I divide it, so that Matlab knows it’s one array? Are there any separators I can use at the end of the line?
if true
y = [180 183 188 191 195 199 201 195 207 210 212 216 220 221 224
221 225 229 234 237 239 242 242 244 245 244 246 245 246 247 249
251 252 257 260 263 268 271 272 275 277 279 283 286 291 296 302
306 311 316]
end multiline, array, split, separator MATLAB Answers — New Questions
The Exchange EnforcedTimestamps Mailbox Property
A Mailbox Property to Track Compliance
While playing with the new PowerShell capability to exclude mailboxes from retention holds, I came upon the EnforcedTimestamps mailbox property, which stores a JSON array of information about timestamps and events. For example:
Get-Mailbox -Identity Marty.King | Select-Object -ExpandProperty EnforcedTimestamps
[{"EventTimestamp":"2025-11-19T05:35:11.7811664Z","EnforcedUntilTimestamp":"2025-11-19T05:30:11.7811664Z","EventType":26},{"EventTimestamp":"2025-09-15T15:32:33.1507615Z","EnforcedUntilTimestamp":"2025-09-15T15:27:33.1507615Z","EventType":26}]
EnforcedTimestamps is not a property that I knew of, so it deserved some investigation. The starting point proved fruitless because Google search doesn’t reveal anything interesting about the topic. However, Microsoft 365 Copilot said:
“The EnforcedTimestamps property in Exchange Online mailboxes uses internal event types to record when compliance-related actions were enforced. These event types are not the same as message tracking log events—they’re specific to retention and hold enforcement.”
I asked Copilot where it found the information, and it replied:
“These mappings come from internal schema references and observed behavior in production tenants, combined with official descriptions of each compliance feature.”
Managed Folder Assistant Processing
After closer examination, it seems like the Managed Folder Assistant adds event and timestamps to mailboxes to help it keep track of the many different kinds of retention, litigation, and eDiscovery holds plus retention labels and Exchange compliance tags that it meets when it performs retention processing for mailboxes. The Managed Folder Assistant operates on a schedule that means each mailbox in the tenant should be processed at least once weekly. During processing, the assistant figures out what mailbox items should be kept and which items can be removed. It does so by resolving all the various holds that exist for the mailbox to ensure that no item is removed if it comes within the scope of a hold. As you’d expect, the assistant retains items based on the longest hold period.
The timestamps written into the mailbox for events helps the Managed Folder Assistant track when retention events happen and for how long the assistant should enforce the effect of the event, if necessary. For instance, if a hold is released from a mailbox, a delay hold stops items being deleted for 30 days to make sure that information isn’t immediately deleted and that administrators can recover if a hold is released in error.
Compliance Events
Without any formal Microsoft documentation, it’s hard to be precise about what each event means and how the timestamps are used by the Managed Folder Assistant. According to Copilot, the following events are recorded:
| Event | Event meaning |
| 1 | Retention hold applied to pause retention processing |
| 2 | Retention hold removed to allow normal retention processing to resume |
| 3 | Litigation hold enforced on mailbox |
| 4 | Litigation hold lifted from mailbox |
| 5 | Delay hold applied (grace period before items are removed) |
| 6 | Delay hold removed |
| 7 | Microsoft 365 retention policy applied to mailbox |
| 8 | Microsoft 365 retention policy removed from mailbox |
| 9 | Retention tag (label) applied to mailbox item |
| 10 | Retention tag (label) removed from mailbox item(s) |
| 11 | Calendar logging disabled |
| 12 | Calendar logging enabled |
| 13 | Mailbox audit enabled |
| 14 | Mailbox audit disabled |
| 15 | Single item recovery disabled |
| 16 | Single item recovery enabled |
| 17 | eDiscovery hold applied to mailbox |
| 18 | eDiscovery hold removed from mailbox |
| 26 | Legacy eDiscovery hold removed from mailbox |
I can’t testify to the accuracy of this information. Even after performing several actions on a mailbox, such as setting litigation hold on and off, or disabling single item recovery, nothing changed in the property. It might be that the Managed Folder Assistant must process the mailbox before the event information is updated. I tried that too by running the Start-ManagedFolderAssistant cmdlet, but nothing happened. Perhaps a specific parameter is required.
In any case, I wrote a script to report the EnforcedTimeStamps information for user mailboxes. You can download the script from GitHub. Figure 1 shows the output. One piece of information I found is that Exchange Online has recorded this information since at least May 2020, so obviously I haven’t been too observant (or curious) in the interim period.

An Exchange Online Secret
It’s always interesting (if a touch frustrating at times) to try and track down undocumented corners of Microsoft 365. I’m sure Microsoft will say that tenants don’t need to understand the function of the EnforceTimeStamps property and they’re probably right. But if that’s the case, why don’t they hide the information deep in the non-IPM part of the mailbox where lots of other internal information is stuffed away?
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.
Appdesigner specific file edition issue
After opening a specific .mlapp, each time I go back to the file tab inside appdesigner, I receive an dialog window : "The file has been modified outside of MATLAB Editor. Do you want to reload it?"
I have this problem only with one specific mlapp file. I have other mlapp files in the same directory for which this issue does not appear.
All these mlapp files are saved locally. They were created from guide apps, using Matlab migration tool.
This issue appears since the mlapp file creation with all the different Matlab releases I used since (R2025a on Linux now).After opening a specific .mlapp, each time I go back to the file tab inside appdesigner, I receive an dialog window : "The file has been modified outside of MATLAB Editor. Do you want to reload it?"
I have this problem only with one specific mlapp file. I have other mlapp files in the same directory for which this issue does not appear.
All these mlapp files are saved locally. They were created from guide apps, using Matlab migration tool.
This issue appears since the mlapp file creation with all the different Matlab releases I used since (R2025a on Linux now). After opening a specific .mlapp, each time I go back to the file tab inside appdesigner, I receive an dialog window : "The file has been modified outside of MATLAB Editor. Do you want to reload it?"
I have this problem only with one specific mlapp file. I have other mlapp files in the same directory for which this issue does not appear.
All these mlapp files are saved locally. They were created from guide apps, using Matlab migration tool.
This issue appears since the mlapp file creation with all the different Matlab releases I used since (R2025a on Linux now). appdesigner MATLAB Answers — New Questions
What are the “CA” and “CB” ports in the “Hybrid Stepper Motor” block for the Specialized Power Systems in Simscape R2024b?
I am trying to set up a 4-phase "Hybrid Stepper Motor". When I use a two-phase motor, I am able to connect it according to the documentation. However, when I try to use the four-phase variant, I see two additional ports "CA" and "CB" appear. However, I cannot find references on these ports or how to connect them in the "Stepper Motor" documentation. What is the physical interpretation of these ports?I am trying to set up a 4-phase "Hybrid Stepper Motor". When I use a two-phase motor, I am able to connect it according to the documentation. However, when I try to use the four-phase variant, I see two additional ports "CA" and "CB" appear. However, I cannot find references on these ports or how to connect them in the "Stepper Motor" documentation. What is the physical interpretation of these ports? I am trying to set up a 4-phase "Hybrid Stepper Motor". When I use a two-phase motor, I am able to connect it according to the documentation. However, when I try to use the four-phase variant, I see two additional ports "CA" and "CB" appear. However, I cannot find references on these ports or how to connect them in the "Stepper Motor" documentation. What is the physical interpretation of these ports? phasewinding, specializedpowersystems, simscapeelectrical, steppermotor MATLAB Answers — New Questions
How do I turn this Simulink model with Gain Control to Pole Placement?
Hi All
I have already calculated the gains for acceleration and velocity but my block is state space and gives displacement and velocity. I just dont know , what should I do with displacement, or should I leave disp and vel and only control acceleration with one gain or acc and vel ?? I have added 2 Zero pole blocks, which defined the new gains. but then It seems like State Space is not coincident with this methodHi All
I have already calculated the gains for acceleration and velocity but my block is state space and gives displacement and velocity. I just dont know , what should I do with displacement, or should I leave disp and vel and only control acceleration with one gain or acc and vel ?? I have added 2 Zero pole blocks, which defined the new gains. but then It seems like State Space is not coincident with this method Hi All
I have already calculated the gains for acceleration and velocity but my block is state space and gives displacement and velocity. I just dont know , what should I do with displacement, or should I leave disp and vel and only control acceleration with one gain or acc and vel ?? I have added 2 Zero pole blocks, which defined the new gains. but then It seems like State Space is not coincident with this method simulink, control MATLAB Answers — New Questions
How to read Audio File into Vector?
Hello, I have to read a Audio File (.wav) into a vector.
I know how to plot it:
info = audioinfo(‘sound.wav’);
[y, Fs] = audioread(‘sound.wav’);
t = 0:1/Fs:info.Duration;
t = t(1:end-1);
plot(t,y);
xlabel(‘Time’);
ylabel(‘Audio Signal’);
But this Sript does not read the Audio into a Vector.
I also tried to read every single Sample, but this is to complex and I get error after error. Is there a simple way to do this?Hello, I have to read a Audio File (.wav) into a vector.
I know how to plot it:
info = audioinfo(‘sound.wav’);
[y, Fs] = audioread(‘sound.wav’);
t = 0:1/Fs:info.Duration;
t = t(1:end-1);
plot(t,y);
xlabel(‘Time’);
ylabel(‘Audio Signal’);
But this Sript does not read the Audio into a Vector.
I also tried to read every single Sample, but this is to complex and I get error after error. Is there a simple way to do this? Hello, I have to read a Audio File (.wav) into a vector.
I know how to plot it:
info = audioinfo(‘sound.wav’);
[y, Fs] = audioread(‘sound.wav’);
t = 0:1/Fs:info.Duration;
t = t(1:end-1);
plot(t,y);
xlabel(‘Time’);
ylabel(‘Audio Signal’);
But this Sript does not read the Audio into a Vector.
I also tried to read every single Sample, but this is to complex and I get error after error. Is there a simple way to do this? vector, audio, sound MATLAB Answers — New Questions
Building Toolbox in cI with matlab runtime
Hello experts
I am trying to automate my toolbox creation in gitlab ci and trying to find the best way to do this.
I looked at using the matlab runtime docker for my purpose, looking at the documentation it says matlab runtime docker is used for executing matlab apps, can i also use it to build the toolbox?
Do i need to use the matlab docker with license to build the toolbox?
Is there a lighter matlab installation that serves the purpose?
Any guidance will be appreciated.
ThanksHello experts
I am trying to automate my toolbox creation in gitlab ci and trying to find the best way to do this.
I looked at using the matlab runtime docker for my purpose, looking at the documentation it says matlab runtime docker is used for executing matlab apps, can i also use it to build the toolbox?
Do i need to use the matlab docker with license to build the toolbox?
Is there a lighter matlab installation that serves the purpose?
Any guidance will be appreciated.
Thanks Hello experts
I am trying to automate my toolbox creation in gitlab ci and trying to find the best way to do this.
I looked at using the matlab runtime docker for my purpose, looking at the documentation it says matlab runtime docker is used for executing matlab apps, can i also use it to build the toolbox?
Do i need to use the matlab docker with license to build the toolbox?
Is there a lighter matlab installation that serves the purpose?
Any guidance will be appreciated.
Thanks toolbox, cli MATLAB Answers — New Questions
How to Report DLP Alerts
Use the Graph API to Report Information about DLP Alerts
MC1169572 (10 October 2025, Microsoft 365 roadmap item 511795) announced a new ability for administrators to add classifications to DLP alerts. The update should now be available in all tenants.
DLP signals alerts when policy rules detect a violation. The update allows administrators to note if the alert is a false positive, true positive, or benign positive (one that you don’t need to worry about) when reviewing the status of alerts (Figure 1). Although I could update the classifier for DLP alerts, any attempt to update the comments for an alert through the UX failed.

Alerts generated for DLP events are synchronized bi-directionally with Defender.
Tenant don’t have to classify events, but MC1169572 says that tenants can “use the classification property to enhance reporting and incident response.” Which then creates the question of how to report DLP alerts.
The Graph Alert Resource Type
The answer is that alert data is available through the alert resource type from the Graph Security API. For example, this Graph request against the alerts_v2 endpoint filters on the serviceSource property to find the set of DLP alerts. We can see the classification entered for the alert.
$Uri = "https://graph.microsoft.com/v1.0/security/alerts_v2?`$filter=serviceSource eq 'DataLossPrevention'&`$orderby=createdDateTime desc&`$top=200" [array]$Alerts = Invoke-MgGraphRequest -Method GET -Uri $Uri -OutputType PSObject $Alerts = $Alerts.Value $Alerts | Format-Table ServiceSource, CreatedDateTime, Title, Classification serviceSource createdDateTime title classification ------------- --------------- ----- -------------- dataLossPrevention 11/12/2025 14:41:47 DLP-Block Confidential Documents truePositive dataLossPrevention 20/11/2025 01:33:40 DLP-DLP Policy for Sensitive Data 1 dataLossPrevention 20/11/2025 01:27:41 DLP-DLP Policy for Sensitive Data 1 dataLossPrevention 20/11/2025 01:26:09 DLP-DLP Policy for Sensitive Data 1
The Alerts resource caters for alerts generated by many other solutions, including Defender for Identity, Defender for Cloud Apps, Defender for Office 365, App governance, threat intelligence, and so on.
Working with DLP Alerts via the Microsoft Graph PowerShell SDK
Graph API requests can also be made through Microsoft Graph PowerShell SDK cmdlets. In this case, the Get-MgSecurityAlertV2 cmdlet (from the Microsoft.Graph.Security module) does the same job as the request discussed above.
Before attempting to work with security alerts, make sure that the signed in account is a security administrator and that the delegated SecurityAlert.Read.All permission (scope) is available:
[array]$DLPAlerts = Get-MgSecurityAlertV2 -Filter "serviceSource eq 'dataLossPrevention'" -PageSize 500 -All -Sort "CreatedDateTime Desc" $DLPAlerts | Format-Table ServiceSource, CreatedDateTime, Title, Classification ServiceSource CreatedDateTime Title Classification ------------- --------------- ----- -------------- dataLossPrevention 11/12/2025 14:41:47 DLP-Block Confidential Documents truePositive dataLossPrevention 20/11/2025 01:33:40 DLP-DLP Policy for Sensitive Data 1 dataLossPrevention 20/11/2025 01:27:41 DLP-DLP Policy for Sensitive Data 1 dataLossPrevention 20/11/2025 01:26:09 DLP-DLP Policy for Sensitive Data 1
Note: after updating an alert with a classification, it takes a few seconds before the update appears in the alert record available through the Graph.
Updating a DLP Alert with PowerShell
It’s also possible to set a classification for an alert with the Update-MgSecurityAlertV2 cmdlet. In this example, a hash table holds several properties as input to update an alert, including the classification.
$AlertId = $DLPAlerts[1].Id
$Parameters = @{}
$Parameters.Add("determination", "other")
$Parameters.Add("status", "inProgress")
$Parameters.Add("assignedTo", "Hans.Geering@office365itpros.com")
$Parameters.Add("classification", "truePositive")
Update-MgSecurityAlertV2 -AlertId $AlertId -BodyParameter $Parameters
Reporting DLP Alerts
Once we know how to retrieve DLP alerts, it’s easy to create a basic report. Figure 2 shows the result:
$Report = [System.Collections.Generic.List[Object]]::new()
ForEach ($Alert in $DLPAlerts) {
If ($Alert.LastUpdateDateTime) { $LastUpdated = Get-Date $Alert.LastUpdateDateTime -Format 'dd-MMM-yyyy HH:mm'
} Else {
$LastUpdated = "N/A"
}
$ReportLine = [PSCustomObject][Ordered]@{
Id = $Alert.id
Title = $Alert.title
CreatedDateTime = Get-Date $Alert.createdDateTime -Format 'dd-MMM-yyyy HH:mm'
Severity = $Alert.severity
Status = $Alert.status
Category = $Alert.category
AssignedTo = $Alert.AssignedTo
LastUpdateDateTime = $LastUpdated
Classification = $Alert.classification
}
$Report.Add($ReportLine)
}

I hate seeing something in a message center notification that I can’t quite figure out how to do. I’ve never really thought about working with DLP alerts through PowerShell in the past, but I’m glad that the addition of administrator-controlled classifications to DLP alerts prompted me to check out how to report this information.
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.
matlab -batch on SLURM prints errors when HOME is shared across many nodes
When launching MATLAB in batch mode on a SLURM cluster, stderr shows:
terminate called after throwing an instance of ‘matlabconnector::installationsregistry::InstallationsRegistryError’
what(): InstallationsRegistry:getMatlabConnectorVersion: More than one MATLAB Connector records were found
This appears during startup (even for a simple command like matlab -batch "disp(version); exit").
sbatch command (PROGLIST=/work/share/…/matlab2024a/bin/matlab):
srun "$PROGLIST" -batch "$CMD"
Find files in ~/.MATLABConnector as below:
~/.MATLABConnector/b01r2n13/LatestInstall.info
~/.MATLABConnector/b01r2n13/UpdatePending.json
~/.MATLABConnector/b01r2n13/locks
~/.MATLABConnector/b02r2n01/LatestInstall.info
~/.MATLABConnector/b02r2n01/UpdatePending.json
~/.MATLABConnector/b02r2n01/locks
…
Questions
Is this a known issue with MATLAB Connector on HPC systems where $HOME is shared across many nodes?
How to prevent MATLAB from throwing this error at startup?When launching MATLAB in batch mode on a SLURM cluster, stderr shows:
terminate called after throwing an instance of ‘matlabconnector::installationsregistry::InstallationsRegistryError’
what(): InstallationsRegistry:getMatlabConnectorVersion: More than one MATLAB Connector records were found
This appears during startup (even for a simple command like matlab -batch "disp(version); exit").
sbatch command (PROGLIST=/work/share/…/matlab2024a/bin/matlab):
srun "$PROGLIST" -batch "$CMD"
Find files in ~/.MATLABConnector as below:
~/.MATLABConnector/b01r2n13/LatestInstall.info
~/.MATLABConnector/b01r2n13/UpdatePending.json
~/.MATLABConnector/b01r2n13/locks
~/.MATLABConnector/b02r2n01/LatestInstall.info
~/.MATLABConnector/b02r2n01/UpdatePending.json
~/.MATLABConnector/b02r2n01/locks
…
Questions
Is this a known issue with MATLAB Connector on HPC systems where $HOME is shared across many nodes?
How to prevent MATLAB from throwing this error at startup? When launching MATLAB in batch mode on a SLURM cluster, stderr shows:
terminate called after throwing an instance of ‘matlabconnector::installationsregistry::InstallationsRegistryError’
what(): InstallationsRegistry:getMatlabConnectorVersion: More than one MATLAB Connector records were found
This appears during startup (even for a simple command like matlab -batch "disp(version); exit").
sbatch command (PROGLIST=/work/share/…/matlab2024a/bin/matlab):
srun "$PROGLIST" -batch "$CMD"
Find files in ~/.MATLABConnector as below:
~/.MATLABConnector/b01r2n13/LatestInstall.info
~/.MATLABConnector/b01r2n13/UpdatePending.json
~/.MATLABConnector/b01r2n13/locks
~/.MATLABConnector/b02r2n01/LatestInstall.info
~/.MATLABConnector/b02r2n01/UpdatePending.json
~/.MATLABConnector/b02r2n01/locks
…
Questions
Is this a known issue with MATLAB Connector on HPC systems where $HOME is shared across many nodes?
How to prevent MATLAB from throwing this error at startup? linux, batch MATLAB Answers — New Questions
This simulation is given from website but i am unable to understand how these blocks and subsystem works togather , can anyone explain briefly
Post Content Post Content dfig npc converter MATLAB Answers — New Questions
Construct voronoi diagram on a point cloud
I have a point cloud file in the .pcd format. I want to calculate a Voronoi diagram for this .pcd file. I also have a set of points with x and y coordinates that were extracted from the .pcd file. I want to calculate the Voronoi diagram based on these x and y coordinates. My objective is to divide the point cloud into zones corresponding to these points (x, y). So far, I have written the following code but it seems like there is no connection between the point cloud and x-y coordinates. How can I relate the point cloud and the co ordinates?
ptCloud = pcread("test_obj6.pcd");
x = [ 7.0267 4.8436 4.8767 2.8000];
y = [ 4.2001 4.5947 2.1412 3.2000];
voronoi(x,y)I have a point cloud file in the .pcd format. I want to calculate a Voronoi diagram for this .pcd file. I also have a set of points with x and y coordinates that were extracted from the .pcd file. I want to calculate the Voronoi diagram based on these x and y coordinates. My objective is to divide the point cloud into zones corresponding to these points (x, y). So far, I have written the following code but it seems like there is no connection between the point cloud and x-y coordinates. How can I relate the point cloud and the co ordinates?
ptCloud = pcread("test_obj6.pcd");
x = [ 7.0267 4.8436 4.8767 2.8000];
y = [ 4.2001 4.5947 2.1412 3.2000];
voronoi(x,y) I have a point cloud file in the .pcd format. I want to calculate a Voronoi diagram for this .pcd file. I also have a set of points with x and y coordinates that were extracted from the .pcd file. I want to calculate the Voronoi diagram based on these x and y coordinates. My objective is to divide the point cloud into zones corresponding to these points (x, y). So far, I have written the following code but it seems like there is no connection between the point cloud and x-y coordinates. How can I relate the point cloud and the co ordinates?
ptCloud = pcread("test_obj6.pcd");
x = [ 7.0267 4.8436 4.8767 2.8000];
y = [ 4.2001 4.5947 2.1412 3.2000];
voronoi(x,y) matlab MATLAB Answers — New Questions
How Does interp1 Work if the Sample Points are not Monotonic?
Forever I’ve thought that the sample points input to @doc:interp1 have to be distinct AND monotonic. But I just saw on the doc page that distinct is the only requirement.
For example:
matlabRelease
x = [1,3,0,2]; % not monotonic
y = sin(x);
xq = 1.5;
yi = interp1(x,y,xq)
I’m quite surprised by this result.
Does interp1 sort the sample points and reorder the sample values if the sample points are not monotonic?
The same answer is obtained:
isequal(yi,interp1(sort(x),sin(sort(x)),xq))Forever I’ve thought that the sample points input to @doc:interp1 have to be distinct AND monotonic. But I just saw on the doc page that distinct is the only requirement.
For example:
matlabRelease
x = [1,3,0,2]; % not monotonic
y = sin(x);
xq = 1.5;
yi = interp1(x,y,xq)
I’m quite surprised by this result.
Does interp1 sort the sample points and reorder the sample values if the sample points are not monotonic?
The same answer is obtained:
isequal(yi,interp1(sort(x),sin(sort(x)),xq)) Forever I’ve thought that the sample points input to @doc:interp1 have to be distinct AND monotonic. But I just saw on the doc page that distinct is the only requirement.
For example:
matlabRelease
x = [1,3,0,2]; % not monotonic
y = sin(x);
xq = 1.5;
yi = interp1(x,y,xq)
I’m quite surprised by this result.
Does interp1 sort the sample points and reorder the sample values if the sample points are not monotonic?
The same answer is obtained:
isequal(yi,interp1(sort(x),sin(sort(x)),xq)) interp1, montonic, sample points MATLAB Answers — New Questions
How to run “Use FPGA I/O to Communicate with FPGA” example in a repetitive For-Loop?
Hi,
For the example “Use FPGA I/O to Communicate with FPGA”, I followed all the documented steps exactly. I was able to generate the bitstream for the ZCU102 with FMCOM2/3 and successfully program the board using the generated bitstream.
Next, I copied the MATLAB code from the example page and ran it to transmit and receive a chirp signal using RF loopback. I can observe both the TX and RX power correctly. When I run the code a single time, it works as expected and I obtain the correct input and output signals.
However, I need to run this example inside a for-loop to transmit and receive data multiple times. I understand that on the rising edge of the "txStart" signal, TVALID pulses are generated on both the TX and RX sides. In the for-loop, the start signal is toggled by writing 1 and then 0, and the stream write and stream read operations are also executed.
I have tried different combinations of toggling the start signal and performing the stream read/write operations, but the behavior is not correct. Specifically, only one out of every three iterations receives the data correctly. you can find attached one of the multiple codes that I tried.
Could you please provide a MATLAB .m script that works correctly with this example when executed inside a for-loop? Are you able to send and receive data properly multiple times?
Thanks.Hi,
For the example “Use FPGA I/O to Communicate with FPGA”, I followed all the documented steps exactly. I was able to generate the bitstream for the ZCU102 with FMCOM2/3 and successfully program the board using the generated bitstream.
Next, I copied the MATLAB code from the example page and ran it to transmit and receive a chirp signal using RF loopback. I can observe both the TX and RX power correctly. When I run the code a single time, it works as expected and I obtain the correct input and output signals.
However, I need to run this example inside a for-loop to transmit and receive data multiple times. I understand that on the rising edge of the "txStart" signal, TVALID pulses are generated on both the TX and RX sides. In the for-loop, the start signal is toggled by writing 1 and then 0, and the stream write and stream read operations are also executed.
I have tried different combinations of toggling the start signal and performing the stream read/write operations, but the behavior is not correct. Specifically, only one out of every three iterations receives the data correctly. you can find attached one of the multiple codes that I tried.
Could you please provide a MATLAB .m script that works correctly with this example when executed inside a for-loop? Are you able to send and receive data properly multiple times?
Thanks. Hi,
For the example “Use FPGA I/O to Communicate with FPGA”, I followed all the documented steps exactly. I was able to generate the bitstream for the ZCU102 with FMCOM2/3 and successfully program the board using the generated bitstream.
Next, I copied the MATLAB code from the example page and ran it to transmit and receive a chirp signal using RF loopback. I can observe both the TX and RX power correctly. When I run the code a single time, it works as expected and I obtain the correct input and output signals.
However, I need to run this example inside a for-loop to transmit and receive data multiple times. I understand that on the rising edge of the "txStart" signal, TVALID pulses are generated on both the TX and RX sides. In the for-loop, the start signal is toggled by writing 1 and then 0, and the stream write and stream read operations are also executed.
I have tried different combinations of toggling the start signal and performing the stream read/write operations, but the behavior is not correct. Specifically, only one out of every three iterations receives the data correctly. you can find attached one of the multiple codes that I tried.
Could you please provide a MATLAB .m script that works correctly with this example when executed inside a for-loop? Are you able to send and receive data properly multiple times?
Thanks. hdl coder, zcu102, fmcomm2 MATLAB Answers — New Questions
Where to find the default HDL project for ZedBoard or ZCU102 FMCOMMS2/3/4 Xilinx Zynq-Based Radio Linux image?
Hi,
The Communications Toolbox Support Package for Xilinx Zynq-Based Radio uses a default operating system image, which is written to the SD card during the Hardware Setup process.
My question is: where can I find the HDL Coder (or Vivado) project that generates the same FPGA bitstream (system.bit) used in this default Linux image?
More specifically, I am looking for a MATLAB/HDL-based reference project that produces exactly the same bitstream as the one included in the prebuilt Linux image provided by the support package, and then I can program my target with that.
Is this reference HDL project available to users?
If not, is there documentation describing how the default bitstream was generated and how to reproduce it?
Thank you.Hi,
The Communications Toolbox Support Package for Xilinx Zynq-Based Radio uses a default operating system image, which is written to the SD card during the Hardware Setup process.
My question is: where can I find the HDL Coder (or Vivado) project that generates the same FPGA bitstream (system.bit) used in this default Linux image?
More specifically, I am looking for a MATLAB/HDL-based reference project that produces exactly the same bitstream as the one included in the prebuilt Linux image provided by the support package, and then I can program my target with that.
Is this reference HDL project available to users?
If not, is there documentation describing how the default bitstream was generated and how to reproduce it?
Thank you. Hi,
The Communications Toolbox Support Package for Xilinx Zynq-Based Radio uses a default operating system image, which is written to the SD card during the Hardware Setup process.
My question is: where can I find the HDL Coder (or Vivado) project that generates the same FPGA bitstream (system.bit) used in this default Linux image?
More specifically, I am looking for a MATLAB/HDL-based reference project that produces exactly the same bitstream as the one included in the prebuilt Linux image provided by the support package, and then I can program my target with that.
Is this reference HDL project available to users?
If not, is there documentation describing how the default bitstream was generated and how to reproduce it?
Thank you. hdl coder, zcu102, xilinx based readio, fcomms2 MATLAB Answers — New Questions
How to generate orthogonal X-ray Projection, Digitally Reconstructed Radiographs (DRR), from a particular CT volume
Hello everyone,
I am simulating Orthogonal X-ray Projection, specifically Digitally Reconstructed Radiographs (DRR), from a particular CT volume.
To accomplish this, I first created a CT volume and then used the "generateOptimizedXrayProjections" function to produce DRR for both the anteroposterior (AP) and lateral projections.
1. To view the results from this process, please refer to lines 34-35 and line 53. When I run this simulation, I can see the DRR results.
2. However, when I used a real CT image (lines 38-39 and line 54), the generated DRR appeared completely dark.
My goal is to generate a DRR from a real CT image, such as CT_13.nii.gz.
I would greatly appreciate any insights or suggestions regarding this code.
Attached below are the MATLAB code (zip file) for reference.
Thank you!Hello everyone,
I am simulating Orthogonal X-ray Projection, specifically Digitally Reconstructed Radiographs (DRR), from a particular CT volume.
To accomplish this, I first created a CT volume and then used the "generateOptimizedXrayProjections" function to produce DRR for both the anteroposterior (AP) and lateral projections.
1. To view the results from this process, please refer to lines 34-35 and line 53. When I run this simulation, I can see the DRR results.
2. However, when I used a real CT image (lines 38-39 and line 54), the generated DRR appeared completely dark.
My goal is to generate a DRR from a real CT image, such as CT_13.nii.gz.
I would greatly appreciate any insights or suggestions regarding this code.
Attached below are the MATLAB code (zip file) for reference.
Thank you! Hello everyone,
I am simulating Orthogonal X-ray Projection, specifically Digitally Reconstructed Radiographs (DRR), from a particular CT volume.
To accomplish this, I first created a CT volume and then used the "generateOptimizedXrayProjections" function to produce DRR for both the anteroposterior (AP) and lateral projections.
1. To view the results from this process, please refer to lines 34-35 and line 53. When I run this simulation, I can see the DRR results.
2. However, when I used a real CT image (lines 38-39 and line 54), the generated DRR appeared completely dark.
My goal is to generate a DRR from a real CT image, such as CT_13.nii.gz.
I would greatly appreciate any insights or suggestions regarding this code.
Attached below are the MATLAB code (zip file) for reference.
Thank you! drr, digitally reconstructed radiographs, x-ray projection MATLAB Answers — New Questions
Linear interpolation with interp1 is slow: How to improve run times?
I wrote a MWE to compare the perforance of interp1 (MATLAB built-in) with my custom interp1_scal (for linear interpolation), using a simple dynamic programming problem solved with value function iteration
$$ V(k) = max_{k’} log(k^alpha-k’)+beta*V(k’) $$
Question 1: I am a bit surprised that the custom interpolation routine I wrote is much faster than the built-in interp1 for linear interpolation (on my laptop with R2024b, it is 4 times faster, here (RUN button) the speed advantage is smaller but still significant). To find the location of the query point xi on the x grid, I am using binary search (see function locate), directly translated from an older Fortran/C routine.
Question 2: Am I using interp1 in the wrong way? would using griddedInterp or other Matlab routines significantly improve run times of this MWE?
Any help, suggestions or comments is greatly appreciated!
P.S. I am glad to provide additional info on the dynamic programming problem that this simple MWE is meant to caputure in few lines of code, if someone asks for.
Minimum Working Example here:
clear,clc,close all
%% Parameters
maxit = 50;
tol = 1e-5;
alpha = 0.33;
beta = 0.96;
k_ss = (alpha * beta)^(1 / (1 – alpha));
n_k = 300;
k_min = 0.5 * k_ss;
k_max = 1.5 * k_ss;
k_grid = linspace(k_min, k_max, n_k)’;
% Precompute output y = k^alpha
y_grid = k_grid .^ alpha;
%% Method 1: value function iteration with Matlab built-in interpolation
tic
% Initialization
V0 = zeros(n_k, 1);
V1 = zeros(n_k, 1);
% Value Function Iteration
for iter=1:maxit
for i = 1:n_k
y_val = y_grid(i);
k_max_now = min(y_val, k_max); % upper bound for Brent minimization
% Objective function (negative value for minimization)
obj = @(kp) -(log(y_val-kp) + beta*interp1(k_grid,V0,kp,’linear’));
% Optimal policy
kp_opt = fminbnd(obj, k_min, k_max_now);
% Updated value function
V1(i) = -obj(kp_opt);
end
% Convergence check
err = max(abs(V1 – V0));
V0 = V1;
end %end iter
time_vfi1=toc;
%% Method 2: value function iteration with *custom* interpolation
tic
% Initialization
V0 = zeros(n_k, 1);
V2 = zeros(n_k, 1);
% Value Function Iteration
for iter=1:maxit
for i_k = 1:n_k
y_val = y_grid(i_k);
k_max_now = min(y_val, k_max);
% Objective function (negative value for minimization)
obj = @(kp) -( log(y_val-kp) + beta*interp1_scal(k_grid,V0,kp) );
% Optimal policy
kp_opt = fminbnd(obj, k_min, k_max_now);
% Updated value function
V2(i_k) = -obj(kp_opt);
end
% Convergence check
err = max(abs(V2 – V0));
V0 = V2;
end %end iter
time_vfi2=toc;
%% Compare vfi1 and vfi2
err_V = max(abs(V1-V2));
disp(‘RESULTS OF COMPARISON’)
fprintf(‘||V1-V2|| = %f n’,err_V)
fprintf(‘Run time of vfi1 with Matlab interp = %f n’,time_vfi1)
fprintf(‘Run time of vfi2 with custom interp = %f n’,time_vfi2)
fprintf(‘time vfi1 / time_vfi2 = %f n’,time_vfi1/time_vfi2)
%% Plot value function
figure;
plot(k_grid, V1, ‘LineWidth’, 1.5);
hold on
plot(k_grid, V2, ‘LineWidth’, 1.5);
legend(‘V1′,’V2’)
xlabel(‘Current capital’);
grid on;
% Fast linear interpolation routine
% Usage:
% yi = interp1_scal(x,y,xi)
% where x and y are column vectors with n elements, xi is a scalar
% and yi is a scalar
% Input Arguments
% x – Sample points
% column vector
% Y – Sample data
% column vector
% xi – Query point
% scalar
function yi = interp1_scal(x,y,xi)
n = size(x,1);
j = locate(x,xi);
j = max(min(j,n-1),1);
slope = (y(j+1)-y(j))/(x(j+1)-x(j));
yi = y(j)+(xi-x(j))*slope;
end %end function interp1_scal
function jl = locate(xx,x)
%function jl = locate(xx,x)
%
% x is between xx(jl) and xx(jl+1)
%
% jl = 0 and jl = n means x is out of range
%
% xx is assumed to be monotone increasing
n = length(xx);
if x<xx(1)
jl = 0;
elseif x>xx(n)
jl = n;
else
jl = 1;
ju = n;
while (ju-jl>1)
jm = floor((ju+jl)/2);
if x>=xx(jm)
jl = jm;
else
ju=jm;
end
end
end
end %end function locateI wrote a MWE to compare the perforance of interp1 (MATLAB built-in) with my custom interp1_scal (for linear interpolation), using a simple dynamic programming problem solved with value function iteration
$$ V(k) = max_{k’} log(k^alpha-k’)+beta*V(k’) $$
Question 1: I am a bit surprised that the custom interpolation routine I wrote is much faster than the built-in interp1 for linear interpolation (on my laptop with R2024b, it is 4 times faster, here (RUN button) the speed advantage is smaller but still significant). To find the location of the query point xi on the x grid, I am using binary search (see function locate), directly translated from an older Fortran/C routine.
Question 2: Am I using interp1 in the wrong way? would using griddedInterp or other Matlab routines significantly improve run times of this MWE?
Any help, suggestions or comments is greatly appreciated!
P.S. I am glad to provide additional info on the dynamic programming problem that this simple MWE is meant to caputure in few lines of code, if someone asks for.
Minimum Working Example here:
clear,clc,close all
%% Parameters
maxit = 50;
tol = 1e-5;
alpha = 0.33;
beta = 0.96;
k_ss = (alpha * beta)^(1 / (1 – alpha));
n_k = 300;
k_min = 0.5 * k_ss;
k_max = 1.5 * k_ss;
k_grid = linspace(k_min, k_max, n_k)’;
% Precompute output y = k^alpha
y_grid = k_grid .^ alpha;
%% Method 1: value function iteration with Matlab built-in interpolation
tic
% Initialization
V0 = zeros(n_k, 1);
V1 = zeros(n_k, 1);
% Value Function Iteration
for iter=1:maxit
for i = 1:n_k
y_val = y_grid(i);
k_max_now = min(y_val, k_max); % upper bound for Brent minimization
% Objective function (negative value for minimization)
obj = @(kp) -(log(y_val-kp) + beta*interp1(k_grid,V0,kp,’linear’));
% Optimal policy
kp_opt = fminbnd(obj, k_min, k_max_now);
% Updated value function
V1(i) = -obj(kp_opt);
end
% Convergence check
err = max(abs(V1 – V0));
V0 = V1;
end %end iter
time_vfi1=toc;
%% Method 2: value function iteration with *custom* interpolation
tic
% Initialization
V0 = zeros(n_k, 1);
V2 = zeros(n_k, 1);
% Value Function Iteration
for iter=1:maxit
for i_k = 1:n_k
y_val = y_grid(i_k);
k_max_now = min(y_val, k_max);
% Objective function (negative value for minimization)
obj = @(kp) -( log(y_val-kp) + beta*interp1_scal(k_grid,V0,kp) );
% Optimal policy
kp_opt = fminbnd(obj, k_min, k_max_now);
% Updated value function
V2(i_k) = -obj(kp_opt);
end
% Convergence check
err = max(abs(V2 – V0));
V0 = V2;
end %end iter
time_vfi2=toc;
%% Compare vfi1 and vfi2
err_V = max(abs(V1-V2));
disp(‘RESULTS OF COMPARISON’)
fprintf(‘||V1-V2|| = %f n’,err_V)
fprintf(‘Run time of vfi1 with Matlab interp = %f n’,time_vfi1)
fprintf(‘Run time of vfi2 with custom interp = %f n’,time_vfi2)
fprintf(‘time vfi1 / time_vfi2 = %f n’,time_vfi1/time_vfi2)
%% Plot value function
figure;
plot(k_grid, V1, ‘LineWidth’, 1.5);
hold on
plot(k_grid, V2, ‘LineWidth’, 1.5);
legend(‘V1′,’V2’)
xlabel(‘Current capital’);
grid on;
% Fast linear interpolation routine
% Usage:
% yi = interp1_scal(x,y,xi)
% where x and y are column vectors with n elements, xi is a scalar
% and yi is a scalar
% Input Arguments
% x – Sample points
% column vector
% Y – Sample data
% column vector
% xi – Query point
% scalar
function yi = interp1_scal(x,y,xi)
n = size(x,1);
j = locate(x,xi);
j = max(min(j,n-1),1);
slope = (y(j+1)-y(j))/(x(j+1)-x(j));
yi = y(j)+(xi-x(j))*slope;
end %end function interp1_scal
function jl = locate(xx,x)
%function jl = locate(xx,x)
%
% x is between xx(jl) and xx(jl+1)
%
% jl = 0 and jl = n means x is out of range
%
% xx is assumed to be monotone increasing
n = length(xx);
if x<xx(1)
jl = 0;
elseif x>xx(n)
jl = n;
else
jl = 1;
ju = n;
while (ju-jl>1)
jm = floor((ju+jl)/2);
if x>=xx(jm)
jl = jm;
else
ju=jm;
end
end
end
end %end function locate I wrote a MWE to compare the perforance of interp1 (MATLAB built-in) with my custom interp1_scal (for linear interpolation), using a simple dynamic programming problem solved with value function iteration
$$ V(k) = max_{k’} log(k^alpha-k’)+beta*V(k’) $$
Question 1: I am a bit surprised that the custom interpolation routine I wrote is much faster than the built-in interp1 for linear interpolation (on my laptop with R2024b, it is 4 times faster, here (RUN button) the speed advantage is smaller but still significant). To find the location of the query point xi on the x grid, I am using binary search (see function locate), directly translated from an older Fortran/C routine.
Question 2: Am I using interp1 in the wrong way? would using griddedInterp or other Matlab routines significantly improve run times of this MWE?
Any help, suggestions or comments is greatly appreciated!
P.S. I am glad to provide additional info on the dynamic programming problem that this simple MWE is meant to caputure in few lines of code, if someone asks for.
Minimum Working Example here:
clear,clc,close all
%% Parameters
maxit = 50;
tol = 1e-5;
alpha = 0.33;
beta = 0.96;
k_ss = (alpha * beta)^(1 / (1 – alpha));
n_k = 300;
k_min = 0.5 * k_ss;
k_max = 1.5 * k_ss;
k_grid = linspace(k_min, k_max, n_k)’;
% Precompute output y = k^alpha
y_grid = k_grid .^ alpha;
%% Method 1: value function iteration with Matlab built-in interpolation
tic
% Initialization
V0 = zeros(n_k, 1);
V1 = zeros(n_k, 1);
% Value Function Iteration
for iter=1:maxit
for i = 1:n_k
y_val = y_grid(i);
k_max_now = min(y_val, k_max); % upper bound for Brent minimization
% Objective function (negative value for minimization)
obj = @(kp) -(log(y_val-kp) + beta*interp1(k_grid,V0,kp,’linear’));
% Optimal policy
kp_opt = fminbnd(obj, k_min, k_max_now);
% Updated value function
V1(i) = -obj(kp_opt);
end
% Convergence check
err = max(abs(V1 – V0));
V0 = V1;
end %end iter
time_vfi1=toc;
%% Method 2: value function iteration with *custom* interpolation
tic
% Initialization
V0 = zeros(n_k, 1);
V2 = zeros(n_k, 1);
% Value Function Iteration
for iter=1:maxit
for i_k = 1:n_k
y_val = y_grid(i_k);
k_max_now = min(y_val, k_max);
% Objective function (negative value for minimization)
obj = @(kp) -( log(y_val-kp) + beta*interp1_scal(k_grid,V0,kp) );
% Optimal policy
kp_opt = fminbnd(obj, k_min, k_max_now);
% Updated value function
V2(i_k) = -obj(kp_opt);
end
% Convergence check
err = max(abs(V2 – V0));
V0 = V2;
end %end iter
time_vfi2=toc;
%% Compare vfi1 and vfi2
err_V = max(abs(V1-V2));
disp(‘RESULTS OF COMPARISON’)
fprintf(‘||V1-V2|| = %f n’,err_V)
fprintf(‘Run time of vfi1 with Matlab interp = %f n’,time_vfi1)
fprintf(‘Run time of vfi2 with custom interp = %f n’,time_vfi2)
fprintf(‘time vfi1 / time_vfi2 = %f n’,time_vfi1/time_vfi2)
%% Plot value function
figure;
plot(k_grid, V1, ‘LineWidth’, 1.5);
hold on
plot(k_grid, V2, ‘LineWidth’, 1.5);
legend(‘V1′,’V2’)
xlabel(‘Current capital’);
grid on;
% Fast linear interpolation routine
% Usage:
% yi = interp1_scal(x,y,xi)
% where x and y are column vectors with n elements, xi is a scalar
% and yi is a scalar
% Input Arguments
% x – Sample points
% column vector
% Y – Sample data
% column vector
% xi – Query point
% scalar
function yi = interp1_scal(x,y,xi)
n = size(x,1);
j = locate(x,xi);
j = max(min(j,n-1),1);
slope = (y(j+1)-y(j))/(x(j+1)-x(j));
yi = y(j)+(xi-x(j))*slope;
end %end function interp1_scal
function jl = locate(xx,x)
%function jl = locate(xx,x)
%
% x is between xx(jl) and xx(jl+1)
%
% jl = 0 and jl = n means x is out of range
%
% xx is assumed to be monotone increasing
n = length(xx);
if x<xx(1)
jl = 0;
elseif x>xx(n)
jl = n;
else
jl = 1;
ju = n;
while (ju-jl>1)
jm = floor((ju+jl)/2);
if x>=xx(jm)
jl = jm;
else
ju=jm;
end
end
end
end %end function locate interp1, linear interpolation MATLAB Answers — New Questions
LaTex Font has changed since update
I want my font on my figues and tables to match the rest of what i am writing, so I ussually use the LaTex font in matlab when making figues.
In the start of the script I would write:
set(groot,’defaultAxesTickLabelInterpreter’,’latex’)
set(groot,’defaulttextinterpreter’,’latex’)
set(groot,’defaultLegendInterpreter’,’latex’)
However, since I hav updated my MatLab to R2023b, the font has changed.
I have attached eksample of how it looked before and after the update.
Granted symbols like and sub- and superscrpts still work as it ussually did.I want my font on my figues and tables to match the rest of what i am writing, so I ussually use the LaTex font in matlab when making figues.
In the start of the script I would write:
set(groot,’defaultAxesTickLabelInterpreter’,’latex’)
set(groot,’defaulttextinterpreter’,’latex’)
set(groot,’defaultLegendInterpreter’,’latex’)
However, since I hav updated my MatLab to R2023b, the font has changed.
I have attached eksample of how it looked before and after the update.
Granted symbols like and sub- and superscrpts still work as it ussually did. I want my font on my figues and tables to match the rest of what i am writing, so I ussually use the LaTex font in matlab when making figues.
In the start of the script I would write:
set(groot,’defaultAxesTickLabelInterpreter’,’latex’)
set(groot,’defaulttextinterpreter’,’latex’)
set(groot,’defaultLegendInterpreter’,’latex’)
However, since I hav updated my MatLab to R2023b, the font has changed.
I have attached eksample of how it looked before and after the update.
Granted symbols like and sub- and superscrpts still work as it ussually did. latex, font, r2023b MATLAB Answers — New Questions









