Month: October 2025
Evaporator heat-flow reversed in refrigerant loop model (Simscape)
Hello everyone,
I’m currently modeling a refrigerant test loop in Simscape. The flow path is:
High-pressure reservoir → condenser → short pipe → valve (TXV or EXV) → short pipe → evaporator → low-pressure reservoir. All parameters are set to realistic values (pressures, diameters, temperatures, etc.).
The issue I’m facing is that the evaporator appears to be removing heat from the refrigerant instead of adding it, the temperature at port B is higher than at port A, even though the evaporator’s ambient is hotter. This causes downstream effects such as superheat decreasing when the valve closes, which is the opposite of physical behavior. Meanwhile, the condenser behaves correctly (temperature drops from port A → B as it rejects heat). Has anyone seen this before or know why the evaporator heat direction might flip in Simscape?Hello everyone,
I’m currently modeling a refrigerant test loop in Simscape. The flow path is:
High-pressure reservoir → condenser → short pipe → valve (TXV or EXV) → short pipe → evaporator → low-pressure reservoir. All parameters are set to realistic values (pressures, diameters, temperatures, etc.).
The issue I’m facing is that the evaporator appears to be removing heat from the refrigerant instead of adding it, the temperature at port B is higher than at port A, even though the evaporator’s ambient is hotter. This causes downstream effects such as superheat decreasing when the valve closes, which is the opposite of physical behavior. Meanwhile, the condenser behaves correctly (temperature drops from port A → B as it rejects heat). Has anyone seen this before or know why the evaporator heat direction might flip in Simscape? Hello everyone,
I’m currently modeling a refrigerant test loop in Simscape. The flow path is:
High-pressure reservoir → condenser → short pipe → valve (TXV or EXV) → short pipe → evaporator → low-pressure reservoir. All parameters are set to realistic values (pressures, diameters, temperatures, etc.).
The issue I’m facing is that the evaporator appears to be removing heat from the refrigerant instead of adding it, the temperature at port B is higher than at port A, even though the evaporator’s ambient is hotter. This causes downstream effects such as superheat decreasing when the valve closes, which is the opposite of physical behavior. Meanwhile, the condenser behaves correctly (temperature drops from port A → B as it rejects heat). Has anyone seen this before or know why the evaporator heat direction might flip in Simscape? simscape MATLAB Answers — New Questions
Why do I get an “Unrecognized method, property, or field ‘IsInterface'” error when accessing NET.assembly properties with .NET 9
With .NET 9, I am attempting to get the properties of a NET.Assembly (like Classes or Interfaces), but this throws an error. For example,
>> asmInfo = NET.addAssembly("System.Windows.Forms");
>> asmInfo.Classes
Unrecognized method, property, or field ‘IsInterface’ for class ‘System.RuntimeType’.
…
This same code works with .NET 8. Why am I getting an error with .NET 9?With .NET 9, I am attempting to get the properties of a NET.Assembly (like Classes or Interfaces), but this throws an error. For example,
>> asmInfo = NET.addAssembly("System.Windows.Forms");
>> asmInfo.Classes
Unrecognized method, property, or field ‘IsInterface’ for class ‘System.RuntimeType’.
…
This same code works with .NET 8. Why am I getting an error with .NET 9? With .NET 9, I am attempting to get the properties of a NET.Assembly (like Classes or Interfaces), but this throws an error. For example,
>> asmInfo = NET.addAssembly("System.Windows.Forms");
>> asmInfo.Classes
Unrecognized method, property, or field ‘IsInterface’ for class ‘System.RuntimeType’.
…
This same code works with .NET 8. Why am I getting an error with .NET 9? MATLAB Answers — New Questions
How to detect and prevent antivirus from affecting MATLAB and Simulink performance?
I suspect that my antivirus software is impacting the performance of MATLAB and Simulink. Is there something that I can do to detect this and to help prevent this type of interference? I suspect that my antivirus software is impacting the performance of MATLAB and Simulink. Is there something that I can do to detect this and to help prevent this type of interference? I suspect that my antivirus software is impacting the performance of MATLAB and Simulink. Is there something that I can do to detect this and to help prevent this type of interference? antivirus, slow, simulink, ui MATLAB Answers — New Questions
Auto-Updating Teams Work Location is Not Employee Monitoring
Setting Teams Work Location by Reference to a Wi-Fi Network
I’m amazed at some of the commentary flowing from MC1081568 (last updated 24 October 2025, Microsoft 365 roadmap item 488800) about a new Teams feature to automatically set a work location based on connecting to a Wi-Fi network or known peripherals such as Teams Rooms devices. The way some people described it, you’d think that this is tantamount to Microsoft making a method available for managers to keep an eye on employee work habits. The simple truth is that automation work location detection is not, and anyone who thinks that it is reveals a woeful lack of knowledge about how Teams works.
Setting work location has been a feature in Teams and Outlook for quite a while (Figure 1). The idea is that people can collaborate more effectively with co-workers if everyone knows where everyone is. Knowing where people are is important from a support perspective too, especially when Teams Phone serves as the corporate phone system.

Today, users must set their location manually. I forget to do so as a matter of course, just like I suspect many others do. But Teams knows when people connect to a work network. At least, it can if automatic detection is configured in Microsoft Places. In addition, the tenant must configure a Teams work location detection policy to enable automatic detection because by default, the feature is off.
Managing the Work Location Detection Policy with PowerShell
To configure the policy, connect to Microsoft Teams PowerShell and either run the Set-CsTeamsWorkLocationDetectionPolicy to switch automatic detection on by default for all users or (recommended) run the New-CsTeamsWorkLocationDetectionPolicy cmdlet to create a new work location detection policy and assign that policy to the users who you want the policy to apply to. This command creates a new policy:
New-CsTeamsWorkLocationDetectionPolicy -Identity AutoDetectNetwork -EnableWorkLocationDetection $true
To assign the policy to user accounts, use the Grant-CsTeamsWorkLocationDetectionPolicy cmdlet:
Grant-CsTeamsWorkLocationDetectionPolicy -Identity Lotte.Vetler@office365itpros.com -Policy AutoDetectNetwork
The Get-CsTeamsWorkLocationDetectionPolicy reports which work location detection policies enable automatic detection:
Identity EnableWorkLocationDetection -------- --------------------------- Global False Tag:NetworkDetectOn True Tag:AutoDetectNetwork True
It’s important to remember that Teams clears location information at the end of the working day and does not update locations outside working hours (based on Outlook settings).
Keeping an Eye on User Locations
For those who suspect that managers will monitor their locations to check where people are, my response is that managers can do this today by checking the user profiles for their employees where their location is displayed (Figure 2).

