Category: News
I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D
I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D data graph by using MATLAB? Who can provide me the code.I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D data graph by using MATLAB? Who can provide me the code. I have got the the liquid film surface of x,y,z coordinates and wall temperature data outside a 3D horizontal circular pipe from Fluent, how to calculate and output the 3D data graph by using MATLAB? Who can provide me the code. matlab MATLAB Answers — New Questions
Why are there duplicate posts in MATLAB Answers?
Sometimes, identicaly or very similar posts appear in MATLAB Answers from the same user. I would like know why. Is there something in the usability of submitting questions that makes you doubt it has been submitted correctly?Sometimes, identicaly or very similar posts appear in MATLAB Answers from the same user. I would like know why. Is there something in the usability of submitting questions that makes you doubt it has been submitted correctly? Sometimes, identicaly or very similar posts appear in MATLAB Answers from the same user. I would like know why. Is there something in the usability of submitting questions that makes you doubt it has been submitted correctly? matlab answers, meta MATLAB Answers — New Questions
Why am I receiving MathWorks Licensing Error 92?
Why am I receiving the following error?
MathWorks Licensing Error 92
A licensing error occurred while trying to use <PRODUCTNAME>.
Your license file is no longer compatible with your license server and needs updating.
Contact your system administrator to check that your license file has the proper SERVER and USE_SERVER lines.Why am I receiving the following error?
MathWorks Licensing Error 92
A licensing error occurred while trying to use <PRODUCTNAME>.
Your license file is no longer compatible with your license server and needs updating.
Contact your system administrator to check that your license file has the proper SERVER and USE_SERVER lines. Why am I receiving the following error?
MathWorks Licensing Error 92
A licensing error occurred while trying to use <PRODUCTNAME>.
Your license file is no longer compatible with your license server and needs updating.
Contact your system administrator to check that your license file has the proper SERVER and USE_SERVER lines. MATLAB Answers — New Questions
MATLAB transmission line problem
Develop a MATLAB program to simulate a medium-length transmission line and evaluate the receiving-end voltage, current, and power, along with the voltage regulation of the line. The transmission line specifications are provided below:
A 345 kV, three-phase transmission line is 400 km in length. The series impedance is Z = 0.036 + j 0.3 ohm per phase per km and the shunt admittance is Y = j 4.22 x 10-6 siemens per phase per km. The sending-end voltage is 345 kV, and the sending-end current is 400 A with a 0.95 lagging power factor.Develop a MATLAB program to simulate a medium-length transmission line and evaluate the receiving-end voltage, current, and power, along with the voltage regulation of the line. The transmission line specifications are provided below:
A 345 kV, three-phase transmission line is 400 km in length. The series impedance is Z = 0.036 + j 0.3 ohm per phase per km and the shunt admittance is Y = j 4.22 x 10-6 siemens per phase per km. The sending-end voltage is 345 kV, and the sending-end current is 400 A with a 0.95 lagging power factor. Develop a MATLAB program to simulate a medium-length transmission line and evaluate the receiving-end voltage, current, and power, along with the voltage regulation of the line. The transmission line specifications are provided below:
A 345 kV, three-phase transmission line is 400 km in length. The series impedance is Z = 0.036 + j 0.3 ohm per phase per km and the shunt admittance is Y = j 4.22 x 10-6 siemens per phase per km. The sending-end voltage is 345 kV, and the sending-end current is 400 A with a 0.95 lagging power factor. medium transmission lines, matlab, simulink MATLAB Answers — New Questions
Why do I receive MathWorks Licensing Error 3?
Why do I receive the following error:
MathWorks Licensing Error 3
A licensing error occurred while trying to use <PRODUCTNAME>.Why do I receive the following error:
MathWorks Licensing Error 3
A licensing error occurred while trying to use <PRODUCTNAME>. Why do I receive the following error:
MathWorks Licensing Error 3
A licensing error occurred while trying to use <PRODUCTNAME>. MATLAB Answers — New Questions
Why do I receive MathWorks Licensing Error 12?
Why do I receive the following error:
MathWorks Licensing Error 12
A licensing error occurred while trying to use <PRODUCTNAME>.Why do I receive the following error:
MathWorks Licensing Error 12
A licensing error occurred while trying to use <PRODUCTNAME>. Why do I receive the following error:
MathWorks Licensing Error 12
A licensing error occurred while trying to use <PRODUCTNAME>. MATLAB Answers — New Questions
Why do I receive MathWorks Licensing Error 38?
Why do I receive the following error:
MathWorks Licensing Error 38
You are not authorized to use <PRODUCTNAME>.
Contact your system administrator to check the EXCLUDE list in the license server’s options file.Why do I receive the following error:
MathWorks Licensing Error 38
You are not authorized to use <PRODUCTNAME>.
Contact your system administrator to check the EXCLUDE list in the license server’s options file. Why do I receive the following error:
MathWorks Licensing Error 38
You are not authorized to use <PRODUCTNAME>.
Contact your system administrator to check the EXCLUDE list in the license server’s options file. MATLAB Answers — New Questions
Use an OWA Mailbox Policy to Block Attachment Download for the New Outlook for Windows
Make Sure that Users Can’t Download Copies of Attachments to Unmanaged Devices
A recent encounter with David Los in Microsoft’s HQ in Redmond reminded me of a relatively unknown feature of OWA mailbox policies that might be of interest as the new Outlook for Windows progresses. In October 2018, David wrote about how to combine a setting in a OWA mailbox policy with an Entra ID conditional access policy to block the download of attachments on untrusted (unmanaged) devices. It’s a similar idea to the SharePoint Online’s block download access policy.
Fast forward seven years and OWA mailbox policies control many aspects of how the new Outlook for Windows work, so let’s see if the setting works as well for it as it does for OWA.
Updating the Conditional Access Setting for an OWA Mailbox Policy
The magic starts with the ConditionalAccessPolicy setting in a OWA mailbox policy. The values of the setting can be:
- Off (default): Exchange Online doesn’t attempt to apply a CA policy.
- ReadOnly: Users can’t download attachments to make local copies (which means that they cannot use the Office apps to edit files). They can view attachments in the browser.
- ReadOnlyPlusAttachmentsBlocked: User cannot view attachments at all.
To set the block in the OWA mailbox policy, sign into the Exchange Online management PowerShell module with an account holding the Exchange administrator role and run the Set-OWAMailboxPolicy cmdlet to update an OWA mailbox policy. I don’t recommend that you update the default policy unless you want the block to apply to all users. Choose a different policy (or create a new policy by running the New-OWAMailboxPolicy cmdlet instead).
After updating the policy, run the Get-OWAMailboxPolicy cmdlet to check that the setting is in place for the chosen OWA mailbox policy. Note that the ConditionalAccessFeatures property for the policy reports the set of restrictions for OWA to enforce.
Set-OWAMailboxPolicy -Identity NoOfflineAccess -ConditionalAccessPolicy ReadOnly Get-OWAMailboxPolicy -Identity NoOfflineAccess | Format-List ConditionalAccess* ConditionalAccessPolicy : ReadOnly ConditionalAccessFeatures : {Offline, AttachmentDirectFileAccessOnPrivateComputersEnabled, AttachmentDirectFileAccessOnPublicComputersEnabled, AttachmentPrintWithoutDownload}
When the ConditionalAccessPolicy setting is ReadOnlyPlusAttachmentsBlocked, the AttachmentWacViewingOnPrivateComputersEnabled and AttachmentWacViewingOnPublicComputersEnabled are added to the set of restrictions.
Use the Set-CASMailbox cmdlet to apply the OWA mailbox policy to a mailbox. It normally takes about 15 minutes for an updated policy to be effective. In the meantime, run Get-CASMailbox to check which mailboxes come within the scope of the policy, just in case some other mailboxes are affected.
Set-CasMailbox -Identity "Marty.King" -OwaMailboxPolicy 'NoOfflineAccess' Get-CasMailbox -RecipientTypeDetails UserMailbox | Where-Object {$_.OWAMailboxPolicy -eq 'NoOfflineAccess'} | Format-Table DisplayName, OWAMailboxPolicy
Create a Conditional Access Policy to Block OWA Downloads
Figure 1 illustrates the details of the conditional access policy to enforce the blocks specified in the OWA mailbox policy. The session control for the CA policy says: “use app enforced restrictions,” which is the set of restrictions defined in the OWA mailbox policy. The only role conditional access has here is to notify the selected app(s) that they should apply restrictions because the device used for the connection is unmanaged.
The app is Office 365 Exchange Online, the enterprise app used by Exchange Online for many purposes, including OWA (its role in managing hybrid rich coexistence is being replaced by a dedicated tenant app soon).

