Month: September 2024
Addition & Multiplication in one cell?
Hi,
I’m building a formula that tracks revenue as per piece counts. The table shown would need to calculate column B, while :heavy_multiplication_x: column C10
Is there a way to do this apart from a static SUM B4:B9*C10? As some routes will not use all service fields as shown in the attached photo.
Thank you.
Hi,I’m building a formula that tracks revenue as per piece counts. The table shown would need to calculate column B, while :heavy_multiplication_x: column C10 Is there a way to do this apart from a static SUM B4:B9*C10? As some routes will not use all service fields as shown in the attached photo. Thank you. Read More
The HoloLens2 continuously plays the startup sound while charging and is unable to boot up properly
Hi everyone,
Recently, during the development process with the HoloLens 2, I encountered an issue where the device failed to boot properly. I attempted to restart the device several times, but the problem persisted.
While charging, One light fading in and out as mentioning in(https://learn.microsoft.com/en-us/hololens/hololens2-setup#lights-that-indicate-the-battery-level), followed by the startup sound playing repeatedly, and the device not functioning normally.
According to the documents, light to indicate problem, I judge the device battery might be very low, but after trying to plug in, and to charge the device, it seems not working.
Is there anything else I could try to get it working again?
Thank you kindly in advance for any suggestions.
Hi everyone,Recently, during the development process with the HoloLens 2, I encountered an issue where the device failed to boot properly. I attempted to restart the device several times, but the problem persisted.While charging, One light fading in and out as mentioning in(https://learn.microsoft.com/en-us/hololens/hololens2-setup#lights-that-indicate-the-battery-level), followed by the startup sound playing repeatedly, and the device not functioning normally.According to the documents, light to indicate problem, I judge the device battery might be very low, but after trying to plug in, and to charge the device, it seems not working.Is there anything else I could try to get it working again?Thank you kindly in advance for any suggestions. Read More
extracting a single worksheet from a file
I have been asked to consolidate information from a lot of files. I have a folder with excel files, I need to extract one single tab (or worksheet) from all of them. can this be done?
my preference would be to automatically merge these tabs(or worksheets) into one; however, I am still fine to have them as separate files, then I can merge them.
What would I need to do during set up? do all the tabs need to be named the same?
example, I have 50 budget files, each budget has a tab that summarizes the data from other tabs. do the tabs all need to be named “summary?”
I have been asked to consolidate information from a lot of files. I have a folder with excel files, I need to extract one single tab (or worksheet) from all of them. can this be done?my preference would be to automatically merge these tabs(or worksheets) into one; however, I am still fine to have them as separate files, then I can merge them.What would I need to do during set up? do all the tabs need to be named the same?example, I have 50 budget files, each budget has a tab that summarizes the data from other tabs. do the tabs all need to be named “summary?” Read More
Entra ID federation with Google Workspace
Entra ID federation with Google Workspace
Google Workspace federation allows you to manage user identities in your Entra ID tenants while authenticating these users through Google. This can be beneficial if your company wants to use a single source of identities across different cloud platforms.
This article covers the scenario where your domain is already added and verified in Entra ID.
Requirements
To use Google Workspace federation, you need to ensure that your federated users are created in the Entra ID directory. This can be done through various methods such as auto-provisioning or using the Graph API.
Keep in mind, that the out-of-the box federation for Google only works for gmail.com personal accounts. In order to federate with work accounts managed in Google Workspace, you have to configure SAML IDP federation.
Configuring SAML Federation on Google Workspace side
To configure SAML federation in Google Workspace, follow these steps:
1. Create a Web Application in Google Admin Panel:
Navigate to https://admin.google.com/
Go to Apps -> Web and mobile apps
Click Add app -> Search for apps
Search for “Microsoft Office 365” and install it.
2. Download Metadata:
After installing the app, go to the app details and download the metadata.
Save the IdP metadata file (GoogleIDPMetadata.xml) as it will be used to set up Microsoft Entra ID later.
3. Enable Auto-Provisioning:
Enable auto-provisioning inside the “Microsoft Office 365” app.
4. Configure Service Provider Details:
On the Service Provider details page:
Select the option Signed response.
Verify that the Name ID format is set to PERSISTENT.
Under SAML attribute mapping, select Basic Information and map Primary email to IDPEmail.
5. Enable the App for Users in Google Workspace:
Go to Apps -> Web and mobile apps -> Microsoft Office 365 -> User access.
Select ON for everyone and save the changes.
Adding Federation for SAML Provider in Entra ID
Using the IdP metadata XML file downloaded from Google Workspace, modify the $DomainName variable in the following script to match your environment, and then run it in a PowerShell session:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
Install-Module Microsoft.Graph -Scope CurrentUser
Import-Module Microsoft.Graph
$domainId = “<your domain name>”
$xml = [Xml](Get-Content GoogleIDPMetadata.xml)
$cert = -join $xml.EntityDescriptor.IDPSSODescriptor.KeyDescriptor.KeyInfo.X509Data.X509Certificate.Split()
$issuerUri = $xml.EntityDescriptor.entityID
$signinUri = $xml.EntityDescriptor.IDPSSODescriptor.SingleSignOnService | ? { $_.Binding.Contains(‘Redirect’) } | % { $_.Location }
$signoutUri = “https://accounts.google.com/logout”
$displayName = “Google Workspace Identity”
Connect-MGGraph -Scopes “Domain.ReadWrite.All”, “Directory.AccessAsUser.All”
$domainAuthParams = @{
DomainId = $domainId
IssuerUri = $issuerUri
DisplayName = $displayName
ActiveSignInUri = $signinUri
PassiveSignInUri = $signinUri
SignOutUri = $signoutUri
SigningCertificate = $cert
PreferredAuthenticationProtocol = “saml”
federatedIdpMfaBehavior = “acceptIfMfaDoneByFederatedIdp”
}
New-MgDomainFederationConfiguration @domainAuthParams
To verify that the configuration is correct, you can use the following PowerShell command:
Get-MgDomainFederationConfiguration -DomainId $domainId |fl
Test the federation
To test the federation, navigate to https://portal.azure.com and sign in with a Google Workspace account:
As username, use the email as defined in Google Workspace. The user is redirected to Google Workspace to sign in.
After Google Workspace authentication, the user is redirected back to Microsoft Entra ID and signed in.
Troubleshooting
If you configured federation after users were created in Entra ID, it is possible that users will get an error AADSTS51004
AADSTS51004: The user account XXX does not exist in the YYY directory. To sign into this application, the account must be added to the directory.
This error is most likely caused by property ImmutableId being incorrect.
For Google Workspace federation ImmutableId has to be set as a primary email adress of the user.
Follow these steps to update the ImmutableID:
Convert the federated user to a cloud-only user (update the UPN to a non-federated domain)
Update the ImmutableId
Convert the user back to a federated user
Here’s a PowerShell example to update the ImmutableId for a federated user:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
Install-Module Microsoft.Graph -Scope CurrentUser
Import-Module Microsoft.Graph
Connect-MgGraph -Scopes ‘User.Read.All’, ‘User.ReadWrite.All’
#1. Convert the user from federated to cloud-only
Update-MgUser -UserId test@example.com -UserPrincipalName test@example.onmicrosoft.com
#2. Convert the user back to federated, while setting the immutableId
Update-MgUser -UserId test@example.onmicrosoft.com -UserPrincipalName test@example.com -OnPremisesImmutableId ‘test@example.com’
Conclusion
In summary, Entra ID federation with Google Workspace allows seamless user identity management and authentication across different cloud platforms.
Hit me up in comments if this worked for you!
Microsoft Tech Community – Latest Blogs –Read More
Y double axis required trendlines
x = [1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020];
y1 = [18.1969 15.834 16.5986 3.1579 10.9866 8.2062 8.9229 9.6429 6.4604 14.805 9.1178 0.49 2.9925 8.7875 5.7404 5.365 8.32 13.025 10.9654 3.26 8.975 4.795 0.97 32.3175 11.1025 0.65 9.5425 12.115 9.8975 21.875 16.6925];
y2 = [17.360463 15.30933 12.563672 2.174533 8.407282 5.828774 4.764783 5.524783 3.644908 15.515 7.022406 0.1715 1.168625 4.729125 3.232158 2.149 6.37575 12.0585 7.024658 1.355 5.591 3.088 0.396 25.004125 8.130375 0.2355 5.040375 7.95375 5.477375 18.4155 16.567625];
figure(‘Color’,’w’)
[hAx,hLine1,hLine2] = plotyy(x,y1,x,y2);
ylabel(hAx(1),’ACE (knot^2)’) % left y-axis
ylabel(hAx(2),’PDI (knot^3)’) % right y-axis
%grid onx = [1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020];
y1 = [18.1969 15.834 16.5986 3.1579 10.9866 8.2062 8.9229 9.6429 6.4604 14.805 9.1178 0.49 2.9925 8.7875 5.7404 5.365 8.32 13.025 10.9654 3.26 8.975 4.795 0.97 32.3175 11.1025 0.65 9.5425 12.115 9.8975 21.875 16.6925];
y2 = [17.360463 15.30933 12.563672 2.174533 8.407282 5.828774 4.764783 5.524783 3.644908 15.515 7.022406 0.1715 1.168625 4.729125 3.232158 2.149 6.37575 12.0585 7.024658 1.355 5.591 3.088 0.396 25.004125 8.130375 0.2355 5.040375 7.95375 5.477375 18.4155 16.567625];
figure(‘Color’,’w’)
[hAx,hLine1,hLine2] = plotyy(x,y1,x,y2);
ylabel(hAx(1),’ACE (knot^2)’) % left y-axis
ylabel(hAx(2),’PDI (knot^3)’) % right y-axis
%grid on x = [1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020];
y1 = [18.1969 15.834 16.5986 3.1579 10.9866 8.2062 8.9229 9.6429 6.4604 14.805 9.1178 0.49 2.9925 8.7875 5.7404 5.365 8.32 13.025 10.9654 3.26 8.975 4.795 0.97 32.3175 11.1025 0.65 9.5425 12.115 9.8975 21.875 16.6925];
y2 = [17.360463 15.30933 12.563672 2.174533 8.407282 5.828774 4.764783 5.524783 3.644908 15.515 7.022406 0.1715 1.168625 4.729125 3.232158 2.149 6.37575 12.0585 7.024658 1.355 5.591 3.088 0.396 25.004125 8.130375 0.2355 5.040375 7.95375 5.477375 18.4155 16.567625];
figure(‘Color’,’w’)
[hAx,hLine1,hLine2] = plotyy(x,y1,x,y2);
ylabel(hAx(1),’ACE (knot^2)’) % left y-axis
ylabel(hAx(2),’PDI (knot^3)’) % right y-axis
%grid on trendline, y double axis MATLAB Answers — New Questions
Is it possible to convert Arduino IDE Code (C++ Code) to MATLAB Code by any means? Or does it have to be done manually?
I’m trying to translate a C++ Code which is used for Soil Moisture Sensor and Raindrop Sensor to a MATLAB Code. I was hoping to convert the C++ Code to a MATLAB Code through faster means since I have no knowledge in C++ Coding. Following is the code.
const int capteur_D = 4;
const int capteur_A = A0;
int val_analogique;
int soilMoistureValue = 0;
int soilmoisturepercent=0;
void setup() {
pinMode(capteur_D, INPUT);
pinMode(capteur_A, INPUT);
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
}
void loop() {
soilMoistureValue = analogRead(A0); //put Sensor insert into soil
Serial.println(soilMoistureValue);
delay(250);
if(digitalRead(capteur_D) == LOW)
{
Serial.println("Digital value : wet");
delay(10);
}
else
{
Serial.println("Digital value : dry");
delay(10);
}
val_analogique=analogRead(capteur_A);
Serial.print("Analog value : ");
Serial.println(val_analogique);
Serial.println("");
delay(1000);
}I’m trying to translate a C++ Code which is used for Soil Moisture Sensor and Raindrop Sensor to a MATLAB Code. I was hoping to convert the C++ Code to a MATLAB Code through faster means since I have no knowledge in C++ Coding. Following is the code.
const int capteur_D = 4;
const int capteur_A = A0;
int val_analogique;
int soilMoistureValue = 0;
int soilmoisturepercent=0;
void setup() {
pinMode(capteur_D, INPUT);
pinMode(capteur_A, INPUT);
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
}
void loop() {
soilMoistureValue = analogRead(A0); //put Sensor insert into soil
Serial.println(soilMoistureValue);
delay(250);
if(digitalRead(capteur_D) == LOW)
{
Serial.println("Digital value : wet");
delay(10);
}
else
{
Serial.println("Digital value : dry");
delay(10);
}
val_analogique=analogRead(capteur_A);
Serial.print("Analog value : ");
Serial.println(val_analogique);
Serial.println("");
delay(1000);
} I’m trying to translate a C++ Code which is used for Soil Moisture Sensor and Raindrop Sensor to a MATLAB Code. I was hoping to convert the C++ Code to a MATLAB Code through faster means since I have no knowledge in C++ Coding. Following is the code.
const int capteur_D = 4;
const int capteur_A = A0;
int val_analogique;
int soilMoistureValue = 0;
int soilmoisturepercent=0;
void setup() {
pinMode(capteur_D, INPUT);
pinMode(capteur_A, INPUT);
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
}
void loop() {
soilMoistureValue = analogRead(A0); //put Sensor insert into soil
Serial.println(soilMoistureValue);
delay(250);
if(digitalRead(capteur_D) == LOW)
{
Serial.println("Digital value : wet");
delay(10);
}
else
{
Serial.println("Digital value : dry");
delay(10);
}
val_analogique=analogRead(capteur_A);
Serial.print("Analog value : ");
Serial.println(val_analogique);
Serial.println("");
delay(1000);
} c++, c++ to matlab MATLAB Answers — New Questions
Errors while linking unreal engine to matlab
Unreal Engine: 5.1.1
Matlab Release: R2024a
I am trying to make a custom scene in unreal engine, for that I installed Aerospace Toolbox Unreal ENgine Interface, after installing, when I try to opne the editor using
`editor.open()’
I get following message:
I tried to build it through IDE but it gave me the following error:
I need help resolving this issue.Unreal Engine: 5.1.1
Matlab Release: R2024a
I am trying to make a custom scene in unreal engine, for that I installed Aerospace Toolbox Unreal ENgine Interface, after installing, when I try to opne the editor using
`editor.open()’
I get following message:
I tried to build it through IDE but it gave me the following error:
I need help resolving this issue. Unreal Engine: 5.1.1
Matlab Release: R2024a
I am trying to make a custom scene in unreal engine, for that I installed Aerospace Toolbox Unreal ENgine Interface, after installing, when I try to opne the editor using
`editor.open()’
I get following message:
I tried to build it through IDE but it gave me the following error:
I need help resolving this issue. unrealengine MATLAB Answers — New Questions
Over time reduce an input value linearly with a delay after each decrement, using a Simulink model
I’m trying to create a Simulink model that has an input value that I want to reduce down to zero in a specific time. It must decrease in linear decrements with a delay after each decrement. The initial input value can also be different, but must reduce down to zero in the same time no matter the starting value.
I have tried using a feedback loop to subtract the original value * the time step, but this just results in the output value decreasing to zero immediately.
Are there any specific blocks for this kind fo linear reduction, or is a more complex block system required?
Thanks for the helpI’m trying to create a Simulink model that has an input value that I want to reduce down to zero in a specific time. It must decrease in linear decrements with a delay after each decrement. The initial input value can also be different, but must reduce down to zero in the same time no matter the starting value.
I have tried using a feedback loop to subtract the original value * the time step, but this just results in the output value decreasing to zero immediately.
Are there any specific blocks for this kind fo linear reduction, or is a more complex block system required?
Thanks for the help I’m trying to create a Simulink model that has an input value that I want to reduce down to zero in a specific time. It must decrease in linear decrements with a delay after each decrement. The initial input value can also be different, but must reduce down to zero in the same time no matter the starting value.
I have tried using a feedback loop to subtract the original value * the time step, but this just results in the output value decreasing to zero immediately.
Are there any specific blocks for this kind fo linear reduction, or is a more complex block system required?
Thanks for the help simulink, feedback loop MATLAB Answers — New Questions
EFI – Full repair needed?
I’ve already found a few posts here that explain how to repair the EFI partition. How to do that is not my question. Q1: Is this just windows being stupid? (if yes skip Q2)Q2: Should I even bother fixing this? The PC is working as fine as Windows can. I would never have known about this had I not decided to create a VHD. Read More
WAC : Installation fails with Unhandled Exception
Hi
Server: 2022 Std, 21H2 20348.2700
Clean build and activated
WAC MSI version 2311
When I try to install WAC I get a message : Unhandled Exception – System.Security.Cryptography.CrypographicException – Access is denied (see screen shot)
I am logged on as a user who is a member of the local administrator group and also Domain Admins.
The installation fails and roles back, any ideas as to what I can do?
Thanks
Ian
HiServer: 2022 Std, 21H2 20348.2700Clean build and activatedWAC MSI version 2311 When I try to install WAC I get a message : Unhandled Exception – System.Security.Cryptography.CrypographicException – Access is denied (see screen shot) I am logged on as a user who is a member of the local administrator group and also Domain Admins. The installation fails and roles back, any ideas as to what I can do?ThanksIan Read More
Exchange license removed but mailbox still active
Hi,
I`m tidying up old users from our tenant and have noticed lots of old users without exchange licenses still have mailboxes active. I thought these were soft deleted after 30 days.
We want to keep the user in our domain without a mailbox so that the user in Atlassian doesn`t become an unknown users. The user is blocked from sign in and doesn`t have any licenses attached.
Any ideas on why the mailbox is still there?
Thanks
James
Hi, I`m tidying up old users from our tenant and have noticed lots of old users without exchange licenses still have mailboxes active. I thought these were soft deleted after 30 days. We want to keep the user in our domain without a mailbox so that the user in Atlassian doesn`t become an unknown users. The user is blocked from sign in and doesn`t have any licenses attached. Any ideas on why the mailbox is still there? ThanksJames Read More
SharePoint Modern Page – Notifications when submitting Comments
On a modern page when someone post a comment, notification is sent to person who created the page. I’m looking for an option to change this so notifications are sent to another person, tried changing ‘Author’ to the desired user but notifications are still sent to ‘Created By’ user. Is this by design or is there a workaround?
On a modern page when someone post a comment, notification is sent to person who created the page. I’m looking for an option to change this so notifications are sent to another person, tried changing ‘Author’ to the desired user but notifications are still sent to ‘Created By’ user. Is this by design or is there a workaround? Read More
YOLOX – training on tiled images and inference on full-size images
Hello everyone. I am trying to train the YOLOX net for cell detection in brightfield. My original images are 2048×2048. I read on matworks that yolox, being anchor-free, can be trained on tiled images and the inference can be done on full-size images. So what I did was tiliing my images in 4 blocks, 1024×1024 each, then size down everything to 512×512 pixels and do the training. Doing the inference on full-size images gives me 0 precision, as well as scaling down the test set to 1024×1024 pixels, which makes the size of the cells I want to detect the same size as they would be in the preprocessed training set. Is there something I am not grasping due to my scarce experience? thank you to whoever will suggest something. ThanksHello everyone. I am trying to train the YOLOX net for cell detection in brightfield. My original images are 2048×2048. I read on matworks that yolox, being anchor-free, can be trained on tiled images and the inference can be done on full-size images. So what I did was tiliing my images in 4 blocks, 1024×1024 each, then size down everything to 512×512 pixels and do the training. Doing the inference on full-size images gives me 0 precision, as well as scaling down the test set to 1024×1024 pixels, which makes the size of the cells I want to detect the same size as they would be in the preprocessed training set. Is there something I am not grasping due to my scarce experience? thank you to whoever will suggest something. Thanks Hello everyone. I am trying to train the YOLOX net for cell detection in brightfield. My original images are 2048×2048. I read on matworks that yolox, being anchor-free, can be trained on tiled images and the inference can be done on full-size images. So what I did was tiliing my images in 4 blocks, 1024×1024 each, then size down everything to 512×512 pixels and do the training. Doing the inference on full-size images gives me 0 precision, as well as scaling down the test set to 1024×1024 pixels, which makes the size of the cells I want to detect the same size as they would be in the preprocessed training set. Is there something I am not grasping due to my scarce experience? thank you to whoever will suggest something. Thanks yolo, deep learning, detection, machine learning, image processing, computer vision MATLAB Answers — New Questions
error when using lsqnonlin to function containing fzero function
I want to use lsqnonlin analysis to fit a model to two sets of data and obtain values of 4 variables. The function i created contains fzero function which only allows scalar values and i finally got the error ‘operands to the || and && operators ust be convertible to logical scalar values. ‘ So is there any other method that can replace lsqnonlin to solve my problem? Or any corrections, changes to be made in my code to solve this with lsqnonlin? Thanks! Here’s my function file and code.
function Result = myfunc1(a,p,G,m,fraction)
totalconcentration = 0.0000291;
n = 2;
K = exp(-((G + m * fraction)./(8.314*298)));
g_lb = 0;
g_ub = 0.9999;
g =[g_lb g_ub];
monomerconcentration = fzero(@denaturationfun,g);
function y = denaturationfun(x)
y = a.^(-1).*(((a.*x).^(n+1)).*(n.*a.*x-n-1)/((a.*x-1).^2)+a.*x/((a.*x-1).^2))-a.^(n-1).*((x^(n+1)).*(n.*x-n-1)/((x-1).^2))-K.*totalconcentration;
end
Result = p * (1- (monomerconcentration / ( K * totalconcentration )));
end
clc;
clear;
close all;
fractiondata = [0.1505 0.1546 0.1587 0.1628 0.1668 0.1708 0.1748 0.1787 0.1825 0.1864 0.1902 0.194 0.1977 0.2014 0.205 0.2087 0.2123];
DegreeofAggdata = [1 0.9087 0.8658 0.83453 0.79569 0.67979 0.62031 0.53043 0.39722 0.25888 0.15171 0.04759 0.00109 3.20E-04 0.00144 7.77E-04 0];
fun = @(x)DegreeofAggdata – myfunc1(x(1),x(2),x(3),x(4),fractiondata);
x0 = [0.01,0.9,-50000,100000];
lb = [0.00001,0.9,-100000,20000];
ub = [1,1.1,-10000,130000];
x = lsqnonlin(fun,x0,lb,ub);I want to use lsqnonlin analysis to fit a model to two sets of data and obtain values of 4 variables. The function i created contains fzero function which only allows scalar values and i finally got the error ‘operands to the || and && operators ust be convertible to logical scalar values. ‘ So is there any other method that can replace lsqnonlin to solve my problem? Or any corrections, changes to be made in my code to solve this with lsqnonlin? Thanks! Here’s my function file and code.
function Result = myfunc1(a,p,G,m,fraction)
totalconcentration = 0.0000291;
n = 2;
K = exp(-((G + m * fraction)./(8.314*298)));
g_lb = 0;
g_ub = 0.9999;
g =[g_lb g_ub];
monomerconcentration = fzero(@denaturationfun,g);
function y = denaturationfun(x)
y = a.^(-1).*(((a.*x).^(n+1)).*(n.*a.*x-n-1)/((a.*x-1).^2)+a.*x/((a.*x-1).^2))-a.^(n-1).*((x^(n+1)).*(n.*x-n-1)/((x-1).^2))-K.*totalconcentration;
end
Result = p * (1- (monomerconcentration / ( K * totalconcentration )));
end
clc;
clear;
close all;
fractiondata = [0.1505 0.1546 0.1587 0.1628 0.1668 0.1708 0.1748 0.1787 0.1825 0.1864 0.1902 0.194 0.1977 0.2014 0.205 0.2087 0.2123];
DegreeofAggdata = [1 0.9087 0.8658 0.83453 0.79569 0.67979 0.62031 0.53043 0.39722 0.25888 0.15171 0.04759 0.00109 3.20E-04 0.00144 7.77E-04 0];
fun = @(x)DegreeofAggdata – myfunc1(x(1),x(2),x(3),x(4),fractiondata);
x0 = [0.01,0.9,-50000,100000];
lb = [0.00001,0.9,-100000,20000];
ub = [1,1.1,-10000,130000];
x = lsqnonlin(fun,x0,lb,ub); I want to use lsqnonlin analysis to fit a model to two sets of data and obtain values of 4 variables. The function i created contains fzero function which only allows scalar values and i finally got the error ‘operands to the || and && operators ust be convertible to logical scalar values. ‘ So is there any other method that can replace lsqnonlin to solve my problem? Or any corrections, changes to be made in my code to solve this with lsqnonlin? Thanks! Here’s my function file and code.
function Result = myfunc1(a,p,G,m,fraction)
totalconcentration = 0.0000291;
n = 2;
K = exp(-((G + m * fraction)./(8.314*298)));
g_lb = 0;
g_ub = 0.9999;
g =[g_lb g_ub];
monomerconcentration = fzero(@denaturationfun,g);
function y = denaturationfun(x)
y = a.^(-1).*(((a.*x).^(n+1)).*(n.*a.*x-n-1)/((a.*x-1).^2)+a.*x/((a.*x-1).^2))-a.^(n-1).*((x^(n+1)).*(n.*x-n-1)/((x-1).^2))-K.*totalconcentration;
end
Result = p * (1- (monomerconcentration / ( K * totalconcentration )));
end
clc;
clear;
close all;
fractiondata = [0.1505 0.1546 0.1587 0.1628 0.1668 0.1708 0.1748 0.1787 0.1825 0.1864 0.1902 0.194 0.1977 0.2014 0.205 0.2087 0.2123];
DegreeofAggdata = [1 0.9087 0.8658 0.83453 0.79569 0.67979 0.62031 0.53043 0.39722 0.25888 0.15171 0.04759 0.00109 3.20E-04 0.00144 7.77E-04 0];
fun = @(x)DegreeofAggdata – myfunc1(x(1),x(2),x(3),x(4),fractiondata);
x0 = [0.01,0.9,-50000,100000];
lb = [0.00001,0.9,-100000,20000];
ub = [1,1.1,-10000,130000];
x = lsqnonlin(fun,x0,lb,ub); matlab, lsqnonlin, fzero, fit model MATLAB Answers — New Questions
Why does findobj behave different in windows than in unix systems?
Hello,
I am facing something rather curious, I am noticing a behaviour different on Matlab function findobj in Windows(10/11) or Unix ( ubuntu 22).
My issue roots to the search of figures by name, in windows I use the function like this
figHandle = findobj(groot,’Name’,figName);
so providing the figName finds the figure as expected, but running same command under Matlab unix version it returns empty figHandle. I use the Matlab unix version in my CI environment where I found the issue.
Does it rely on lower OS functions that do not behave the same? Can I overcome this issue?
Thanks in advance,
RegardsHello,
I am facing something rather curious, I am noticing a behaviour different on Matlab function findobj in Windows(10/11) or Unix ( ubuntu 22).
My issue roots to the search of figures by name, in windows I use the function like this
figHandle = findobj(groot,’Name’,figName);
so providing the figName finds the figure as expected, but running same command under Matlab unix version it returns empty figHandle. I use the Matlab unix version in my CI environment where I found the issue.
Does it rely on lower OS functions that do not behave the same? Can I overcome this issue?
Thanks in advance,
Regards Hello,
I am facing something rather curious, I am noticing a behaviour different on Matlab function findobj in Windows(10/11) or Unix ( ubuntu 22).
My issue roots to the search of figures by name, in windows I use the function like this
figHandle = findobj(groot,’Name’,figName);
so providing the figName finds the figure as expected, but running same command under Matlab unix version it returns empty figHandle. I use the Matlab unix version in my CI environment where I found the issue.
Does it rely on lower OS functions that do not behave the same? Can I overcome this issue?
Thanks in advance,
Regards findobj MATLAB Answers — New Questions
How can I create Windows 11 installation media for new PC?
Hi community experts,
My 10-year old MacBook Pro will be retired soon as it becomes laggy and many apps are not supported. Recently, I heard a lot of good reviews about Windows 11 and now I have the new built PC at my hand. The specs are:
CPU: Intel i5 12400FRAM: Kingston 16GBSSD: SANDISK 500GBMotherboard: Asus A520MGraphics card: 4070Ti
My question is how to create Windows 11 installation media so I can install Windows 11 on my new PC. I am not a tech savvy and don’t know how to do this. It could be great if some one point our the right direction.
Thank you
Hi community experts, My 10-year old MacBook Pro will be retired soon as it becomes laggy and many apps are not supported. Recently, I heard a lot of good reviews about Windows 11 and now I have the new built PC at my hand. The specs are: CPU: Intel i5 12400FRAM: Kingston 16GBSSD: SANDISK 500GBMotherboard: Asus A520MGraphics card: 4070TiMy question is how to create Windows 11 installation media so I can install Windows 11 on my new PC. I am not a tech savvy and don’t know how to do this. It could be great if some one point our the right direction. Thank you Read More
I have 3 computers, 1 with PIN and enter, 1 with PIN and straight in, and 1 with no PIN and straight
I’d like to know how I’ve done it. The first is with PIN and enter, probably using Microsoft, but others have OEM info. All have Windows 23H2 up to date.
I’m not bothered but I would like to know what I’ve done.
I’d like to know how I’ve done it. The first is with PIN and enter, probably using Microsoft, but others have OEM info. All have Windows 23H2 up to date.I’m not bothered but I would like to know what I’ve done. Read More