Having been a senior manager in several organizations, my view is that any manager that devotes time to this kind of checking needs to reevaluate how they allocate their time. It is something that might be justified when monitoring a problem employee, but not elsewhere. If people are really worried about management oversight, they can use the Teams browser or mobile clients. Detecting location automatically only works for the Teams desktop clients for Windows and MacOS.
Privacy is Important
People are right to worry about their privacy, and they should understand the potential impact of new functionality on how they work. In this case, I don’t think that there’s much to complain about. There are better tools available if an organization wants to monitor employee productivity. Automation work location detection by Teams to register if someone is in the office is not going to worry the people who build employee monitoring software. It shouldn’t worry you either.
Learn about managing Teams and the rest of Microsoft 365 by subscribing to the Office 365 for IT Pros eBook. Use our experience to understand what’s important and how best to protect your tenant
Simulink on Windows 11 cannot talk to WSL2 app over UDP sockets
Hi,
I’m running a Simulink model on Windows 11 Pro that has "UDP Send" blocks. The "UDP Send" block will send UDP packets to the address and port you specify. I am trying to communicate from an executing Simulink model over UDP to a simple UDP client running on WSL2. My WSL2 system is configured for mirrored networking with loopback addressing enabled. However, I cannot receive any packets on my WSL2 UDP client, although when I run the exact same program ported to Windows it works perfectly fine. I can send UDP packets manually from Windows 11 to WSL2 on the command line in PowerShell, so I know the network path is fine. Something about the Simulink UDP implementation is unusual in that is does not send UDP packets to sockets in my WSL2 environment. I have tried so many things (using physical IP address, broadcast, loopback, etc.) and I have disabled checksums in WSL2 and temporarily turned off the both the Windows Defender firewall and Hyper-V firewall. Nothing works. Anyone have any ideas?
Thanks,
-LukeHi,
I’m running a Simulink model on Windows 11 Pro that has "UDP Send" blocks. The "UDP Send" block will send UDP packets to the address and port you specify. I am trying to communicate from an executing Simulink model over UDP to a simple UDP client running on WSL2. My WSL2 system is configured for mirrored networking with loopback addressing enabled. However, I cannot receive any packets on my WSL2 UDP client, although when I run the exact same program ported to Windows it works perfectly fine. I can send UDP packets manually from Windows 11 to WSL2 on the command line in PowerShell, so I know the network path is fine. Something about the Simulink UDP implementation is unusual in that is does not send UDP packets to sockets in my WSL2 environment. I have tried so many things (using physical IP address, broadcast, loopback, etc.) and I have disabled checksums in WSL2 and temporarily turned off the both the Windows Defender firewall and Hyper-V firewall. Nothing works. Anyone have any ideas?
Thanks,
-Luke Hi,
I’m running a Simulink model on Windows 11 Pro that has "UDP Send" blocks. The "UDP Send" block will send UDP packets to the address and port you specify. I am trying to communicate from an executing Simulink model over UDP to a simple UDP client running on WSL2. My WSL2 system is configured for mirrored networking with loopback addressing enabled. However, I cannot receive any packets on my WSL2 UDP client, although when I run the exact same program ported to Windows it works perfectly fine. I can send UDP packets manually from Windows 11 to WSL2 on the command line in PowerShell, so I know the network path is fine. Something about the Simulink UDP implementation is unusual in that is does not send UDP packets to sockets in my WSL2 environment. I have tried so many things (using physical IP address, broadcast, loopback, etc.) and I have disabled checksums in WSL2 and temporarily turned off the both the Windows Defender firewall and Hyper-V firewall. Nothing works. Anyone have any ideas?
Thanks,
-Luke socket, udp, wsl2, simulink, packet, firewall MATLAB Answers — New Questions
Why do Nan values greatly increase the cost of sparse multiplication
Consider this code:
clear; close all;
n = 1e6;
m = 1e3;
s = 1e-3;
p = round(s^2 * n * m);
I = randperm(n, p);
J = randperm(m, p);
phi = sparse(I, J, 1, n, m);
Gx = randn(n, 1);
for k = 1:3
tic
L = Gx .* phi;
toc
end
Gx(1) = NaN;
for k = 1:3
tic
L = Gx .* phi;
toc
end
Now consider the output on my macbook pro M1 running Matlab 2024a (so through rosetta).
Elapsed time is 0.001591 seconds.
Elapsed time is 0.000291 seconds.
Elapsed time is 0.000282 seconds.
Elapsed time is 0.573762 seconds.
Elapsed time is 0.548177 seconds.
Elapsed time is 0.560880 seconds.
Notice the very large difference in computation times between the no-NaN version of Gx and the version that contains a single NaN value.
The solution is quite obvious, just remove the NaN values with your favorite method (isnan, isfinite, etc.). So this is not my question.
What intregues me is:
why the computation time changes so drastically?Consider this code:
clear; close all;
n = 1e6;
m = 1e3;
s = 1e-3;
p = round(s^2 * n * m);
I = randperm(n, p);
J = randperm(m, p);
phi = sparse(I, J, 1, n, m);
Gx = randn(n, 1);
for k = 1:3
tic
L = Gx .* phi;
toc
end
Gx(1) = NaN;
for k = 1:3
tic
L = Gx .* phi;
toc
end
Now consider the output on my macbook pro M1 running Matlab 2024a (so through rosetta).
Elapsed time is 0.001591 seconds.
Elapsed time is 0.000291 seconds.
Elapsed time is 0.000282 seconds.
Elapsed time is 0.573762 seconds.
Elapsed time is 0.548177 seconds.
Elapsed time is 0.560880 seconds.
Notice the very large difference in computation times between the no-NaN version of Gx and the version that contains a single NaN value.
The solution is quite obvious, just remove the NaN values with your favorite method (isnan, isfinite, etc.). So this is not my question.
What intregues me is:
why the computation time changes so drastically? Consider this code:
clear; close all;
n = 1e6;
m = 1e3;
s = 1e-3;
p = round(s^2 * n * m);
I = randperm(n, p);
J = randperm(m, p);
phi = sparse(I, J, 1, n, m);
Gx = randn(n, 1);
for k = 1:3
tic
L = Gx .* phi;
toc
end
Gx(1) = NaN;
for k = 1:3
tic
L = Gx .* phi;
toc
end
Now consider the output on my macbook pro M1 running Matlab 2024a (so through rosetta).
Elapsed time is 0.001591 seconds.
Elapsed time is 0.000291 seconds.
Elapsed time is 0.000282 seconds.
Elapsed time is 0.573762 seconds.
Elapsed time is 0.548177 seconds.
Elapsed time is 0.560880 seconds.
Notice the very large difference in computation times between the no-NaN version of Gx and the version that contains a single NaN value.
The solution is quite obvious, just remove the NaN values with your favorite method (isnan, isfinite, etc.). So this is not my question.
What intregues me is:
why the computation time changes so drastically? sparse, mtimes MATLAB Answers — New Questions
Sending Emails with MATLAB
Hello,
I am currently running a script in matlab that sends an email out when it is through with a .pdf attachment. This was working flawlessly two days ago and now I can’t seem to get it to work.
I am recieving the following error message:
Error using sendmail (line 175)
530 5.7.57 Client not authenticated to send mail. [BLAP220CA0019.NAMP220.PROD.OUTLOOK.COM]
Here is my code:
mail = ’email@address.com’; % false email for forum
password = ‘password’; % false pass for forum
mailingList = {‘people@email.com’}; % false email for forum
server = ‘smtp-mail.outlook.com’;
props = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.port’,’587′);
props.setProperty(‘mail.smtp.starttls.enable’,’true’);
setpref(‘Internet’,’E_mail’,mail);
setpref(‘Internet’,’SMTP_Server’,server);
setpref(‘Internet’,’SMTP_Username’,mail);
setpref(‘Internet’,’SMTP_Password’,password);
messageBody = sprintf(‘ Good morning team!’);
messageBody = sprintf(‘%snn Here is the data analysis from yesterdays data. Have a great day!’, messageBody);
messageBody = sprintf(‘%snn – Brian Gregory’, messageBody);
messageBody = sprintf(‘%snnn *This email was generated and sent automatically via MATLAB’, messageBody);
sendmail(mailingList, …
"Data Analysis – "+date, …
messageBody,fileDir7);Hello,
I am currently running a script in matlab that sends an email out when it is through with a .pdf attachment. This was working flawlessly two days ago and now I can’t seem to get it to work.
I am recieving the following error message:
Error using sendmail (line 175)
530 5.7.57 Client not authenticated to send mail. [BLAP220CA0019.NAMP220.PROD.OUTLOOK.COM]
Here is my code:
mail = ’email@address.com’; % false email for forum
password = ‘password’; % false pass for forum
mailingList = {‘people@email.com’}; % false email for forum
server = ‘smtp-mail.outlook.com’;
props = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.port’,’587′);
props.setProperty(‘mail.smtp.starttls.enable’,’true’);
setpref(‘Internet’,’E_mail’,mail);
setpref(‘Internet’,’SMTP_Server’,server);
setpref(‘Internet’,’SMTP_Username’,mail);
setpref(‘Internet’,’SMTP_Password’,password);
messageBody = sprintf(‘ Good morning team!’);
messageBody = sprintf(‘%snn Here is the data analysis from yesterdays data. Have a great day!’, messageBody);
messageBody = sprintf(‘%snn – Brian Gregory’, messageBody);
messageBody = sprintf(‘%snnn *This email was generated and sent automatically via MATLAB’, messageBody);
sendmail(mailingList, …
"Data Analysis – "+date, …
messageBody,fileDir7); Hello,
I am currently running a script in matlab that sends an email out when it is through with a .pdf attachment. This was working flawlessly two days ago and now I can’t seem to get it to work.
I am recieving the following error message:
Error using sendmail (line 175)
530 5.7.57 Client not authenticated to send mail. [BLAP220CA0019.NAMP220.PROD.OUTLOOK.COM]
Here is my code:
mail = ’email@address.com’; % false email for forum
password = ‘password’; % false pass for forum
mailingList = {‘people@email.com’}; % false email for forum
server = ‘smtp-mail.outlook.com’;
props = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.port’,’587′);
props.setProperty(‘mail.smtp.starttls.enable’,’true’);
setpref(‘Internet’,’E_mail’,mail);
setpref(‘Internet’,’SMTP_Server’,server);
setpref(‘Internet’,’SMTP_Username’,mail);
setpref(‘Internet’,’SMTP_Password’,password);
messageBody = sprintf(‘ Good morning team!’);
messageBody = sprintf(‘%snn Here is the data analysis from yesterdays data. Have a great day!’, messageBody);
messageBody = sprintf(‘%snn – Brian Gregory’, messageBody);
messageBody = sprintf(‘%snnn *This email was generated and sent automatically via MATLAB’, messageBody);
sendmail(mailingList, …
"Data Analysis – "+date, …
messageBody,fileDir7); email, error, matlab MATLAB Answers — New Questions
help with a heat map
Hello, I have been trying to create a heat map with the following characteristics: variation of the magnitude of the increase in vertical effort in a mesh every 1 cm for point, linear, and distributed rectangular loads. I am a civil engineer and hope you can help me.heat mapHello, I have been trying to create a heat map with the following characteristics: variation of the magnitude of the increase in vertical effort in a mesh every 1 cm for point, linear, and distributed rectangular loads. I am a civil engineer and hope you can help me.heat map Hello, I have been trying to create a heat map with the following characteristics: variation of the magnitude of the increase in vertical effort in a mesh every 1 cm for point, linear, and distributed rectangular loads. I am a civil engineer and hope you can help me.heat map heat map MATLAB Answers — New Questions
Get references and check for shadowed files before opening a model
If I open a model with load_system() I eventually get a lot of warnings caused by referenced dictionaries, libraries, etc. that have shadowed files on the path.
How do I find all those shadowed files before using load_system() so that I can take care of those shadowed files and eventually remove them or from the path?
(Clearing the whole path is not acceptable!)
Thanks for your suggestions.If I open a model with load_system() I eventually get a lot of warnings caused by referenced dictionaries, libraries, etc. that have shadowed files on the path.
How do I find all those shadowed files before using load_system() so that I can take care of those shadowed files and eventually remove them or from the path?
(Clearing the whole path is not acceptable!)
Thanks for your suggestions. If I open a model with load_system() I eventually get a lot of warnings caused by referenced dictionaries, libraries, etc. that have shadowed files on the path.
How do I find all those shadowed files before using load_system() so that I can take care of those shadowed files and eventually remove them or from the path?
(Clearing the whole path is not acceptable!)
Thanks for your suggestions. shadowed files MATLAB Answers — New Questions
Stealing Access Token Secrets from Teams is Hard Unless a Workstation is Compromised
French Security Company Highlights Stealing Teams Access Tokens from the Local State File
On October 23, 2025, a French security company called Randorisec, published an article about stealing Microsoft Teams access tokens in 2025. Over the next few hours, I received several messages asking if the news as reported was serious and required action. My response was “Nope.”
I don’t think that the article surfaces any new information. More importantly, the compromise as described is only possible if attackers first manage to gain control over a workstation running Teams. In that scenario, the problem is more serious than fetching a few access tokens to use to send messages with the Graph API. Let’s discuss what the article reveals and why I’m sanguine about its findings.
The Teams Local State File
The discussion centers on fetching content from the local state file used by Teams, which is found in:
%LocalAppData%PackagesMSTeams_8wekyb3d8bbweLocalCacheMicrosoftMSTeamsEBWebViewLocal State
The article explains how to fetch and decrypt cookies protected using the Chromium Data Protection API (DPAPI), which in turn are used to fetch access tokens. I’m not sure that there’s anything new here because I found several articles to explain the process (here’s a good example). Chromium-based browsers use JSON-formatted local state files to store information needed for browser sessions, including encrypted keys used to protect sensitive information like user passwords.
Why Does Teams Use a Local State File?
What people might not understand is why Teams uses a local state file to hold information about the current client configuration, software version, other client settings, and encrypted content (Figure 1). The answer is that the Teams V2 client architecture depends on the WebView2 component. WebView2 uses the Edge rendering engine to display content within apps, including Teams, the new Outlook for Windows, and features shared between Outlook clients like the Room Finder. Microsoft includes the WebView2 component with Office and other products.