Testing the Block Download Policy with OWA
To test the policies, I ran OWA on an iPad (an unmanaged device). A banner on messages with attachments informed me that the block on download and printing existed (Figure 2). Microsoft refers to this as the “limited access experience.”

A side-effect of imposing the CA policy is that the light version of OWA is blocked, probably because the light version is so simple that it doesn’t include the necessary smarts to handle the CA policy.
Testing with the New Outlook for Windows
Experience so far of managing the new Outlook is that settings from OWA mailbox policies apply to the Monarch client. Testing confirms that this is also true for conditional access restrictions. Installing and running the new Outlook for Windows on a Windows PC shows that the client picks up the same restriction as applied to OWA (Figure 3).

It’s nice that the restrictions imposed by the OWA mailbox policy work, but it would be nicer if the documentation reflected the fact. I’m sure Microsoft will get around to updating its web pages. In the meantime, to learn more about blocking access to downloads, here’s a Practical365.com article to read.
Learn about managing Exchange Online 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.
Warning: Error updating FunctionLine in using fplot
Hi all, I wrote a function, using the PDE modeler app, that takes a radius as input and solves a PDE on a shape depending on r, and integrates the solution on the same shape. The function by itself seems to be working. However, when I try tu use fplot to plot it, it gives me the following warning: "Warning: Error updating FunctionLine. The following error was reported evaluating the function in FunctionLine update: Dimensions of arrays being concatenated are not consistent.", and I’m not really sure why that is. The code is below.
Thanks in advance!
fplot(@(r) Ttr(r), [1-1/sqrt(3), 0.47])
function [rt] = Ttr(r)
C1=[1; 1-r; 0; r; 0; 0; 0; 0];
P1=[2; 3; 0; (1-2*r)/(1-r); (1-2*r)/(1-r); 0; r/(1-r)*sqrt(1-2*r); -r/(1-r)*sqrt(1-2*r)];
dg=[C1, P1];
ns = char(‘C1′,’P1’);
ns = ns’;
sf=’C1+P1′;
[dl,bt] = decsg(dg,sf,ns);
[dl1,~] = csgdel(dl,bt);
%pdegplot(dl1,"EdgeLabels","on","FaceLabels","on")
%e=input("Inserire il numero di lati della figura: ");
model = createpde();
geometryFromEdges(model,dl1);
applyBoundaryCondition(model,"dirichlet","Edge", 1:6,"u",0);
specifyCoefficients(model,"m",0,"d",0,"c",1,"a",0,"f",1);
mesh=generateMesh(model, Hmax=0.05, Hmin=0.00005, GeometricOrder=’linear’);
[p,~,t] = meshToPet(mesh);
u=solvepde(model);
rt=0;
k=length(t(1,:));
for j=1:k
A=p(:,t(1,j));
B=p(:,t(2,j));
C=p(:,t(3,j));
M=[A(1),A(2),1; B(1),B(2),1; C(1),C(2),1];
rt=rt+1/2*(u.NodalSolution(t(1,j))+u.NodalSolution(t(2,j))+u.NodalSolution(t(3,j)))/3 * abs(det(M));
end
endHi all, I wrote a function, using the PDE modeler app, that takes a radius as input and solves a PDE on a shape depending on r, and integrates the solution on the same shape. The function by itself seems to be working. However, when I try tu use fplot to plot it, it gives me the following warning: "Warning: Error updating FunctionLine. The following error was reported evaluating the function in FunctionLine update: Dimensions of arrays being concatenated are not consistent.", and I’m not really sure why that is. The code is below.
Thanks in advance!
fplot(@(r) Ttr(r), [1-1/sqrt(3), 0.47])
function [rt] = Ttr(r)
C1=[1; 1-r; 0; r; 0; 0; 0; 0];
P1=[2; 3; 0; (1-2*r)/(1-r); (1-2*r)/(1-r); 0; r/(1-r)*sqrt(1-2*r); -r/(1-r)*sqrt(1-2*r)];
dg=[C1, P1];
ns = char(‘C1′,’P1’);
ns = ns’;
sf=’C1+P1′;
[dl,bt] = decsg(dg,sf,ns);
[dl1,~] = csgdel(dl,bt);
%pdegplot(dl1,"EdgeLabels","on","FaceLabels","on")
%e=input("Inserire il numero di lati della figura: ");
model = createpde();
geometryFromEdges(model,dl1);
applyBoundaryCondition(model,"dirichlet","Edge", 1:6,"u",0);
specifyCoefficients(model,"m",0,"d",0,"c",1,"a",0,"f",1);
mesh=generateMesh(model, Hmax=0.05, Hmin=0.00005, GeometricOrder=’linear’);
[p,~,t] = meshToPet(mesh);
u=solvepde(model);
rt=0;
k=length(t(1,:));
for j=1:k
A=p(:,t(1,j));
B=p(:,t(2,j));
C=p(:,t(3,j));
M=[A(1),A(2),1; B(1),B(2),1; C(1),C(2),1];
rt=rt+1/2*(u.NodalSolution(t(1,j))+u.NodalSolution(t(2,j))+u.NodalSolution(t(3,j)))/3 * abs(det(M));
end
end Hi all, I wrote a function, using the PDE modeler app, that takes a radius as input and solves a PDE on a shape depending on r, and integrates the solution on the same shape. The function by itself seems to be working. However, when I try tu use fplot to plot it, it gives me the following warning: "Warning: Error updating FunctionLine. The following error was reported evaluating the function in FunctionLine update: Dimensions of arrays being concatenated are not consistent.", and I’m not really sure why that is. The code is below.
Thanks in advance!
fplot(@(r) Ttr(r), [1-1/sqrt(3), 0.47])
function [rt] = Ttr(r)
C1=[1; 1-r; 0; r; 0; 0; 0; 0];
P1=[2; 3; 0; (1-2*r)/(1-r); (1-2*r)/(1-r); 0; r/(1-r)*sqrt(1-2*r); -r/(1-r)*sqrt(1-2*r)];
dg=[C1, P1];
ns = char(‘C1′,’P1’);
ns = ns’;
sf=’C1+P1′;
[dl,bt] = decsg(dg,sf,ns);
[dl1,~] = csgdel(dl,bt);
%pdegplot(dl1,"EdgeLabels","on","FaceLabels","on")
%e=input("Inserire il numero di lati della figura: ");
model = createpde();
geometryFromEdges(model,dl1);
applyBoundaryCondition(model,"dirichlet","Edge", 1:6,"u",0);
specifyCoefficients(model,"m",0,"d",0,"c",1,"a",0,"f",1);
mesh=generateMesh(model, Hmax=0.05, Hmin=0.00005, GeometricOrder=’linear’);
[p,~,t] = meshToPet(mesh);
u=solvepde(model);
rt=0;
k=length(t(1,:));
for j=1:k
A=p(:,t(1,j));
B=p(:,t(2,j));
C=p(:,t(3,j));
M=[A(1),A(2),1; B(1),B(2),1; C(1),C(2),1];
rt=rt+1/2*(u.NodalSolution(t(1,j))+u.NodalSolution(t(2,j))+u.NodalSolution(t(3,j)))/3 * abs(det(M));
end
end matlab, plot, error, function MATLAB Answers — New Questions
Solid creation Simulink, simscape multibody: stuck in loading
Hi, despite having a high end pc, solid creation window in Simulink (simscape multibody) keeps getting stuck in loading when I try to create new solids (or import them). This happens regardless the complexity of the component’s geometry (could happen even with a simple cube created with the brick block). Anyone knows why this happens and eventually how could I fix it? Thanks in advance.Hi, despite having a high end pc, solid creation window in Simulink (simscape multibody) keeps getting stuck in loading when I try to create new solids (or import them). This happens regardless the complexity of the component’s geometry (could happen even with a simple cube created with the brick block). Anyone knows why this happens and eventually how could I fix it? Thanks in advance. Hi, despite having a high end pc, solid creation window in Simulink (simscape multibody) keeps getting stuck in loading when I try to create new solids (or import them). This happens regardless the complexity of the component’s geometry (could happen even with a simple cube created with the brick block). Anyone knows why this happens and eventually how could I fix it? Thanks in advance. simscape, multibody, simulink MATLAB Answers — New Questions
Issues with EMG Signal Acquisition via Simulink Desktop Real-Time (SDRT) and DAQ Board Usage
Good morning,
I am trying to use Simulink Desktop Real-Time (SDRT) for EMG signal acquisition. My intention is to use a DAQ board along with a laptop, but I am encountering some difficulties.
From what I’ve read, USB-based DAQ boards are not supported by SDRT, likely due to the use of a real-time kernel, which temporarily blocks access to the Windows driver for reading the COM port.
I was wondering if it is possible to use a PCI-based DAQ board with a PCI-to-Thunderbolt converter in order to use my laptop, or if the only viable solution is to use VHDL cables and a desktop PC to install the data acquisition board.
Thank you for your attention,Good morning,
I am trying to use Simulink Desktop Real-Time (SDRT) for EMG signal acquisition. My intention is to use a DAQ board along with a laptop, but I am encountering some difficulties.
From what I’ve read, USB-based DAQ boards are not supported by SDRT, likely due to the use of a real-time kernel, which temporarily blocks access to the Windows driver for reading the COM port.
I was wondering if it is possible to use a PCI-based DAQ board with a PCI-to-Thunderbolt converter in order to use my laptop, or if the only viable solution is to use VHDL cables and a desktop PC to install the data acquisition board.
Thank you for your attention, Good morning,
I am trying to use Simulink Desktop Real-Time (SDRT) for EMG signal acquisition. My intention is to use a DAQ board along with a laptop, but I am encountering some difficulties.
From what I’ve read, USB-based DAQ boards are not supported by SDRT, likely due to the use of a real-time kernel, which temporarily blocks access to the Windows driver for reading the COM port.
I was wondering if it is possible to use a PCI-based DAQ board with a PCI-to-Thunderbolt converter in order to use my laptop, or if the only viable solution is to use VHDL cables and a desktop PC to install the data acquisition board.
Thank you for your attention, simulink desktop real time, daq aquisition board, thunderbot pci MATLAB Answers — New Questions
Does Matlab 2023b support Classification learner like what I got trainned in ML Module?
Hi there,
I am using the Matlab 2021b and classification learner on this version doesn’t include all the clicked and selected Detailed Feature Selection: MRMR, Chi2, or Neighboorhood Component Analysis,… The version I got now is different than the one that I got trainned in Machine Learning Module. Also, the cross-validation/substitution training to split training and testing at the beginning is also different than online-training modules.
I am a PhD student and using the University-owned laptop and I want to get all the features I got trainned in the version, but I don’t know which releases I was trainned on? Would you please help me how I know what is the lastest release of classification learner and on which release it is available?
I am able to download 2023b and get it installed and if 2024b, I need to wait the University update it.
I appreciate your clarification.Hi there,
I am using the Matlab 2021b and classification learner on this version doesn’t include all the clicked and selected Detailed Feature Selection: MRMR, Chi2, or Neighboorhood Component Analysis,… The version I got now is different than the one that I got trainned in Machine Learning Module. Also, the cross-validation/substitution training to split training and testing at the beginning is also different than online-training modules.
I am a PhD student and using the University-owned laptop and I want to get all the features I got trainned in the version, but I don’t know which releases I was trainned on? Would you please help me how I know what is the lastest release of classification learner and on which release it is available?
I am able to download 2023b and get it installed and if 2024b, I need to wait the University update it.
I appreciate your clarification. Hi there,
I am using the Matlab 2021b and classification learner on this version doesn’t include all the clicked and selected Detailed Feature Selection: MRMR, Chi2, or Neighboorhood Component Analysis,… The version I got now is different than the one that I got trainned in Machine Learning Module. Also, the cross-validation/substitution training to split training and testing at the beginning is also different than online-training modules.
I am a PhD student and using the University-owned laptop and I want to get all the features I got trainned in the version, but I don’t know which releases I was trainned on? Would you please help me how I know what is the lastest release of classification learner and on which release it is available?
I am able to download 2023b and get it installed and if 2024b, I need to wait the University update it.
I appreciate your clarification. classification learner, 2023b MATLAB Answers — New Questions
Penetration Test Asks Questions About Copilot Access to SharePoint Online
Can Attackers Use Copilot for Microsoft 365 to Help Find Information?
An article by a UK-based security penetration test company titled “Exploiting Copilot AI for SharePoint” drew my attention to see what weaknesses testing had found. I was disappointed. Although the article makes some good points, it doesn’t tell reveal anything new about the potential issues that can arise due to poor protection of information stored in SharePoint Online sites. Let’s discuss the points raised in the article.
A Compromised Account
Copilot for Microsoft 365 always works as a signed in user. Before an attacker can use Copilot for Microsoft 365, they must be able to sign into a licensed user’s account. In other words, that account is compromised. That’s bad for a tenant because any compromise can lead to data loss or other damage, and it’s probably indicative of other problems that attackers can exploit without going near Copilot.
Organizations should protect themselves with strong multifactor authentication (MFA). That message seems to be slowly getting through, and you’d imagine that any tenant willing to invest in Copilot is also willing to protect themselves by insisting that all accounts are protected by MFA.
Seeking Sensitive Information
The authors make a good point that people often store sensitive information in SharePoint Online. Attackers like to search for information about passwords, private keys, and sensitive documents. Copilot undoubtedly makes it much easier for attackers to search, but I don’t think that the default site agents create any vulnerability because these agents are constrained to searching within the sites they belong to.
Custom agents might be more problematic, but that depends on the information accessed by the agents. It also depends on the penetrated user being able to run the custom agents. The big thing to remember here is that Copilot can only access data available to the account being used. Custom agents in the hands of an attacker can’t automagically get to some hidden data. Anyway, organizations should monitor the creation of agents and have some method to approve the use of those agents.
Accessing Password Data
The penetration team reported that they had found an interesting file (an encrypted spreadsheet) that appeared to contain passwords that SharePoint blocked access to because “all methods of opening the file in the browser had been restricted.” This sounds like SharePoint’s block download policy was in operation for the site. However, Copilot was able to fetch and display the passwords stored in the file.
It’s likely that the spreadsheet was “encrypted” using the default Excel protection applied when a user adds a password to a spreadsheet. However, the encryption is no match for Microsoft Search, which can index the information in the file, and that’s what Copilot for Microsoft 365 Chat was able to display (Figure 1).