Because the Teams clients are deeply integrated with WebView2, it makes sense to adopt other Chromium constructs, like the local state file and DPAPI, and that’s probably why you end up with a Teams-specific local state file that behaves much like the local state file used by Chromium browsers.
Access Tokens for Teams
Eventually, the researchers end up with access tokens that can be used to interact with Teams via the Graph API. Getting to the access tokens requires fetching them from the cookies SQLlite database. This file is found in the %LocalAppData%PackagesMSTeams_8wekyb3d8bbweLocalCacheMicrosoftMSTeamsEBWebViewWV2Profile_tfwNetwork folder and is locked when a Teams client is active.
The assertion that they can use the tokens to send email is erroneous. As pointed out in the article, the tokens are for use with Teams, not Exchange Online, so the permissions granted in the tokens do not permit use of the Mail Send API.
Local State File is Inaccessible Unless a Device is Compromised
Don’t get me wrong. Security researchers do a great job of finding weaknesses in products before attackers figure out how to use those weaknesses to do damage. I applaud the efforts of the Randorisec team, but I just don’t think that there’s anything surprising to become too concerned about. The attempt to hype the problem by Cyber Security News is also regretable. I wonder if either the researchers or reporter actually know anything about how Teams works, but hey, all publicity is good.
I keep on going back to the simple fact that before an attacker can access the Teams local state file and cookies database, they’ve broken into the workstation and therefore have full access to whatever’s on that device. In all probability, they can start the Teams client and can send chats and channel messages without needing to fetch and decrypt information.
The best defence is to stop attackers from compromising user accounts by deploying strong multifactor authentication. If you can do that, you shouldn’t need to worry about the details of Teams, WebView2, and the cookies file.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive insights updated monthly into what happens within Microsoft 365, why it happens, and what new features and capabilities mean for your tenant.
Correcting effects of Humidity on sensors
Hi All
I have gas sensor, that gets effected by hummdity that needs to be corrected. So was hoping to see if we can correct this ?
How can i run my code on the this support forum with my data file, so it can be run?Hi All
I have gas sensor, that gets effected by hummdity that needs to be corrected. So was hoping to see if we can correct this ?
How can i run my code on the this support forum with my data file, so it can be run? Hi All
I have gas sensor, that gets effected by hummdity that needs to be corrected. So was hoping to see if we can correct this ?
How can i run my code on the this support forum with my data file, so it can be run? matlab MATLAB Answers — New Questions
Defining Global Variables in the function
Hi. MATLAB Community. I am trying to get the following code to work. I’m working on a toy example that I hope to get running correctly before applying it to a larger numerical project. The issue I’m facing is that the values of k and rho_0 are not updating properly when I Area_Integral from the command window for different values of k and rho_0 (I am selecting k and rho_0 values so it stays in the if loop of the Area_Integral file. I uploaded the code for the various scripts I am using. When I write this in the command window, Area_Integral (1,0.4) and then Area_Integral (1.5,0.4) the value of k is not updated for the later case.
function out = Area_Integral(k, rho_0)
global k rho_0
if k>=1-rho_0^2
theta_array = linspace(0,pi/2,101);
root = zeros(size(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
root(ii) = mnhf_secant(@poly4,[0.4 0.8],1e-8,0); %% Note: values of k, r0 and theta must be made accessible to poly4
end
out = 2*trapz(theta_array,root);
else
r_upperlim = sqrt(1+rho_0^2+sqrt(k^2+4*rho_0^2));
r_lowerlim = sqrt(1+rho_0^2-sqrt(k^2+4*rho_0^2));
fun_A2 = @(r) acos((r.^4+(1-rho_0^2)^2-k^2)./2./r.^2-rho_0^2).*r;
out = integral(fun_A2,r_lowerlim,r_upperlim);
end
if rho_0 == 1 && k <= 1e-12
out = pi;
end
end
function f = poly4(x)
global k rho_0 theta
disp([‘Values: k=’ num2str(k) ‘, rho_0=’ num2str(rho_0) ‘, theta=’ num2str(theta) ‘, x=’ num2str(x)])
disp([‘size(x): ‘ num2str(size(x))])
disp([‘size(k): ‘ num2str(size(k))])
disp([‘size(rho_0): ‘ num2str(size(rho_0))])
disp([‘size(theta): ‘ num2str(size(theta))])
k
%Equation B3 from Shuo and Li (LF20B)
f = (x.^2-2.*x.*cos(theta)+1-rho_0^2).*(x.^2-2.*x.*cos(theta+pi)+1-rho_0^2)-k.^2;
disp([‘f = ‘ num2str(f)])
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN;Hi. MATLAB Community. I am trying to get the following code to work. I’m working on a toy example that I hope to get running correctly before applying it to a larger numerical project. The issue I’m facing is that the values of k and rho_0 are not updating properly when I Area_Integral from the command window for different values of k and rho_0 (I am selecting k and rho_0 values so it stays in the if loop of the Area_Integral file. I uploaded the code for the various scripts I am using. When I write this in the command window, Area_Integral (1,0.4) and then Area_Integral (1.5,0.4) the value of k is not updated for the later case.
function out = Area_Integral(k, rho_0)
global k rho_0
if k>=1-rho_0^2
theta_array = linspace(0,pi/2,101);
root = zeros(size(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
root(ii) = mnhf_secant(@poly4,[0.4 0.8],1e-8,0); %% Note: values of k, r0 and theta must be made accessible to poly4
end
out = 2*trapz(theta_array,root);
else
r_upperlim = sqrt(1+rho_0^2+sqrt(k^2+4*rho_0^2));
r_lowerlim = sqrt(1+rho_0^2-sqrt(k^2+4*rho_0^2));
fun_A2 = @(r) acos((r.^4+(1-rho_0^2)^2-k^2)./2./r.^2-rho_0^2).*r;
out = integral(fun_A2,r_lowerlim,r_upperlim);
end
if rho_0 == 1 && k <= 1e-12
out = pi;
end
end
function f = poly4(x)
global k rho_0 theta
disp([‘Values: k=’ num2str(k) ‘, rho_0=’ num2str(rho_0) ‘, theta=’ num2str(theta) ‘, x=’ num2str(x)])
disp([‘size(x): ‘ num2str(size(x))])
disp([‘size(k): ‘ num2str(size(k))])
disp([‘size(rho_0): ‘ num2str(size(rho_0))])
disp([‘size(theta): ‘ num2str(size(theta))])
k
%Equation B3 from Shuo and Li (LF20B)
f = (x.^2-2.*x.*cos(theta)+1-rho_0^2).*(x.^2-2.*x.*cos(theta+pi)+1-rho_0^2)-k.^2;
disp([‘f = ‘ num2str(f)])
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN; Hi. MATLAB Community. I am trying to get the following code to work. I’m working on a toy example that I hope to get running correctly before applying it to a larger numerical project. The issue I’m facing is that the values of k and rho_0 are not updating properly when I Area_Integral from the command window for different values of k and rho_0 (I am selecting k and rho_0 values so it stays in the if loop of the Area_Integral file. I uploaded the code for the various scripts I am using. When I write this in the command window, Area_Integral (1,0.4) and then Area_Integral (1.5,0.4) the value of k is not updated for the later case.
function out = Area_Integral(k, rho_0)
global k rho_0
if k>=1-rho_0^2
theta_array = linspace(0,pi/2,101);
root = zeros(size(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
root(ii) = mnhf_secant(@poly4,[0.4 0.8],1e-8,0); %% Note: values of k, r0 and theta must be made accessible to poly4
end
out = 2*trapz(theta_array,root);
else
r_upperlim = sqrt(1+rho_0^2+sqrt(k^2+4*rho_0^2));
r_lowerlim = sqrt(1+rho_0^2-sqrt(k^2+4*rho_0^2));
fun_A2 = @(r) acos((r.^4+(1-rho_0^2)^2-k^2)./2./r.^2-rho_0^2).*r;
out = integral(fun_A2,r_lowerlim,r_upperlim);
end
if rho_0 == 1 && k <= 1e-12
out = pi;
end
end
function f = poly4(x)
global k rho_0 theta
disp([‘Values: k=’ num2str(k) ‘, rho_0=’ num2str(rho_0) ‘, theta=’ num2str(theta) ‘, x=’ num2str(x)])
disp([‘size(x): ‘ num2str(size(x))])
disp([‘size(k): ‘ num2str(size(k))])
disp([‘size(rho_0): ‘ num2str(size(rho_0))])
disp([‘size(theta): ‘ num2str(size(theta))])
k
%Equation B3 from Shuo and Li (LF20B)
f = (x.^2-2.*x.*cos(theta)+1-rho_0^2).*(x.^2-2.*x.*cos(theta+pi)+1-rho_0^2)-k.^2;
disp([‘f = ‘ num2str(f)])
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN; global variables MATLAB Answers — New Questions
How exchange values between Simulink and App Designer?
I am currently using App designer for the first time to create an interface for a Simulink model. This app must be capable of both monitoring the Simulink continuously (aka: change lamp colour once value output is greater than one) and inputting information into the Simulink (aka: switches that stop/start particular Simulink functions).
Getting switches to control the Simulink was simple, but I am struggling with getting the app to constantly monitor the Simulink. The closest I have gotten is using event listeners (add_exec_event_listener). However, when they are just based in the app I seem to need to be continuously doing a triggering event in the app to run the code which is not a viable option. An alternative I found was to put the listeners inside Model Properties, Callbacks but then the other parts of the app seem to refuse to run (Switch no longer interact with Simulink).
As this is my first time using app I do not know if this is due to failings on my own part or limitations of the system. If anyone know if this is possible with event listeners, could you let me know so I can continue working on my code. Or if they know this won’t work and can offer alternative suggestions that would be incredible.I am currently using App designer for the first time to create an interface for a Simulink model. This app must be capable of both monitoring the Simulink continuously (aka: change lamp colour once value output is greater than one) and inputting information into the Simulink (aka: switches that stop/start particular Simulink functions).
Getting switches to control the Simulink was simple, but I am struggling with getting the app to constantly monitor the Simulink. The closest I have gotten is using event listeners (add_exec_event_listener). However, when they are just based in the app I seem to need to be continuously doing a triggering event in the app to run the code which is not a viable option. An alternative I found was to put the listeners inside Model Properties, Callbacks but then the other parts of the app seem to refuse to run (Switch no longer interact with Simulink).
As this is my first time using app I do not know if this is due to failings on my own part or limitations of the system. If anyone know if this is possible with event listeners, could you let me know so I can continue working on my code. Or if they know this won’t work and can offer alternative suggestions that would be incredible. I am currently using App designer for the first time to create an interface for a Simulink model. This app must be capable of both monitoring the Simulink continuously (aka: change lamp colour once value output is greater than one) and inputting information into the Simulink (aka: switches that stop/start particular Simulink functions).
Getting switches to control the Simulink was simple, but I am struggling with getting the app to constantly monitor the Simulink. The closest I have gotten is using event listeners (add_exec_event_listener). However, when they are just based in the app I seem to need to be continuously doing a triggering event in the app to run the code which is not a viable option. An alternative I found was to put the listeners inside Model Properties, Callbacks but then the other parts of the app seem to refuse to run (Switch no longer interact with Simulink).
As this is my first time using app I do not know if this is due to failings on my own part or limitations of the system. If anyone know if this is possible with event listeners, could you let me know so I can continue working on my code. Or if they know this won’t work and can offer alternative suggestions that would be incredible. app designer, simulink, event listener MATLAB Answers — New Questions
Unrecognized method, property, or field ‘ReferencePoint’ for class ‘DrivingStrategy’.
I am getting this error while trying to run the example code at GitHub – mathworks/OpenTrafficLab: OpenTrafficLab is a MATLAB environment capable of simulating simple traffic scenarios with modular vehicle and junction controllers.
The lastb code block is the one returning the error
%Advance the Scenario
while advance(scenario)
plotOpenPaths(trafficLight)
drawnow limitrate
end
Unrecognized method, property, or field ‘ReferencePoint’ for class ‘DrivingStrategy’.
Error in driving.scenario.DefaultScenario/actorPoses (line 23)
if isa(obj.Scenario.Actors(i),"driving.scenario.Vehicle") && ~isa(motionStrategy,"driving.scenario.Stationary") && isequal(motionStrategy.ReferencePoint, "front-axle")
Error in drivingScenario/actorPoses (line 51)
a = actorPoses(obj.Scenario);
Error in drivingScenario/setUpSensorSimulation (line 474)
obj.SensorSimulation.addActors(actorProfiles(obj), actorPoses(obj));
Error in driving.scenario.DefaultScenario/advance (line 8)
setUpSensorSimulation(obj.Scenario);
Error in drivingScenario/advance (line 42)
running = advance(obj.Scenario);I am getting this error while trying to run the example code at GitHub – mathworks/OpenTrafficLab: OpenTrafficLab is a MATLAB environment capable of simulating simple traffic scenarios with modular vehicle and junction controllers.
The lastb code block is the one returning the error
%Advance the Scenario
while advance(scenario)
plotOpenPaths(trafficLight)
drawnow limitrate
end
Unrecognized method, property, or field ‘ReferencePoint’ for class ‘DrivingStrategy’.
Error in driving.scenario.DefaultScenario/actorPoses (line 23)
if isa(obj.Scenario.Actors(i),"driving.scenario.Vehicle") && ~isa(motionStrategy,"driving.scenario.Stationary") && isequal(motionStrategy.ReferencePoint, "front-axle")
Error in drivingScenario/actorPoses (line 51)
a = actorPoses(obj.Scenario);
Error in drivingScenario/setUpSensorSimulation (line 474)
obj.SensorSimulation.addActors(actorProfiles(obj), actorPoses(obj));
Error in driving.scenario.DefaultScenario/advance (line 8)
setUpSensorSimulation(obj.Scenario);
Error in drivingScenario/advance (line 42)
running = advance(obj.Scenario); I am getting this error while trying to run the example code at GitHub – mathworks/OpenTrafficLab: OpenTrafficLab is a MATLAB environment capable of simulating simple traffic scenarios with modular vehicle and junction controllers.
The lastb code block is the one returning the error
%Advance the Scenario
while advance(scenario)
plotOpenPaths(trafficLight)
drawnow limitrate
end
Unrecognized method, property, or field ‘ReferencePoint’ for class ‘DrivingStrategy’.
Error in driving.scenario.DefaultScenario/actorPoses (line 23)
if isa(obj.Scenario.Actors(i),"driving.scenario.Vehicle") && ~isa(motionStrategy,"driving.scenario.Stationary") && isequal(motionStrategy.ReferencePoint, "front-axle")
Error in drivingScenario/actorPoses (line 51)
a = actorPoses(obj.Scenario);
Error in drivingScenario/setUpSensorSimulation (line 474)
obj.SensorSimulation.addActors(actorProfiles(obj), actorPoses(obj));
Error in driving.scenario.DefaultScenario/advance (line 8)
setUpSensorSimulation(obj.Scenario);
Error in drivingScenario/advance (line 42)
running = advance(obj.Scenario); automated driving toolbox MATLAB Answers — New Questions
What frame of reference is the CG input to the IMU in Aerospace pack?
Hi there, I am working with the IMU block in simulink where I need to connect to the CG (center of gravity) input. My question is thus, is it in the fram of reference relative to my objects coordiantes (e.g. robot, drone, ect) or is it in the frame of reference of my global coordinate system, and is it dynamic, by which I mean, does it need the (e.g) the robots current location (and then of course relative the correct frame of reference)? It wasn’t clear to me in the documentation, so I thought I would ask the question here. Thanks in advance.Hi there, I am working with the IMU block in simulink where I need to connect to the CG (center of gravity) input. My question is thus, is it in the fram of reference relative to my objects coordiantes (e.g. robot, drone, ect) or is it in the frame of reference of my global coordinate system, and is it dynamic, by which I mean, does it need the (e.g) the robots current location (and then of course relative the correct frame of reference)? It wasn’t clear to me in the documentation, so I thought I would ask the question here. Thanks in advance. Hi there, I am working with the IMU block in simulink where I need to connect to the CG (center of gravity) input. My question is thus, is it in the fram of reference relative to my objects coordiantes (e.g. robot, drone, ect) or is it in the frame of reference of my global coordinate system, and is it dynamic, by which I mean, does it need the (e.g) the robots current location (and then of course relative the correct frame of reference)? It wasn’t clear to me in the documentation, so I thought I would ask the question here. Thanks in advance. aerospace, simulink, input MATLAB Answers — New Questions
How can I extract the time length (in miliseconds) between two audio signals?
I have a psychology experiment paradigm which asks participants to give a verbal response immediately after they hear a beep sound. Participants may or may not respond to the beep, and their response could be quick or slow. I need to extract the time length between the end of the beep sound and the start of their verbal response. Such time length should be measured in miliseconds as the total time allowed for each response was 3 seconds (3000 ms). There are hundreds of trials so I would like to find a way to do the extraction automatically. How should I achieve this? Carload thanks to any suggestions!I have a psychology experiment paradigm which asks participants to give a verbal response immediately after they hear a beep sound. Participants may or may not respond to the beep, and their response could be quick or slow. I need to extract the time length between the end of the beep sound and the start of their verbal response. Such time length should be measured in miliseconds as the total time allowed for each response was 3 seconds (3000 ms). There are hundreds of trials so I would like to find a way to do the extraction automatically. How should I achieve this? Carload thanks to any suggestions! I have a psychology experiment paradigm which asks participants to give a verbal response immediately after they hear a beep sound. Participants may or may not respond to the beep, and their response could be quick or slow. I need to extract the time length between the end of the beep sound and the start of their verbal response. Such time length should be measured in miliseconds as the total time allowed for each response was 3 seconds (3000 ms). There are hundreds of trials so I would like to find a way to do the extraction automatically. How should I achieve this? Carload thanks to any suggestions! signal processing, audio signal processing MATLAB Answers — New Questions
How to make the quiver() arrow head size fixed?
Hi all-
When I use the quiver() function to plot an arrow in my scatterplot, I noticed that the size of the arrow head is different, depending on how big the arrow itself is (its length basically).
Any ideas on how to make the arrow head size fixed independent of the arrow length? Or if it is at least possible to do?
Best.Hi all-
When I use the quiver() function to plot an arrow in my scatterplot, I noticed that the size of the arrow head is different, depending on how big the arrow itself is (its length basically).
Any ideas on how to make the arrow head size fixed independent of the arrow length? Or if it is at least possible to do?
Best. Hi all-
When I use the quiver() function to plot an arrow in my scatterplot, I noticed that the size of the arrow head is different, depending on how big the arrow itself is (its length basically).
Any ideas on how to make the arrow head size fixed independent of the arrow length? Or if it is at least possible to do?
Best. quiver, arrow, size, length, scatter, plot MATLAB Answers — New Questions
Why do I get “Error using ^” after clicking “Run COM” in the MATLAB R2025a Signal Integrity Toolbox, Channel Operating Margin (COM) Manager?
I’m following the Channel Operating Margin (COM) for Serial Link tutorial from the Signal Integrity Toolbox. I’m following the tutorial exactly, not trying to make any modifications. I get to Step 5 and click "Run COM" in the Channel Operating Margin (COM) Manager. After running for a bit, I get the error:
Error using ^ (line 52)
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To operate on each element of the matrix individually, use POWER (.^) for elementwise power.
Why is this happening? I’ve attached the full MATLAB command window output below:
Processing 1/5: C:myRootCOM_100G_KRinterfaces100G_KRpre_simsCrosstalkdefault.ssmqcdqcd_ttte_clearance1qcd_ttte_clearance1.nc.s20p
Warning: COM controls for DIAGNOSTIC and DISPLAY_WINDOW turned off because of limitations in com_ieee8023_93a.m for MATLAB versions 14b and newer.
> In comGUI>comWrapper (line 574)
In comGUI>run_com_Callback (line 365)
In matlab.ui.internal.controller.uicontrol/UIControlController/triggerActionEvent (line 76)
In matlab.ui.internal.controller.uicontrol/UIControlPushButtonController/handleEvent (line 29)
In matlab.ui.internal.controller.uicontrol.UIControlController>@(varargin)obj.handleEvent(varargin{:}) (line 71)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 76)
Creating s4p’s . . . done.
Running COM . . .
This is NOT an official IEEE document.
Revision: 2.95 This is a computation example for exploring COM and ERL for projects like IEEE P802.3bj/b/bs/cd/ck with some exploratory extensions and is not normative or official
reading file 1 2 3 4 5
reading file Error using ^ (line 52)
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To operate on each element of the matrix individually, use POWER (.^) for elementwise power.
Error in com_ieee8023_93a_295 (line 642)
MDFEXT_ICN=sqrt(2*chdata(i).delta_f/param.f2*sum( chdata(i).Aicn^2*PWF(1:index_f2).*abs(MDFEXT(1:index_f2)).^2)); %eq 46
^
Error in comGUI>comWrapper (line 668)
comresults = comFunction(cfg_name,…
^^^^^^^^^^^^^^^^^^^^^^^^
Error in comGUI>run_com_Callback (line 365)
comWrapper(comdat,com_template_xls_fn,com_ieee8023_93a_fn,sit_csv_write_path,handles);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error using matlab.ui.internal.controller.uicontrol.UIControlController/triggerActionEvent (line 76)
Error while evaluating UIControl Callback.
I’m following the Channel Operating Margin (COM) for Serial Link tutorial from the Signal Integrity Toolbox. I’m following the tutorial exactly, not trying to make any modifications. I get to Step 5 and click "Run COM" in the Channel Operating Margin (COM) Manager. After running for a bit, I get the error:
Error using ^ (line 52)
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To operate on each element of the matrix individually, use POWER (.^) for elementwise power.
Why is this happening? I’ve attached the full MATLAB command window output below:
Processing 1/5: C:myRootCOM_100G_KRinterfaces100G_KRpre_simsCrosstalkdefault.ssmqcdqcd_ttte_clearance1qcd_ttte_clearance1.nc.s20p
Warning: COM controls for DIAGNOSTIC and DISPLAY_WINDOW turned off because of limitations in com_ieee8023_93a.m for MATLAB versions 14b and newer.
> In comGUI>comWrapper (line 574)
In comGUI>run_com_Callback (line 365)
In matlab.ui.internal.controller.uicontrol/UIControlController/triggerActionEvent (line 76)
In matlab.ui.internal.controller.uicontrol/UIControlPushButtonController/handleEvent (line 29)
In matlab.ui.internal.controller.uicontrol.UIControlController>@(varargin)obj.handleEvent(varargin{:}) (line 71)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 76)
Creating s4p’s . . . done.
Running COM . . .
This is NOT an official IEEE document.
Revision: 2.95 This is a computation example for exploring COM and ERL for projects like IEEE P802.3bj/b/bs/cd/ck with some exploratory extensions and is not normative or official
reading file 1 2 3 4 5
reading file Error using ^ (line 52)
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To operate on each element of the matrix individually, use POWER (.^) for elementwise power.
Error in com_ieee8023_93a_295 (line 642)
MDFEXT_ICN=sqrt(2*chdata(i).delta_f/param.f2*sum( chdata(i).Aicn^2*PWF(1:index_f2).*abs(MDFEXT(1:index_f2)).^2)); %eq 46
^
Error in comGUI>comWrapper (line 668)
comresults = comFunction(cfg_name,…
^^^^^^^^^^^^^^^^^^^^^^^^
Error in comGUI>run_com_Callback (line 365)
comWrapper(comdat,com_template_xls_fn,com_ieee8023_93a_fn,sit_csv_write_path,handles);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error using matlab.ui.internal.controller.uicontrol.UIControlController/triggerActionEvent (line 76)
Error while evaluating UIControl Callback.
I’m following the Channel Operating Margin (COM) for Serial Link tutorial from the Signal Integrity Toolbox. I’m following the tutorial exactly, not trying to make any modifications. I get to Step 5 and click "Run COM" in the Channel Operating Margin (COM) Manager. After running for a bit, I get the error:
Error using ^ (line 52)
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To operate on each element of the matrix individually, use POWER (.^) for elementwise power.
Why is this happening? I’ve attached the full MATLAB command window output below:
Processing 1/5: C:myRootCOM_100G_KRinterfaces100G_KRpre_simsCrosstalkdefault.ssmqcdqcd_ttte_clearance1qcd_ttte_clearance1.nc.s20p
Warning: COM controls for DIAGNOSTIC and DISPLAY_WINDOW turned off because of limitations in com_ieee8023_93a.m for MATLAB versions 14b and newer.
> In comGUI>comWrapper (line 574)
In comGUI>run_com_Callback (line 365)
In matlab.ui.internal.controller.uicontrol/UIControlController/triggerActionEvent (line 76)
In matlab.ui.internal.controller.uicontrol/UIControlPushButtonController/handleEvent (line 29)
In matlab.ui.internal.controller.uicontrol.UIControlController>@(varargin)obj.handleEvent(varargin{:}) (line 71)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 76)
Creating s4p’s . . . done.
Running COM . . .
This is NOT an official IEEE document.
Revision: 2.95 This is a computation example for exploring COM and ERL for projects like IEEE P802.3bj/b/bs/cd/ck with some exploratory extensions and is not normative or official
reading file 1 2 3 4 5
reading file Error using ^ (line 52)
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To operate on each element of the matrix individually, use POWER (.^) for elementwise power.
Error in com_ieee8023_93a_295 (line 642)
MDFEXT_ICN=sqrt(2*chdata(i).delta_f/param.f2*sum( chdata(i).Aicn^2*PWF(1:index_f2).*abs(MDFEXT(1:index_f2)).^2)); %eq 46
^
Error in comGUI>comWrapper (line 668)
comresults = comFunction(cfg_name,…
^^^^^^^^^^^^^^^^^^^^^^^^
Error in comGUI>run_com_Callback (line 365)
comWrapper(comdat,com_template_xls_fn,com_ieee8023_93a_fn,sit_csv_write_path,handles);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error using matlab.ui.internal.controller.uicontrol.UIControlController/triggerActionEvent (line 76)
Error while evaluating UIControl Callback.
serial, link, designer, channel, operating, margin, com, signal, integrity, toolbox, config, path MATLAB Answers — New Questions
Why can I not see the Menu Bar (File, Edit, View, etc.) when I open my GUIDE-built app in R2025a or R2025b?
After upgrading from MATLAB R2023a to MATLAB R2025a/R2025b, the classic ‘Menu Bar’ (File, Edit, View, Insert, Tools, Help) that normally appears at the top of the figure window in my GUIDE-built app is missing. This issue occurs every time I open the app in the newer releases.
Previously, in MATLAB R2023a, these menus were available and allowed me to interact with plots, export data, and access other figure tools.
I need a way to restore these menus or replicate the same functionality in the newer versions of MATLAB. Why is this happening?After upgrading from MATLAB R2023a to MATLAB R2025a/R2025b, the classic ‘Menu Bar’ (File, Edit, View, Insert, Tools, Help) that normally appears at the top of the figure window in my GUIDE-built app is missing. This issue occurs every time I open the app in the newer releases.
Previously, in MATLAB R2023a, these menus were available and allowed me to interact with plots, export data, and access other figure tools.
I need a way to restore these menus or replicate the same functionality in the newer versions of MATLAB. Why is this happening? After upgrading from MATLAB R2023a to MATLAB R2025a/R2025b, the classic ‘Menu Bar’ (File, Edit, View, Insert, Tools, Help) that normally appears at the top of the figure window in my GUIDE-built app is missing. This issue occurs every time I open the app in the newer releases.
Previously, in MATLAB R2023a, these menus were available and allowed me to interact with plots, export data, and access other figure tools.
I need a way to restore these menus or replicate the same functionality in the newer versions of MATLAB. Why is this happening? matlab, guide, menubar, toolbar MATLAB Answers — New Questions
Simulation freezes after exiting fullscreen mode in VR Sink (Simulink Desktop Real-Time)
Hi everyone,
I’m running a Simulink Desktop Real-Time model that includes a VR Sink block (from Simulink 3D Animation) to display a virtual world. Everything works fine until I open the VR viewer in fullscreen mode.
When I exit fullscreen, MATLAB immediately shows an error in the Command Window, and the simulation freezes, it doesn’t continue running, and I have to stop and restart the model manually.
This happens consistently. Here are some details about my setup:
MATLAB version: R2024b
Simulation mode: Simulink Desktop Real-Time (External mode)
run in Kernel
I’m aware that in newer releases (R2025a and later) the VR Sink and related blocks are no longer supported, replaced by the new Simscape / Simulation 3D environment. However, I must use Simulink Desktop Real-Time, which currently does not support the new 3D blocks, so updating is not a viable option for my setup.
I need fullscreen rendering for human–VR interaction experiments, so I can’t avoid fullscreen mode.
Has anyone encountered this problem before? Is there a known workaround or patch for using fullscreen in VR Sink + Simulink Desktop Real-Time?
Thanks in advance for any suggestion or insight!Hi everyone,
I’m running a Simulink Desktop Real-Time model that includes a VR Sink block (from Simulink 3D Animation) to display a virtual world. Everything works fine until I open the VR viewer in fullscreen mode.
When I exit fullscreen, MATLAB immediately shows an error in the Command Window, and the simulation freezes, it doesn’t continue running, and I have to stop and restart the model manually.
This happens consistently. Here are some details about my setup:
MATLAB version: R2024b
Simulation mode: Simulink Desktop Real-Time (External mode)
run in Kernel
I’m aware that in newer releases (R2025a and later) the VR Sink and related blocks are no longer supported, replaced by the new Simscape / Simulation 3D environment. However, I must use Simulink Desktop Real-Time, which currently does not support the new 3D blocks, so updating is not a viable option for my setup.
I need fullscreen rendering for human–VR interaction experiments, so I can’t avoid fullscreen mode.
Has anyone encountered this problem before? Is there a known workaround or patch for using fullscreen in VR Sink + Simulink Desktop Real-Time?
Thanks in advance for any suggestion or insight! Hi everyone,
I’m running a Simulink Desktop Real-Time model that includes a VR Sink block (from Simulink 3D Animation) to display a virtual world. Everything works fine until I open the VR viewer in fullscreen mode.
When I exit fullscreen, MATLAB immediately shows an error in the Command Window, and the simulation freezes, it doesn’t continue running, and I have to stop and restart the model manually.
This happens consistently. Here are some details about my setup:
MATLAB version: R2024b
Simulation mode: Simulink Desktop Real-Time (External mode)
run in Kernel
I’m aware that in newer releases (R2025a and later) the VR Sink and related blocks are no longer supported, replaced by the new Simscape / Simulation 3D environment. However, I must use Simulink Desktop Real-Time, which currently does not support the new 3D blocks, so updating is not a viable option for my setup.
I need fullscreen rendering for human–VR interaction experiments, so I can’t avoid fullscreen mode.
Has anyone encountered this problem before? Is there a known workaround or patch for using fullscreen in VR Sink + Simulink Desktop Real-Time?
Thanks in advance for any suggestion or insight! simulink, vr sink, fullscreen, matlab, simulation MATLAB Answers — New Questions