Excel’s encryption is very poor protection in the era of AI. Sensitivity labels should be used to secure access to sensitive information, specifically labels that do not allow Copilot to extract and display information from files found by searching against Microsoft Search. Even better, use the DLP policy for Microsoft 365 Copilot to completely hide sensitive files against Copilot so that not even the file metadata is indexed.
Alternatively, use Restricted Content Discovery (RCD) to hide complete sites so that casual browsing by attackers (or anyone else looking for “interesting” information). Apart from RCD, Microsoft makes other SharePoint Advanced Management (SAM) features available to Microsoft 365 Copilot tenants. There’s no excuse for failing to use the access control and reporting features to secure sensitive sites.
Copilot for Microsoft 365 is a Superb Seeker
Copilot for Microsoft 365 is superb at finding information stored in SharePoint Online and OneDrive for Business. With good prompting, an attacker with access to a compromised account can retrieve data faster than ever before, and unlike previous methods of trawling through SharePoint files, Copilot access doesn’t leave breadcrumbs like entries in the last files accessed list.
Copilot access can be constrained by making sure that suitable permissions are in place for documents, deploying the DLP policy for Microsoft 365 Copilot, and limiting access to confidential sites through Restricted Content Discovery. The DLP policy and RCD are recent Copilot control mechanisms that I don’t think the authors of the penetration test report considered (even though they refer to blocking agents with RCD). But available mechanisms are worthless unless implemented, and the real value of reports like this is to prompt administrators to use available tools, including MFA to reduce the likelihood of a compromised account.
Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.
Issue with imdistline() function in MATLAB?
I am trying to measure the distance two points on an image and then use that distance as an input for some other function. Here is my code:"
if true
figure, imshow(I);
h = imdistline(gca);
api = iptgetapi(h);
width = api.getDistance();
end
When I run it, I am able to drag and get the distance I want on the image, but the distance I get from using the getDistance is some default value it started with , when it opened and it does not change , even if I change it in the image. How can the variable width have the distance i measured before I press enter or any eye and close the image.
EricI am trying to measure the distance two points on an image and then use that distance as an input for some other function. Here is my code:"
if true
figure, imshow(I);
h = imdistline(gca);
api = iptgetapi(h);
width = api.getDistance();
end
When I run it, I am able to drag and get the distance I want on the image, but the distance I get from using the getDistance is some default value it started with , when it opened and it does not change , even if I change it in the image. How can the variable width have the distance i measured before I press enter or any eye and close the image.
Eric I am trying to measure the distance two points on an image and then use that distance as an input for some other function. Here is my code:"
if true
figure, imshow(I);
h = imdistline(gca);
api = iptgetapi(h);
width = api.getDistance();
end
When I run it, I am able to drag and get the distance I want on the image, but the distance I get from using the getDistance is some default value it started with , when it opened and it does not change , even if I change it in the image. How can the variable width have the distance i measured before I press enter or any eye and close the image.
Eric image processing, image, image analysis MATLAB Answers — New Questions
XCP internal error in arduino uno
I try to connect and use Arduino uno but I am facing this error: External Mode Open Protocol Connect command failed
Caused by: Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT commandI try to connect and use Arduino uno but I am facing this error: External Mode Open Protocol Connect command failed
Caused by: Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command I try to connect and use Arduino uno but I am facing this error: External Mode Open Protocol Connect command failed
Caused by: Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command xcp internal error, arduino MATLAB Answers — New Questions
Ansys Motion to Simulink Interface Problem
Hi,
I have an MBD model in Ansys Motion with multiple inputs and outputs. I’ve created an M-file for this model using MATLAB co-sim. I want to import this into the MATLAB/Simulink environment, where I may need to design a controller later. This means I need to be able to see and control the inputs and outputs within the Simulink environment.
I’m using the ‘mbdlib’ library to import my M-file into Simulink, but I’m getting the error shown in the attachment within the S-Function block of the MBD Solver.
Also, the model indicated by the colored blocks is located inside the MBD block. Should I import the M-file into the "Dynamic Model" section here?
Could you please help me with this issue?
Best regards.Hi,
I have an MBD model in Ansys Motion with multiple inputs and outputs. I’ve created an M-file for this model using MATLAB co-sim. I want to import this into the MATLAB/Simulink environment, where I may need to design a controller later. This means I need to be able to see and control the inputs and outputs within the Simulink environment.
I’m using the ‘mbdlib’ library to import my M-file into Simulink, but I’m getting the error shown in the attachment within the S-Function block of the MBD Solver.
Also, the model indicated by the colored blocks is located inside the MBD block. Should I import the M-file into the "Dynamic Model" section here?
Could you please help me with this issue?
Best regards. Hi,
I have an MBD model in Ansys Motion with multiple inputs and outputs. I’ve created an M-file for this model using MATLAB co-sim. I want to import this into the MATLAB/Simulink environment, where I may need to design a controller later. This means I need to be able to see and control the inputs and outputs within the Simulink environment.
I’m using the ‘mbdlib’ library to import my M-file into Simulink, but I’m getting the error shown in the attachment within the S-Function block of the MBD Solver.
Also, the model indicated by the colored blocks is located inside the MBD block. Should I import the M-file into the "Dynamic Model" section here?
Could you please help me with this issue?
Best regards. simulink, co-simulation MATLAB Answers — New Questions
find sequence in a matrix
Hi, it possibile to velocize it and avoid loop? (I will be a matrix .,not a single array)
(if is possible to use vectorization)
I=[0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0]
k=3;
for i=1:numel(I)
if i>=k+1
if I(i-1) && ~I(i) %%i want to find the first "1 0"
saved=i;
break;
end
end
end
savedHi, it possibile to velocize it and avoid loop? (I will be a matrix .,not a single array)
(if is possible to use vectorization)
I=[0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0]
k=3;
for i=1:numel(I)
if i>=k+1
if I(i-1) && ~I(i) %%i want to find the first "1 0"
saved=i;
break;
end
end
end
saved Hi, it possibile to velocize it and avoid loop? (I will be a matrix .,not a single array)
(if is possible to use vectorization)
I=[0 1 0 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0]
k=3;
for i=1:numel(I)
if i>=k+1
if I(i-1) && ~I(i) %%i want to find the first "1 0"
saved=i;
break;
end
end
end
saved find sequence in a matrix MATLAB Answers — New Questions
Inserting additional data in an already created table
Hello, Im messing around with tables again and create one from the user inputs from inputdlg
prompt = {‘Soak(s)’,’Soak Move (ymm)’,’Laser Volts (Soak, Image)’,’numImages(afterSOAK)’,’ZTLpos(soak), abs’,’Back To Nominal Wait Time(s)’,’NumImages (Back To Nominal)’};
dlgtitle = ‘Laser Soak’;
dims = [1 35];
definput = {’30’,’-1′,’2, 0.18′,’4′,’-1833′,’60’,’12’};
answer = inputdlg(prompt,dlgtitle,dims,definput);
answer
T = table(char(answer))
I want to add another entry to the end and thought this would do it
defaultZTL=’-2000′;
T(end+1,1)={defaultZTL}
But Im getting this error
Assigning to a character variable in a table is only supported when the right-hand side value is a table. Consider using a string
variable in the table for text data.
Error in HTS_TestSoftware/LaserSOAKButtonPushed (line 12557)
T(end+1,1)={defaultZTL}Hello, Im messing around with tables again and create one from the user inputs from inputdlg
prompt = {‘Soak(s)’,’Soak Move (ymm)’,’Laser Volts (Soak, Image)’,’numImages(afterSOAK)’,’ZTLpos(soak), abs’,’Back To Nominal Wait Time(s)’,’NumImages (Back To Nominal)’};
dlgtitle = ‘Laser Soak’;
dims = [1 35];
definput = {’30’,’-1′,’2, 0.18′,’4′,’-1833′,’60’,’12’};
answer = inputdlg(prompt,dlgtitle,dims,definput);
answer
T = table(char(answer))
I want to add another entry to the end and thought this would do it
defaultZTL=’-2000′;
T(end+1,1)={defaultZTL}
But Im getting this error
Assigning to a character variable in a table is only supported when the right-hand side value is a table. Consider using a string
variable in the table for text data.
Error in HTS_TestSoftware/LaserSOAKButtonPushed (line 12557)
T(end+1,1)={defaultZTL} Hello, Im messing around with tables again and create one from the user inputs from inputdlg
prompt = {‘Soak(s)’,’Soak Move (ymm)’,’Laser Volts (Soak, Image)’,’numImages(afterSOAK)’,’ZTLpos(soak), abs’,’Back To Nominal Wait Time(s)’,’NumImages (Back To Nominal)’};
dlgtitle = ‘Laser Soak’;
dims = [1 35];
definput = {’30’,’-1′,’2, 0.18′,’4′,’-1833′,’60’,’12’};
answer = inputdlg(prompt,dlgtitle,dims,definput);
answer
T = table(char(answer))
I want to add another entry to the end and thought this would do it
defaultZTL=’-2000′;
T(end+1,1)={defaultZTL}
But Im getting this error
Assigning to a character variable in a table is only supported when the right-hand side value is a table. Consider using a string
variable in the table for text data.
Error in HTS_TestSoftware/LaserSOAKButtonPushed (line 12557)
T(end+1,1)={defaultZTL} table MATLAB Answers — New Questions
Programmatically create histograms like Color Thresholder
How can I programaticlly in Matlab code create image histograms that look like the ones in Color Thresholder? I don’t want to launch Color Thresholder from the Matlab prompt. I want to generate my own histograms that looks like the ones in Color Thresholder. Ideally I would like to create this identical histogram in a script without having to manually open Color Thresholder, load my image, and then switch to YCbCr.How can I programaticlly in Matlab code create image histograms that look like the ones in Color Thresholder? I don’t want to launch Color Thresholder from the Matlab prompt. I want to generate my own histograms that looks like the ones in Color Thresholder. Ideally I would like to create this identical histogram in a script without having to manually open Color Thresholder, load my image, and then switch to YCbCr. How can I programaticlly in Matlab code create image histograms that look like the ones in Color Thresholder? I don’t want to launch Color Thresholder from the Matlab prompt. I want to generate my own histograms that looks like the ones in Color Thresholder. Ideally I would like to create this identical histogram in a script without having to manually open Color Thresholder, load my image, and then switch to YCbCr. image-processing, histogram MATLAB Answers — New Questions
How to plot function x(2)=-1/2*x(1)+t?
clc;
clear;
close;
x1=3+3/8;
u=8;
teta(1)=0;
%teta(u+2)=0.2;
for i=1:u
teta(i+1)=i/5;
end
for j=1:1
for k=1:u
%initial_func=[x1,x2];
[t,x] = ode45(@IJP4,[teta(k):0.0001:teta(k+1)], x1(j));%
n=length(t);
%disp(size(x));
x1(j)=x(n,1)+4*x(n,1);
hold on
%view(30,15);
x(2)=-1/2*x(1)+t;
hold on
figure(1)
subplot(2,1,1);
plot(t,x(:,2),’color’,’g’,’Linewidth’,1.2);
xlabel(‘bf t’); ylabel(‘$$z$$’,’interpreter’,’latex’,’fontsize’,16); zlabel(‘bf psi_2’);
grid on
hold on
subplot(2,1,2);
plot(t,x(:,1),’color’,’g’,’Linewidth’,1.2);
xlabel(‘bf t’); ylabel(‘$$y$$’,’interpreter’,’latex’,’fontsize’,16); zlabel(‘bf psi_3’);
grid on
hold on
figure(2)
plot3(t,x(:,1),x(:,1),’g’);
xlabel(‘$$t$$’,’interpreter’,’latex’,’fontsize’,16)
%ylabel(‘phi_{2}’,’fontsize’,16)
ylabel(‘$$z$$’,’interpreter’,’latex’,’fontsize’,16)
zlabel(‘$$y$$’,’interpreter’,’latex’,’fontsize’,16);
grid on
hold on
end
end
function dx=IJP4(t,x)
dx=zeros(1,1); % создает нулевой вектор-столбец
dx(1)=-3/2*x(1)-6*x(1);
endclc;
clear;
close;
x1=3+3/8;
u=8;
teta(1)=0;
%teta(u+2)=0.2;
for i=1:u
teta(i+1)=i/5;
end
for j=1:1
for k=1:u
%initial_func=[x1,x2];
[t,x] = ode45(@IJP4,[teta(k):0.0001:teta(k+1)], x1(j));%
n=length(t);
%disp(size(x));
x1(j)=x(n,1)+4*x(n,1);
hold on
%view(30,15);
x(2)=-1/2*x(1)+t;
hold on
figure(1)
subplot(2,1,1);
plot(t,x(:,2),’color’,’g’,’Linewidth’,1.2);
xlabel(‘bf t’); ylabel(‘$$z$$’,’interpreter’,’latex’,’fontsize’,16); zlabel(‘bf psi_2’);
grid on
hold on
subplot(2,1,2);
plot(t,x(:,1),’color’,’g’,’Linewidth’,1.2);
xlabel(‘bf t’); ylabel(‘$$y$$’,’interpreter’,’latex’,’fontsize’,16); zlabel(‘bf psi_3’);
grid on
hold on
figure(2)
plot3(t,x(:,1),x(:,1),’g’);
xlabel(‘$$t$$’,’interpreter’,’latex’,’fontsize’,16)
%ylabel(‘phi_{2}’,’fontsize’,16)
ylabel(‘$$z$$’,’interpreter’,’latex’,’fontsize’,16)
zlabel(‘$$y$$’,’interpreter’,’latex’,’fontsize’,16);
grid on
hold on
end
end
function dx=IJP4(t,x)
dx=zeros(1,1); % создает нулевой вектор-столбец
dx(1)=-3/2*x(1)-6*x(1);
end clc;
clear;
close;
x1=3+3/8;
u=8;
teta(1)=0;
%teta(u+2)=0.2;
for i=1:u
teta(i+1)=i/5;
end
for j=1:1
for k=1:u
%initial_func=[x1,x2];
[t,x] = ode45(@IJP4,[teta(k):0.0001:teta(k+1)], x1(j));%
n=length(t);
%disp(size(x));
x1(j)=x(n,1)+4*x(n,1);
hold on
%view(30,15);
x(2)=-1/2*x(1)+t;
hold on
figure(1)
subplot(2,1,1);
plot(t,x(:,2),’color’,’g’,’Linewidth’,1.2);
xlabel(‘bf t’); ylabel(‘$$z$$’,’interpreter’,’latex’,’fontsize’,16); zlabel(‘bf psi_2’);
grid on
hold on
subplot(2,1,2);
plot(t,x(:,1),’color’,’g’,’Linewidth’,1.2);
xlabel(‘bf t’); ylabel(‘$$y$$’,’interpreter’,’latex’,’fontsize’,16); zlabel(‘bf psi_3’);
grid on
hold on
figure(2)
plot3(t,x(:,1),x(:,1),’g’);
xlabel(‘$$t$$’,’interpreter’,’latex’,’fontsize’,16)
%ylabel(‘phi_{2}’,’fontsize’,16)
ylabel(‘$$z$$’,’interpreter’,’latex’,’fontsize’,16)
zlabel(‘$$y$$’,’interpreter’,’latex’,’fontsize’,16);
grid on
hold on
end
end
function dx=IJP4(t,x)
dx=zeros(1,1); % создает нулевой вектор-столбец
dx(1)=-3/2*x(1)-6*x(1);
end index in position 2 exceeds array bounds (must not MATLAB Answers — New Questions