Month: June 2024
Office 365 Activation suddenly failing. SARA and Uninstall/Wipe/Reinstall not helping. HELP!
Hello – need help getting my Office 365 (fully paid, up to date) subscription is suddenly indicating “(Unlicensed Product)” as of the past week, on my Windows 11 (build 26231.5000 ge_prerelease) PC.
I have performed all troubleshooting tasks Microsoft provides online, uninstalled/wiped/reinstalled Office multiple times now, run SARA multiple times, and still continue to be unable to activate my Office products.
Clicking on the “Activate Product” or “Fix Me” buttons both results in a “Sign In to Office” page, (even though I’m already signed in) and results in a permanent, repeated cycle of re-signing in, without the product activating.
After hours of dialog with support, the agent directed me to the Insider support, as they had exhausted all options for “standard” Windows PCs. I really need some advanced support here please!
Hello – need help getting my Office 365 (fully paid, up to date) subscription is suddenly indicating “(Unlicensed Product)” as of the past week, on my Windows 11 (build 26231.5000 ge_prerelease) PC.I have performed all troubleshooting tasks Microsoft provides online, uninstalled/wiped/reinstalled Office multiple times now, run SARA multiple times, and still continue to be unable to activate my Office products.Clicking on the “Activate Product” or “Fix Me” buttons both results in a “Sign In to Office” page, (even though I’m already signed in) and results in a permanent, repeated cycle of re-signing in, without the product activating.After hours of dialog with support, the agent directed me to the Insider support, as they had exhausted all options for “standard” Windows PCs. I really need some advanced support here please! Read More
Finding the earliest date in a range of dates
In one row I have an array of 10 dates spanning a decade e.g 2010 – 2019.
1/4/2010, 6/7/2011, 3/5/2012, 2/3/2013 …..etcI need a formula that will find the earliest of those 10 dates using only the day and the month while ignoring the yearObviously if it’s searched with MIN(A1:J1) for the earliest date then it would produce the 2010 (1/4/2010) date but the earliest date based on only day/month is 2/3/2013.
how can my search ignore the year?
In one row I have an array of 10 dates spanning a decade e.g 2010 – 2019. 1/4/2010, 6/7/2011, 3/5/2012, 2/3/2013 …..etcI need a formula that will find the earliest of those 10 dates using only the day and the month while ignoring the yearObviously if it’s searched with MIN(A1:J1) for the earliest date then it would produce the 2010 (1/4/2010) date but the earliest date based on only day/month is 2/3/2013. how can my search ignore the year? Read More
Equations for predicting outputs under SVM regression (RBF or polynomial)
Hello everyone,
I am trying to calculate output (Y) for new input data (X) using a pretrained SVM (trained with kernel function RBF or polynomial).
I know the equations for linear SVM regression:
ex) Y = inputdata * Beta + Bias
However, I am trying to find the equations to calculate the Y response under ‘RBF’ or ‘Polynomial’ SVM regression.
Please help
Thank you.Hello everyone,
I am trying to calculate output (Y) for new input data (X) using a pretrained SVM (trained with kernel function RBF or polynomial).
I know the equations for linear SVM regression:
ex) Y = inputdata * Beta + Bias
However, I am trying to find the equations to calculate the Y response under ‘RBF’ or ‘Polynomial’ SVM regression.
Please help
Thank you. Hello everyone,
I am trying to calculate output (Y) for new input data (X) using a pretrained SVM (trained with kernel function RBF or polynomial).
I know the equations for linear SVM regression:
ex) Y = inputdata * Beta + Bias
However, I am trying to find the equations to calculate the Y response under ‘RBF’ or ‘Polynomial’ SVM regression.
Please help
Thank you. svm, rbf, polynomial, regression MATLAB Answers — New Questions
save fit data from ARX reports
I have a lot of time series data (312 experiments) and several models. I want to make sure that the models outperform an AR model with the same number of parameters. However, due to the read-only mode of the AR report.fit, I have to fit each experiment separately because the Report.Fit struct is read-only. Is there any way I can extract the Sys.Report.Fit data so that I can save all 312 experiments using flist?I have a lot of time series data (312 experiments) and several models. I want to make sure that the models outperform an AR model with the same number of parameters. However, due to the read-only mode of the AR report.fit, I have to fit each experiment separately because the Report.Fit struct is read-only. Is there any way I can extract the Sys.Report.Fit data so that I can save all 312 experiments using flist? I have a lot of time series data (312 experiments) and several models. I want to make sure that the models outperform an AR model with the same number of parameters. However, due to the read-only mode of the AR report.fit, I have to fit each experiment separately because the Report.Fit struct is read-only. Is there any way I can extract the Sys.Report.Fit data so that I can save all 312 experiments using flist? read only mode for sys.report. fit in ar models MATLAB Answers — New Questions
Unable to find a valid PropName for waitfor with a Matlab app
Using app designer, I have a main app that calls a form. From the main app, I instantiate the form
app.FormApp = FormApp(app);
I can halt execution by waiting for the form to be deleted
waitfor(app.formApp);
My desire is to keep the form open and repopulate from a loop in the main app. However, setting a public property on FormApp and calling it fails. I.e.
waitfor(app.formApp, app.formApp.pauseLoop, false)
throws "Error using waitfor
Invalid property." I’ve tried lots of combinations trying to get a property of the FormApp that waitfor will use. Any help appreciated.
I’m using R2023b Update 5 on Windows 10.Using app designer, I have a main app that calls a form. From the main app, I instantiate the form
app.FormApp = FormApp(app);
I can halt execution by waiting for the form to be deleted
waitfor(app.formApp);
My desire is to keep the form open and repopulate from a loop in the main app. However, setting a public property on FormApp and calling it fails. I.e.
waitfor(app.formApp, app.formApp.pauseLoop, false)
throws "Error using waitfor
Invalid property." I’ve tried lots of combinations trying to get a property of the FormApp that waitfor will use. Any help appreciated.
I’m using R2023b Update 5 on Windows 10. Using app designer, I have a main app that calls a form. From the main app, I instantiate the form
app.FormApp = FormApp(app);
I can halt execution by waiting for the form to be deleted
waitfor(app.formApp);
My desire is to keep the form open and repopulate from a loop in the main app. However, setting a public property on FormApp and calling it fails. I.e.
waitfor(app.formApp, app.formApp.pauseLoop, false)
throws "Error using waitfor
Invalid property." I’ve tried lots of combinations trying to get a property of the FormApp that waitfor will use. Any help appreciated.
I’m using R2023b Update 5 on Windows 10. app designer, uifigure, waitfor MATLAB Answers — New Questions
“Try the New Desktop” icon persists even after uninstalling the add-on (New Desktop for MATLAB (Beta))
I recently installed the New Desktop for MATLAB from MATLAB FEX (by reading this article of Matlab Blog) to enable dark mode. However, I didn’t prefer it, so I uninstalled it through Add-Ons > Manage Add-Ons. While it’s no longer listed in my add-ons, the "Try the New Desktop" icon remains at the top of my MATLAB environment. I’ve even restarted my computer, but the icon persists.
Could you please advise on how to remove this icon permanently?I recently installed the New Desktop for MATLAB from MATLAB FEX (by reading this article of Matlab Blog) to enable dark mode. However, I didn’t prefer it, so I uninstalled it through Add-Ons > Manage Add-Ons. While it’s no longer listed in my add-ons, the "Try the New Desktop" icon remains at the top of my MATLAB environment. I’ve even restarted my computer, but the icon persists.
Could you please advise on how to remove this icon permanently? I recently installed the New Desktop for MATLAB from MATLAB FEX (by reading this article of Matlab Blog) to enable dark mode. However, I didn’t prefer it, so I uninstalled it through Add-Ons > Manage Add-Ons. While it’s no longer listed in my add-ons, the "Try the New Desktop" icon remains at the top of my MATLAB environment. I’ve even restarted my computer, but the icon persists.
Could you please advise on how to remove this icon permanently? matlab, file exchange, new desktop for matlab (beta) MATLAB Answers — New Questions
Azure OpenAI Service expands .NET SDK support
Since its first release in December 2022, Azure OpenAI Service has continuously worked to meet developers where they are with rich, idiomatic client libraries that expand on OpenAI’s language availability in Python and JavaScript with options for .NET, Java, and Go development. This week, we’re excited to share two major announcements for .NET customers: the preview release of OpenAI’s official .NET library and the matched update of the preview Azure OpenAI Service client library for .NET.
.NET becomes OpenAI’s third officially supported language
As recently announced on the official .NET blog, OpenAI this week released a new OpenAI 2.0.0-beta package on NuGet.org that marks its first official support for .NET developers using programming languages like C#. This new, open-source library is produced and maintained through close, ongoing collaboration with Microsoft; OpenAI’s openai-dotnet repository joins openai-python and openai-node as the next client library project available directly from OpenAI. In addition to empowering .NET developers with access to OpenAI’s models and capabilities in their programming language of choice, this new library also features substantial strides in simplifying usage patterns to make even data-rich operations — like streaming with v2 of the Assistants (beta) API — easier and more intuitive.
Azure OpenAI Service adopts and extends OpenAI’s library
In reflection of this partnership, Azure.AI.OpenAI, the Azure SDK library for Azure OpenAI Service, has released a new 2.0.0-beta.1 update that converts the previously standalone .NET library into a companion of the official OpenAI .NET library. This new version streamlines Azure client configuration and provides additional, strongly typed support for concepts and capabilities specific to Azure OpenAI Service, such as Responsible AI Content Filtering annotations and On Your Data data sources and citations. With its extension of OpenAI’s .NET library, seamlessly switching between OpenAI and Azure OpenAI Service endpoints is easier than ever, and new language feature support can now arrive faster, independently of service API release vehicles.
Although this change brings a major version increment that will require migration, Azure OpenAI Service will also continue to support the previous 1.0.0-beta.17 package through the lifetime of that version’s most recently supported 2024-04-01-preview service API version. Developers are encouraged to upgrade for the latest features and substantial improvements to functionality and usability, but that upgrade is not mandatory for customers already using the previous library version in conjunction with an older service API version.
What’s next for .NET and OpenAI
Together with OpenAI, we’re eager to refine and improve our .NET libraries to reach a General Availability (GA) status as soon as possible. Developer feedback on both OpenAI’s openai-dotnet discussions and Azure SDK’s azure-sdk-for-net issues is welcomed, appreciated, and will help accelerate the continued evolution of .NET support for OpenAI and Azure OpenAI Service.
Microsoft Tech Community – Latest Blogs –Read More
Not able to plot a proper graph for the equation.
y = (1*1*((25)-(x.^2)))/((x.^4)-((x.^2)*((1*(1.78))+(25)+1))+(1*(25)));
fplot(y);
i used this code but am only getting a straight line instead of the 2 peak FRF that I want.y = (1*1*((25)-(x.^2)))/((x.^4)-((x.^2)*((1*(1.78))+(25)+1))+(1*(25)));
fplot(y);
i used this code but am only getting a straight line instead of the 2 peak FRF that I want. y = (1*1*((25)-(x.^2)))/((x.^4)-((x.^2)*((1*(1.78))+(25)+1))+(1*(25)));
fplot(y);
i used this code but am only getting a straight line instead of the 2 peak FRF that I want. mathematics, graph, plot MATLAB Answers — New Questions
Problems with the use of streamline for a magnetic field
Hi,
I’m trying to plot the streamlines of a magnetic field generated by a magnet and a coil. I have my Field generated in 6 vectors, XYZ for the coordinates et UVW for the components. I managed to reorganize those data in 6 3D-arrays. I ploted the quiver and the plot seems satisfying. Now I wanted to plot the streamlines in order to observe the loopback. Unfortunately, the streamlines are not really good and does not follow the vectors ploted by quiver. Here is the figure :
when i use the following xyz 3D arrays and i have the error sample points must be unique and i don’t understand why becuase all the couples are unique.
x=
val(:,:,1) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
val(:,:,2) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
val(:,:,3) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
y=
val(:,:,1) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
val(:,:,2) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
val(:,:,3) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
z=
val(:,:,1) =
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
val(:,:,2) =
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
val(:,:,3) =
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01Hi,
I’m trying to plot the streamlines of a magnetic field generated by a magnet and a coil. I have my Field generated in 6 vectors, XYZ for the coordinates et UVW for the components. I managed to reorganize those data in 6 3D-arrays. I ploted the quiver and the plot seems satisfying. Now I wanted to plot the streamlines in order to observe the loopback. Unfortunately, the streamlines are not really good and does not follow the vectors ploted by quiver. Here is the figure :
when i use the following xyz 3D arrays and i have the error sample points must be unique and i don’t understand why becuase all the couples are unique.
x=
val(:,:,1) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
val(:,:,2) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
val(:,:,3) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
y=
val(:,:,1) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
val(:,:,2) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
val(:,:,3) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
z=
val(:,:,1) =
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
val(:,:,2) =
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
val(:,:,3) =
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01 Hi,
I’m trying to plot the streamlines of a magnetic field generated by a magnet and a coil. I have my Field generated in 6 vectors, XYZ for the coordinates et UVW for the components. I managed to reorganize those data in 6 3D-arrays. I ploted the quiver and the plot seems satisfying. Now I wanted to plot the streamlines in order to observe the loopback. Unfortunately, the streamlines are not really good and does not follow the vectors ploted by quiver. Here is the figure :
when i use the following xyz 3D arrays and i have the error sample points must be unique and i don’t understand why becuase all the couples are unique.
x=
val(:,:,1) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
val(:,:,2) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
val(:,:,3) =
-2.000000000000000e-01 -2.000000000000000e-01 -2.000000000000000e-01
-1.387778780781446e-17 -1.387778780781446e-17 -1.387778780781446e-17
2.000000000000000e-01 2.000000000000000e-01 2.000000000000000e-01
y=
val(:,:,1) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
val(:,:,2) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
val(:,:,3) =
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
-2.000000000000000e-01 -1.387778780781446e-17 2.000000000000000e-01
z=
val(:,:,1) =
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
-5.000000000000000e-02 -5.000000000000000e-02 -5.000000000000000e-02
val(:,:,2) =
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
1.500000000000000e-01 1.500000000000000e-01 1.500000000000000e-01
val(:,:,3) =
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01
3.500000000000000e-01 3.500000000000000e-01 3.500000000000000e-01 streamlines MATLAB Answers — New Questions
How to find solution to system of 2 circle equations in Matlab?
x^2+y^2=25;
x^2+y^2=36;
%%how to find values of x and y??
%Please help someonex^2+y^2=25;
x^2+y^2=36;
%%how to find values of x and y??
%Please help someone x^2+y^2=25;
x^2+y^2=36;
%%how to find values of x and y??
%Please help someone #cicle, #equations MATLAB Answers — New Questions
Global Stiffness Matrix 8×8
% Declaring all the variables
E1 = 200e9; % Young’s modulus for elements 1 and 2 in Pa
A1 = 0.000006; % Cross-sectional area for elements 1 and 2 in m^2
E3 = 200e9; % Young’s modulus for element 3 in Pa
A3 = 0.000006; % Cross-sectional area for element 3 in m^2
L = 0.5; % Length of each element in m
F = 5000; % Applied force at node 2 in N
disp(‘E1(Pa) = ‘),disp(E1);
disp(‘E3(Pa) = ‘),disp(E3);
disp(‘A1(m^2) = ‘),disp(A1);
disp(‘A3(m^2) = ‘),disp(A3);
disp(‘L(m) = ‘),disp(L);
disp(‘θ(°) = 5 ‘);
C=cos(5*pi/180);
S=sin(5*pi/180);
disp(‘ Local Stiffness Matrixs :’)
k1=E1*A1*[C*C C*S -C*C -C*S
C*S S*S -C*S -S*S
-C*C -C*S C*C C*S
-C*S -S*S C*S S*S]/0.25
k2=E1*A1*[0 0 0 0
0 1 0 -1
0 0 0 0
0 -1 0 1]/0.0218
k3=E3*A3*[C*C C*S -C*C -C*S
C*S S*S -C*S -S*S
-C*C -C*S C*C C*S
-C*S -S*S C*S S*S]/0.25
disp(‘ Global Stiffness Matrix :’)
K=[k1(1,1) k1(1,2) k1(1,3) k1(1,4) 0 0 0 0
k1(2,1) k1(2,2) k1(2,3) k1(2,4) 0 0 0 0
k1(3,1) k1(3,2) k1(3,3)+k2(1,1) k1(3,4)+k2(1,2) k2(1,3) k2(1,4) 0 0
k1(4,1) k1(4,2) k1(4,3)+k2(2,1) k1(4,4)+k2(2,2) k2(2,3) k2(2,4) 0 0
0 0 k2(3,1) k2(3,2) k2(3,3)+k3(1,1) k2(3,4)+k3(1,2) k3(1,3) k3(1,4)
0 0 k2(4,1) k2(4,2) k2(4,3)+k3(2,1) k2(4,4)+k3(2,2) k3(2,3) k3(2,4)
0 0 0 0 k3(3,1) k3(3,2) k3(3,3) k3(3,4)
0 0 0 0 k3(4,1) k3(4,2) k3(4,3) k3(4,4) ]
disp(‘ Transformation matrix :’)
T= [ C S 0 0 0 0 0 0
-S C 0 0 0 0 0 0
0 0 C S 0 0 0 0
0 0 -S C 0 0 0 0
0 0 0 0 C S 0 0
0 0 0 0 -S C 0 0
0 0 0 0 0 0 C S
0 0 0 0 0 0 -S C ]
disp(‘ Inverse of Transformation matrix :’)
TT= inv(T)
disp(‘ [T][K][TT] :’)
M=T*K*TT
disp(‘ Applying the boundary condition’)
U1=0
V1=0
U3=0
V3=0
V4=0
disp(‘Force at node 2 :’);
Fx2=[0,5000];
IK=[M(3,3), M(5,3); M(5,3), M(5,5)];
sol=Fx2/IK;
disp (5000);
disp(‘Displacement of node 2 and 3 at local coordinate(m) (0°):’);
U2=sol(1);
U3=sol(2);
t=[C,S;-S,C];
u=[U2; U3];
disp(‘d2x = ‘),disp(U2);
disp(‘d3x = ‘),disp(U3);
disp(‘Displacement of node 2 and 3 at Global coordinate(m) (5°):’);
t=[C,S;-S,C];
u=[U2; U3];
solu=tu;
u2=solu(1);
u3=solu(2);
disp(‘d2x = ‘),disp(u2);
disp(‘d3x = ‘),disp(u3);
I don’t know if the Global Stiffness Matrix arrangement is correct can someone help me?% Declaring all the variables
E1 = 200e9; % Young’s modulus for elements 1 and 2 in Pa
A1 = 0.000006; % Cross-sectional area for elements 1 and 2 in m^2
E3 = 200e9; % Young’s modulus for element 3 in Pa
A3 = 0.000006; % Cross-sectional area for element 3 in m^2
L = 0.5; % Length of each element in m
F = 5000; % Applied force at node 2 in N
disp(‘E1(Pa) = ‘),disp(E1);
disp(‘E3(Pa) = ‘),disp(E3);
disp(‘A1(m^2) = ‘),disp(A1);
disp(‘A3(m^2) = ‘),disp(A3);
disp(‘L(m) = ‘),disp(L);
disp(‘θ(°) = 5 ‘);
C=cos(5*pi/180);
S=sin(5*pi/180);
disp(‘ Local Stiffness Matrixs :’)
k1=E1*A1*[C*C C*S -C*C -C*S
C*S S*S -C*S -S*S
-C*C -C*S C*C C*S
-C*S -S*S C*S S*S]/0.25
k2=E1*A1*[0 0 0 0
0 1 0 -1
0 0 0 0
0 -1 0 1]/0.0218
k3=E3*A3*[C*C C*S -C*C -C*S
C*S S*S -C*S -S*S
-C*C -C*S C*C C*S
-C*S -S*S C*S S*S]/0.25
disp(‘ Global Stiffness Matrix :’)
K=[k1(1,1) k1(1,2) k1(1,3) k1(1,4) 0 0 0 0
k1(2,1) k1(2,2) k1(2,3) k1(2,4) 0 0 0 0
k1(3,1) k1(3,2) k1(3,3)+k2(1,1) k1(3,4)+k2(1,2) k2(1,3) k2(1,4) 0 0
k1(4,1) k1(4,2) k1(4,3)+k2(2,1) k1(4,4)+k2(2,2) k2(2,3) k2(2,4) 0 0
0 0 k2(3,1) k2(3,2) k2(3,3)+k3(1,1) k2(3,4)+k3(1,2) k3(1,3) k3(1,4)
0 0 k2(4,1) k2(4,2) k2(4,3)+k3(2,1) k2(4,4)+k3(2,2) k3(2,3) k3(2,4)
0 0 0 0 k3(3,1) k3(3,2) k3(3,3) k3(3,4)
0 0 0 0 k3(4,1) k3(4,2) k3(4,3) k3(4,4) ]
disp(‘ Transformation matrix :’)
T= [ C S 0 0 0 0 0 0
-S C 0 0 0 0 0 0
0 0 C S 0 0 0 0
0 0 -S C 0 0 0 0
0 0 0 0 C S 0 0
0 0 0 0 -S C 0 0
0 0 0 0 0 0 C S
0 0 0 0 0 0 -S C ]
disp(‘ Inverse of Transformation matrix :’)
TT= inv(T)
disp(‘ [T][K][TT] :’)
M=T*K*TT
disp(‘ Applying the boundary condition’)
U1=0
V1=0
U3=0
V3=0
V4=0
disp(‘Force at node 2 :’);
Fx2=[0,5000];
IK=[M(3,3), M(5,3); M(5,3), M(5,5)];
sol=Fx2/IK;
disp (5000);
disp(‘Displacement of node 2 and 3 at local coordinate(m) (0°):’);
U2=sol(1);
U3=sol(2);
t=[C,S;-S,C];
u=[U2; U3];
disp(‘d2x = ‘),disp(U2);
disp(‘d3x = ‘),disp(U3);
disp(‘Displacement of node 2 and 3 at Global coordinate(m) (5°):’);
t=[C,S;-S,C];
u=[U2; U3];
solu=tu;
u2=solu(1);
u3=solu(2);
disp(‘d2x = ‘),disp(u2);
disp(‘d3x = ‘),disp(u3);
I don’t know if the Global Stiffness Matrix arrangement is correct can someone help me? % Declaring all the variables
E1 = 200e9; % Young’s modulus for elements 1 and 2 in Pa
A1 = 0.000006; % Cross-sectional area for elements 1 and 2 in m^2
E3 = 200e9; % Young’s modulus for element 3 in Pa
A3 = 0.000006; % Cross-sectional area for element 3 in m^2
L = 0.5; % Length of each element in m
F = 5000; % Applied force at node 2 in N
disp(‘E1(Pa) = ‘),disp(E1);
disp(‘E3(Pa) = ‘),disp(E3);
disp(‘A1(m^2) = ‘),disp(A1);
disp(‘A3(m^2) = ‘),disp(A3);
disp(‘L(m) = ‘),disp(L);
disp(‘θ(°) = 5 ‘);
C=cos(5*pi/180);
S=sin(5*pi/180);
disp(‘ Local Stiffness Matrixs :’)
k1=E1*A1*[C*C C*S -C*C -C*S
C*S S*S -C*S -S*S
-C*C -C*S C*C C*S
-C*S -S*S C*S S*S]/0.25
k2=E1*A1*[0 0 0 0
0 1 0 -1
0 0 0 0
0 -1 0 1]/0.0218
k3=E3*A3*[C*C C*S -C*C -C*S
C*S S*S -C*S -S*S
-C*C -C*S C*C C*S
-C*S -S*S C*S S*S]/0.25
disp(‘ Global Stiffness Matrix :’)
K=[k1(1,1) k1(1,2) k1(1,3) k1(1,4) 0 0 0 0
k1(2,1) k1(2,2) k1(2,3) k1(2,4) 0 0 0 0
k1(3,1) k1(3,2) k1(3,3)+k2(1,1) k1(3,4)+k2(1,2) k2(1,3) k2(1,4) 0 0
k1(4,1) k1(4,2) k1(4,3)+k2(2,1) k1(4,4)+k2(2,2) k2(2,3) k2(2,4) 0 0
0 0 k2(3,1) k2(3,2) k2(3,3)+k3(1,1) k2(3,4)+k3(1,2) k3(1,3) k3(1,4)
0 0 k2(4,1) k2(4,2) k2(4,3)+k3(2,1) k2(4,4)+k3(2,2) k3(2,3) k3(2,4)
0 0 0 0 k3(3,1) k3(3,2) k3(3,3) k3(3,4)
0 0 0 0 k3(4,1) k3(4,2) k3(4,3) k3(4,4) ]
disp(‘ Transformation matrix :’)
T= [ C S 0 0 0 0 0 0
-S C 0 0 0 0 0 0
0 0 C S 0 0 0 0
0 0 -S C 0 0 0 0
0 0 0 0 C S 0 0
0 0 0 0 -S C 0 0
0 0 0 0 0 0 C S
0 0 0 0 0 0 -S C ]
disp(‘ Inverse of Transformation matrix :’)
TT= inv(T)
disp(‘ [T][K][TT] :’)
M=T*K*TT
disp(‘ Applying the boundary condition’)
U1=0
V1=0
U3=0
V3=0
V4=0
disp(‘Force at node 2 :’);
Fx2=[0,5000];
IK=[M(3,3), M(5,3); M(5,3), M(5,5)];
sol=Fx2/IK;
disp (5000);
disp(‘Displacement of node 2 and 3 at local coordinate(m) (0°):’);
U2=sol(1);
U3=sol(2);
t=[C,S;-S,C];
u=[U2; U3];
disp(‘d2x = ‘),disp(U2);
disp(‘d3x = ‘),disp(U3);
disp(‘Displacement of node 2 and 3 at Global coordinate(m) (5°):’);
t=[C,S;-S,C];
u=[U2; U3];
solu=tu;
u2=solu(1);
u3=solu(2);
disp(‘d2x = ‘),disp(u2);
disp(‘d3x = ‘),disp(u3);
I don’t know if the Global Stiffness Matrix arrangement is correct can someone help me? stiffness matrix MATLAB Answers — New Questions
Announcement: Introducing .NET C# Inline Action for Azure Logic Apps (Standard) – Preview
We are introducing a new capability that allows developers to write .NET C# script right within the Logic Apps designer. This complements the custom code feature that we introduced previously for invoking .NET FX and NET8 functions written and deployed to a Logic App.
This new capability provides the following benefits:
Extending our strategy to provide a no-cliff extensibility to our low code offering giving our developers the flexibility and tools needed to solve toughest integration problems. Our development experience within azure portal in Azure portal is what many of our developers first go to when starting to build solution using Logic Apps and this new capability would allow them to use full power of .NET within the portal-based development experience.
Like Custom code, there is no additional plan required – write your code right within the designer.
We built on top of Azure Functions C# script capability and hence inherit many of its features
In the preview release, the script code is running within the Azure Function host process and we do not support referencing custom assemblies at this point for which you can still use our custom code capability. However, you have access to all the framework assemblies as well as Newtonsoft.Json for serialization needs. We intent to add the support for referencing custom assemblies before this capability is generally available.
Adding C# script in your workflow
You will see a new action called “Execute CSharp Script Code” under “Inline Code” in the list of actions available for you.
Upon selecting this action, a code editor will pop-up allowing you to write your code. The code editor will start with “boilerplate” code to help guide you in writing your first CSharp script in Logic App.
The script code is saved as a .csx file in the same folder as your workflow.json file and deployed to your application along with the workflow definition. As part of Logic App initialization, this code file will be compiled and be ready for execution.
How does the scripting work?
The .csx format allows you to write less “boilerplate” and focus on writing just a C# function. Instead of wrapping everything in a namespace and class, just define a Run method. Include any assembly references and namespaces at the beginning of the file as usual. The name of this method is predefined, and your workflow can run only invoke this Run method at runtime.
Data from your workflow flows into your Run method through parameter of WorkflowContext type. In addition to the workflow context, you can also have this method take function logger as a parameter and a cancellation tokens (needed if your script is long running and needs to be gracefully terminate in case of Function Host is shutting down).
// Add the required libraries
#r “Newtonsoft.Json”
#r “Microsoft.Azure.Workflows.Scripting”
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Microsoft.Extensions.Logging;
using Microsoft.Azure.Workflows.Scripting;
using Newtonsoft.Json.Linq;
public static async Task<Results> Run(WorkflowContext context, ILogger log)
{
var triggerOutputs = (await context.GetTriggerResults().ConfigureAwait(false)).Outputs;
var name = triggerOutputs?[“body”]?[“name”]?.ToString();
return new Results
{
Message = !string.IsNullOrEmpty(name) ? $”Hello {name} from CSharp action” : “Hello from CSharp action.”
};
}
public class Results
{
public string Message {get; set;}
}
The #r statement is explained here. And class definition for WorkflowContext provided here.
Flowing data into the script from the workflow
The WorkflowContext has two method that you can use to access the data from your workflow.
For accessing data from your trigger, you can use GetTriggerResults method. This will return an object representing the trigger and its outputs is available in the Outputs property. It is an object of type JObject and you can use [] indexer to lookup for various properties in the trigger outputs. For example, the below code retrieves the data from trigger outputs body property
public static async Task<Results> Run(WorkflowContext context, ILogger log)
{
var triggerOutputs = (await context.GetTriggerResults().ConfigureAwait(false)).Outputs;
var body = triggerOutputs[“body”];
}
For accessing data from an action, you can use the GetActionResults method. Like triggers, this will return an object representing the action and its outputs is available in the Outputs property. This method will take action name as parameter as shown below.
public static async Task<Results> Run(WorkflowContext context, ILogger log)
{
var actionOutputs = (await context.GetActionResults(“actionName”).ConfigureAwait(false)).Outputs;
var body = actionOutputs[“body”];
}
Returning data back to your workflow
Your run method can have a return type and it can also be a Task<> if you want the method to be async, the return value then will be set as the outputs body of the script action that any subsequent actions can reference.
Limits
Duration
Your script can run for up to 10mins. Let us know if you have scenarios that require longer durations
Outputs
Output size is subjected to the outputs size limit of the actions (100MB).
Logging
To log output to your streaming logs in C#, include an argument of type ILogger. We recommend that you name it log. Avoid using Console. Write in in your script.
public static void Run(WorkflowContext context, ILogger log)
{
log.LogInformation($”C# script has executed successfully”);
}
Custom metrics logging
You can use the LogMetric extension method on ILogger to create custom metrics in Application Insights. Here’s a sample method call:
logger.LogMetric(“TestMetric”, 1234);
Importing namespaces
If you need to import namespaces, you can do so as usual, with the using clause.
The following namespaces are automatically imported and are therefore optional:
System
System.Collections.Generic
System.IO
System.Linq
System.Net.Http
System.Threading.Tasks
Microsoft.Azure.WebJobs
Microsoft.Azure.WebJobs.Host
Referencing external assemblies
For framework assemblies, add references by using the #r “AssemblyName” directive.
// Add the required libraries
#r “Newtonsoft.Json”
#r “Microsoft.Azure.Workflows.Scripting”
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Microsoft.Extensions.Logging;
using Microsoft.Azure.Workflows.Scripting;
using Newtonsoft.Json.Linq;
public static async Task<Results> Run(WorkflowContext context, ILogger log)
The following assemblies are automatically added by the Azure Functions hosting environment:
mscorlib
System
System.Core
System.Xml
System.Net.Http
Microsoft.Azure.WebJobs
Microsoft.Azure.WebJobs.Host
Microsoft.Azure.WebJobs.Extensions
System.Web.Http
System.Net.Http.Formatting
Newtonsoft.Json
Environment variables
To get an environment variable or an app setting value, use System.Environment.GetEnvironmentVariable, as shown in the following code example:
public static void Run(WorkflowContext context, ILogger log)
{
log.LogInformation($”C# Timer trigger function executed at: {DateTime.Now}”);
log.LogInformation(GetEnvironmentVariable(“AzureWebJobsStorage”));
log.LogInformation(GetEnvironmentVariable(“WEBSITE_SITE_NAME”));
}
public static string GetEnvironmentVariable(string name)
{
return name + “: ” + System.Environment.GetEnvironmentVariable(name, EnvironmentVariableTarget.Process);
}
Compilation Errors
The web-based editor has limited IntelliSense support at this time, and we are working on improving as we make this capability generally available. Any compilation error will hence be detected at save time when the logic app runtime compiles the script. These errors will appear in the error-logs of your logic app.
Runtime Errors
Any error that happens at execution time in the script will propagate back to the workflow and the script action will be marked as failed with the error object representing the exception that was thrown from your script.
Example Scripts
Uncompressing a ZIP file containing multiple text files retrieved from an HTTP action into an array of strings
// Add the required libraries
#r “Newtonsoft.Json”
#r “Microsoft.Azure.Workflows.Scripting”
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Microsoft.Azure.Workflows.Scripting;
using System;
using System.IO;
using System.IO.Compression;
using System.Text;
using System.Collections.Generic;
/// <summary>
/// Executes the inline csharp code.
/// </summary>
/// <param name=”context”>The workflow context.</param>
public static async Task<List<string>> Run(WorkflowContext context)
{
var outputs = (await context.GetActionResults(“HTTP_1”).ConfigureAwait(false)).Outputs;
var base64zipFileContent = outputs[“body”][“$content”].ToString();
// Decode base64 to bytes
byte[] zipBytes = Convert.FromBase64String(base64zipFileContent);
List<string> fileContents = new List<string>();
// Create an in-memory stream from the zip bytes
using (MemoryStream zipStream = new MemoryStream(zipBytes))
{
// Extract files from the zip archive
using (ZipArchive zipArchive = new ZipArchive(zipStream))
{
foreach (ZipArchiveEntry entry in zipArchive.Entries)
{
// Read each file’s content
using (StreamReader reader = new StreamReader(entry.Open()))
{
string fileContent = reader.ReadToEnd();
fileContents.Add(fileContent);
}
}
}
}
return fileContents;
}
Encrypt Data using a key from App-Settings
// Add the required libraries
#r “Newtonsoft.Json”
#r “Microsoft.Azure.Workflows.Scripting”
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Microsoft.Azure.Workflows.Scripting;
using Newtonsoft.Json.Linq;
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
/// <summary>
/// Executes the inline csharp code.
/// </summary>
/// <param name=”context”>The workflow context.</param>
public static async Task<string> Run(WorkflowContext context)
{
var compose = (await context.GetActionResults(“compose”).ConfigureAwait(false)).Outputs;
var text = compose[“sampleData”].ToString();
return EncryptString(text);
}
public static string EncryptString(string plainText)
{
var key = Environment.GetEnvironmentVariable(“app-setting-key”);
var iv = Environment.GetEnvironmentVariable(“app-setting-iv”);
using (Aes aesAlg = Aes.Create())
{
aesAlg.Key = Encoding.UTF8.GetBytes(key);
aesAlg.IV = Encoding.UTF8.GetBytes(iv);
ICryptoTransform encryptor = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV);
using (MemoryStream msEncrypt = new MemoryStream())
{
using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
{
using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
{
swEncrypt.Write(plainText);
}
}
return Convert.ToBase64String(msEncrypt.ToArray());
}
}
}
Appendix
WorkflowContext Class
Represents the context of a workflow.
Methods
Task<WorkflowOperationResult> GetActionResult(string actionName)
Gets the result of a specific action within the workflow.
Parameters
actionName
The name of the action.
Returns
A Task representing the asynchronous operation. The task result contains a WorkflowOperationResult object.
Task<WorkflowOperationResult> RunTriggerResult()
Gets the result of the workflow trigger.
Returns
A Task representing the asynchronous operation. The task result contains a WorkflowOperationResult object with the following properties:
WorkflowOperationResult Class
Represents the result of a workflow operation.
Properties
string Name
Gets or sets the operation name.
JToken Inputs
Gets or sets the operation execution inputs.
JToken Outputs
Gets or sets the operation execution outputs.
DateTime? StartTime
Gets or sets the operation start time.
DateTime? EndTime
Gets or sets the operation end time.
string OperationTrackingId
Gets or sets the operation tracking id.
string Code
Gets or sets the status code of the action.
string Status
Gets or sets the status of the action.
JToken Error
Gets or sets the error of the action
JToken TrackedProperties
Gets or sets the tracked properties of the action
Microsoft Tech Community – Latest Blogs –Read More
Please can anyone help me to correct this code !!!!
% Définition des matrices de système
A = [0 0 1 -1 0 0; 0 1 0 0 1 0; 0 0 0 0 0 1];
B1 = [0 1 0; 0 0 0; 0 0 0];
B2 = [0 0 1; 0 0 0; 0 0 0];
C1 = [1 0 0; 0 1 0; 0 0 1];
C2 = [0 0 1; 0 0 0; 0 0 0];
D1 = [1 0 0; 0 1 0; 0 0 1];
% Définition des fonctions d’appartenance floues
f1 = @(t) (t – 0.5)^2;
f2 = @(t) t;
% Définition des règles floues
rule1 = ‘IF f1(t) is "Long" and f2(t) is "Extended", THEN _x(t) = A1*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule2 = ‘IF f1(t) is "Short" and f2(t) is "Compressed", THEN _x(t) = A2*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule3 = ‘IF f1(t) is "Long" and f2(t) is "Compressed", THEN _x(t) = A3*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule4 = ‘IF f1(t) is "Short" and f2(t) is "Extended", THEN _x(t) = A4*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
% Définition des gains de contrôle
P1 = [1 0 0; 0 1 0; 0 0 1];
P2 = [0 1 0; 0 0 1; 0 0 0];
P3 = [0 0 1; 0 0 0; 0 0 1];
P4 = [1 0 0; 0 1 0; 0 0 1];
% Définition de la fonction de contrôle
control = @(t, x) P1*x + P2*x + P3*sat(u(t) – s(t));
% Simulation
t = 0:0.01:10;
x0 = [1; 0; 0];
u = zeros(size(t));
s = 0.5*t;
z1 = zeros(size(t));
z2 = zeros(size(t));
for i = 1:length(t)
x = x0;
for j = 1:length(t)
if f1(t(j)) > 0.5 && f2(t(j)) > 0.5
x = A1*x + B1*x + B2*sat(u(j) – s(j));
elseif f1(t(j)) < 0.5 && f2(t(j)) < 0.5
x = A2*x + B1*x + B2*sat(u(j) – s(j));
elseif f1(t(j)) > 0.5 && f2(t(j)) < 0.5
x = A3*x + B1*x + B2*sat(u(j) – s(j));
else
x = A4*x + B1*x + B2*sat(u(j) – s(j));
end
end
z1(i) = C1*x;
z2(i) = C2*x;
u(i) = control(t(i), x);
end
% Affichage des résultats
plot(t, z1, t, z2);
xlabel(‘Time (s)’);
ylabel(‘State’);
title(‘Active Suspension System’);
And this the error message ‘ paper1
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of
rows in the second matrix. To perform elementwise multiplication, use ‘.*’.
Error in paper1 (line 42)
x = A2*x + B1*x + B2*sat(u(j) – s(j)); ‘% Définition des matrices de système
A = [0 0 1 -1 0 0; 0 1 0 0 1 0; 0 0 0 0 0 1];
B1 = [0 1 0; 0 0 0; 0 0 0];
B2 = [0 0 1; 0 0 0; 0 0 0];
C1 = [1 0 0; 0 1 0; 0 0 1];
C2 = [0 0 1; 0 0 0; 0 0 0];
D1 = [1 0 0; 0 1 0; 0 0 1];
% Définition des fonctions d’appartenance floues
f1 = @(t) (t – 0.5)^2;
f2 = @(t) t;
% Définition des règles floues
rule1 = ‘IF f1(t) is "Long" and f2(t) is "Extended", THEN _x(t) = A1*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule2 = ‘IF f1(t) is "Short" and f2(t) is "Compressed", THEN _x(t) = A2*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule3 = ‘IF f1(t) is "Long" and f2(t) is "Compressed", THEN _x(t) = A3*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule4 = ‘IF f1(t) is "Short" and f2(t) is "Extended", THEN _x(t) = A4*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
% Définition des gains de contrôle
P1 = [1 0 0; 0 1 0; 0 0 1];
P2 = [0 1 0; 0 0 1; 0 0 0];
P3 = [0 0 1; 0 0 0; 0 0 1];
P4 = [1 0 0; 0 1 0; 0 0 1];
% Définition de la fonction de contrôle
control = @(t, x) P1*x + P2*x + P3*sat(u(t) – s(t));
% Simulation
t = 0:0.01:10;
x0 = [1; 0; 0];
u = zeros(size(t));
s = 0.5*t;
z1 = zeros(size(t));
z2 = zeros(size(t));
for i = 1:length(t)
x = x0;
for j = 1:length(t)
if f1(t(j)) > 0.5 && f2(t(j)) > 0.5
x = A1*x + B1*x + B2*sat(u(j) – s(j));
elseif f1(t(j)) < 0.5 && f2(t(j)) < 0.5
x = A2*x + B1*x + B2*sat(u(j) – s(j));
elseif f1(t(j)) > 0.5 && f2(t(j)) < 0.5
x = A3*x + B1*x + B2*sat(u(j) – s(j));
else
x = A4*x + B1*x + B2*sat(u(j) – s(j));
end
end
z1(i) = C1*x;
z2(i) = C2*x;
u(i) = control(t(i), x);
end
% Affichage des résultats
plot(t, z1, t, z2);
xlabel(‘Time (s)’);
ylabel(‘State’);
title(‘Active Suspension System’);
And this the error message ‘ paper1
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of
rows in the second matrix. To perform elementwise multiplication, use ‘.*’.
Error in paper1 (line 42)
x = A2*x + B1*x + B2*sat(u(j) – s(j)); ‘ % Définition des matrices de système
A = [0 0 1 -1 0 0; 0 1 0 0 1 0; 0 0 0 0 0 1];
B1 = [0 1 0; 0 0 0; 0 0 0];
B2 = [0 0 1; 0 0 0; 0 0 0];
C1 = [1 0 0; 0 1 0; 0 0 1];
C2 = [0 0 1; 0 0 0; 0 0 0];
D1 = [1 0 0; 0 1 0; 0 0 1];
% Définition des fonctions d’appartenance floues
f1 = @(t) (t – 0.5)^2;
f2 = @(t) t;
% Définition des règles floues
rule1 = ‘IF f1(t) is "Long" and f2(t) is "Extended", THEN _x(t) = A1*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule2 = ‘IF f1(t) is "Short" and f2(t) is "Compressed", THEN _x(t) = A2*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule3 = ‘IF f1(t) is "Long" and f2(t) is "Compressed", THEN _x(t) = A3*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
rule4 = ‘IF f1(t) is "Short" and f2(t) is "Extended", THEN _x(t) = A4*x(t) + B1*x(t) + B2*sat(u(t) – s(t))’;
% Définition des gains de contrôle
P1 = [1 0 0; 0 1 0; 0 0 1];
P2 = [0 1 0; 0 0 1; 0 0 0];
P3 = [0 0 1; 0 0 0; 0 0 1];
P4 = [1 0 0; 0 1 0; 0 0 1];
% Définition de la fonction de contrôle
control = @(t, x) P1*x + P2*x + P3*sat(u(t) – s(t));
% Simulation
t = 0:0.01:10;
x0 = [1; 0; 0];
u = zeros(size(t));
s = 0.5*t;
z1 = zeros(size(t));
z2 = zeros(size(t));
for i = 1:length(t)
x = x0;
for j = 1:length(t)
if f1(t(j)) > 0.5 && f2(t(j)) > 0.5
x = A1*x + B1*x + B2*sat(u(j) – s(j));
elseif f1(t(j)) < 0.5 && f2(t(j)) < 0.5
x = A2*x + B1*x + B2*sat(u(j) – s(j));
elseif f1(t(j)) > 0.5 && f2(t(j)) < 0.5
x = A3*x + B1*x + B2*sat(u(j) – s(j));
else
x = A4*x + B1*x + B2*sat(u(j) – s(j));
end
end
z1(i) = C1*x;
z2(i) = C2*x;
u(i) = control(t(i), x);
end
% Affichage des résultats
plot(t, z1, t, z2);
xlabel(‘Time (s)’);
ylabel(‘State’);
title(‘Active Suspension System’);
And this the error message ‘ paper1
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of
rows in the second matrix. To perform elementwise multiplication, use ‘.*’.
Error in paper1 (line 42)
x = A2*x + B1*x + B2*sat(u(j) – s(j)); ‘ matlab, matrix, optimization MATLAB Answers — New Questions
Some emails sending as plain text after migration to Exchange Online
I’ve migrated many customers from IMAP email accounts to Microsoft Exchange Online accounts. It usually works very well. I’ve had two customers who have had issues with regards to some emails being sent out as plain text instead of HTML. For example if they send a simple email with a link to a website then the receipient gets the following:
_0000_293749327492
Conent-Type:text/plain;
charset=”utf-8″
content-Transfer-Encoding: base 64
etc…
The Exchange accounts are brand new so none of the defaults could have changed. My thinking is it has something to do with the address book that has been imported into the new M365 Exchange. Has anyone else experience this or got any idea on how to resolve it?
I’ve migrated many customers from IMAP email accounts to Microsoft Exchange Online accounts. It usually works very well. I’ve had two customers who have had issues with regards to some emails being sent out as plain text instead of HTML. For example if they send a simple email with a link to a website then the receipient gets the following: _0000_293749327492Conent-Type:text/plain;charset=”utf-8″content-Transfer-Encoding: base 64etc… The Exchange accounts are brand new so none of the defaults could have changed. My thinking is it has something to do with the address book that has been imported into the new M365 Exchange. Has anyone else experience this or got any idea on how to resolve it? Read More
a cylindirical annular fuel element consist of two regions, solve the temperature distribution by using finite difference method??
hi everyone i have a problem I dont know how to write code please help me if i do that i will graduate. I should use Finite Difference Method.
Consider a cylindirical annular fuel element consist of two regions, one is UO2 (fuel) other is Zircaloy-4 (cladding). Assume that heat is generated only in fuel region. There is internal and external cooling for the fuel element. You are asked to solve the temperature distribution from Rv to outer surface of the cladding by using finite difference method.
Fuel radius Rfo=0.705 cm
internal cavity radius: Rv=0.495 cm
thickness of clad, tc= 0.0654 cm
cald radius :Rclad=Rfo+tc
Water Bulk Temperature: Tb=316 C
Heat transfer coefficient of water: h_w=55 W/cm^2 K
1/r d/dr rk dT/dr= -q′′′
Volumetric Heat Generation Rate: q(r)’’’= q_1^”’+(q_2^”’ r^2)/(Rfo^2 )
q_1^”’=0.75q_0^”’
q_2^”’=0.50q_0^”’
Case1q_0’’’: 388 W/cm3
Case2q_0’’’: 388*1.5 W/cm3
Case3q_0’’’: 388*2 W/cm3
A= 4.52
B=2.46*〖10〗^(-2)
E= 3.5*〖10〗^7
F=16361
Conductivity are temperature dependent: kf=1/(A+BT)+(E/T^2 )exp(-F/T)
Conductivity of Clad: kc= 0.113+2.25*(10^-5*)T + (0.725*10^8)T^2 𝑊/c𝑚𝐾
Boundary condition: -kf dT/dr= h_w (T(Rv)-Tb) @r=Rv
Boundary condition: -kc dT/dr= h_w (T(Rclad)-Tb) @r=Rclad
1)Plot the conductivity distributions for the three cases in a single graph.
2) Plot the Temperature distributions for the three cases in a single graph.
I had to create a matrix for k, start from a T value and iterate until I found the appropriate value. But I can’t do it, it’s so hard for me, help me ??hi everyone i have a problem I dont know how to write code please help me if i do that i will graduate. I should use Finite Difference Method.
Consider a cylindirical annular fuel element consist of two regions, one is UO2 (fuel) other is Zircaloy-4 (cladding). Assume that heat is generated only in fuel region. There is internal and external cooling for the fuel element. You are asked to solve the temperature distribution from Rv to outer surface of the cladding by using finite difference method.
Fuel radius Rfo=0.705 cm
internal cavity radius: Rv=0.495 cm
thickness of clad, tc= 0.0654 cm
cald radius :Rclad=Rfo+tc
Water Bulk Temperature: Tb=316 C
Heat transfer coefficient of water: h_w=55 W/cm^2 K
1/r d/dr rk dT/dr= -q′′′
Volumetric Heat Generation Rate: q(r)’’’= q_1^”’+(q_2^”’ r^2)/(Rfo^2 )
q_1^”’=0.75q_0^”’
q_2^”’=0.50q_0^”’
Case1q_0’’’: 388 W/cm3
Case2q_0’’’: 388*1.5 W/cm3
Case3q_0’’’: 388*2 W/cm3
A= 4.52
B=2.46*〖10〗^(-2)
E= 3.5*〖10〗^7
F=16361
Conductivity are temperature dependent: kf=1/(A+BT)+(E/T^2 )exp(-F/T)
Conductivity of Clad: kc= 0.113+2.25*(10^-5*)T + (0.725*10^8)T^2 𝑊/c𝑚𝐾
Boundary condition: -kf dT/dr= h_w (T(Rv)-Tb) @r=Rv
Boundary condition: -kc dT/dr= h_w (T(Rclad)-Tb) @r=Rclad
1)Plot the conductivity distributions for the three cases in a single graph.
2) Plot the Temperature distributions for the three cases in a single graph.
I had to create a matrix for k, start from a T value and iterate until I found the appropriate value. But I can’t do it, it’s so hard for me, help me ?? hi everyone i have a problem I dont know how to write code please help me if i do that i will graduate. I should use Finite Difference Method.
Consider a cylindirical annular fuel element consist of two regions, one is UO2 (fuel) other is Zircaloy-4 (cladding). Assume that heat is generated only in fuel region. There is internal and external cooling for the fuel element. You are asked to solve the temperature distribution from Rv to outer surface of the cladding by using finite difference method.
Fuel radius Rfo=0.705 cm
internal cavity radius: Rv=0.495 cm
thickness of clad, tc= 0.0654 cm
cald radius :Rclad=Rfo+tc
Water Bulk Temperature: Tb=316 C
Heat transfer coefficient of water: h_w=55 W/cm^2 K
1/r d/dr rk dT/dr= -q′′′
Volumetric Heat Generation Rate: q(r)’’’= q_1^”’+(q_2^”’ r^2)/(Rfo^2 )
q_1^”’=0.75q_0^”’
q_2^”’=0.50q_0^”’
Case1q_0’’’: 388 W/cm3
Case2q_0’’’: 388*1.5 W/cm3
Case3q_0’’’: 388*2 W/cm3
A= 4.52
B=2.46*〖10〗^(-2)
E= 3.5*〖10〗^7
F=16361
Conductivity are temperature dependent: kf=1/(A+BT)+(E/T^2 )exp(-F/T)
Conductivity of Clad: kc= 0.113+2.25*(10^-5*)T + (0.725*10^8)T^2 𝑊/c𝑚𝐾
Boundary condition: -kf dT/dr= h_w (T(Rv)-Tb) @r=Rv
Boundary condition: -kc dT/dr= h_w (T(Rclad)-Tb) @r=Rclad
1)Plot the conductivity distributions for the three cases in a single graph.
2) Plot the Temperature distributions for the three cases in a single graph.
I had to create a matrix for k, start from a T value and iterate until I found the appropriate value. But I can’t do it, it’s so hard for me, help me ?? finite difference method, temperature distribution, annular pellet, conductivity, cladding, heat generation, homework, temperature, external cooling, uo2 (fuel), matlab, plot, matrix, graph, function, differential equations, matrices, iteration MATLAB Answers — New Questions
Connecting Bluetooth Module and Arduino without using arduinosetup command
I’m connecting IMU9250 sensor and Bluetooth module HC-05 to my arduino and I want to get the data of the IMU using the Bluetooth module instead of using the Arduino cable.
I’m trying to use arduinosetup command but it fails at last step while testing the connection between Arduino and Bluetooth module.
I’ve tested the connection of the Bluetooth module only usning blutooth() function and it connects fine!
My question is: Is there a way to establish the connection between MATLAB and the HC-05 Bluetooth module connected to my Arduino Uno without using arduinosetup. Just by using objects and functions step by step manually.I’m connecting IMU9250 sensor and Bluetooth module HC-05 to my arduino and I want to get the data of the IMU using the Bluetooth module instead of using the Arduino cable.
I’m trying to use arduinosetup command but it fails at last step while testing the connection between Arduino and Bluetooth module.
I’ve tested the connection of the Bluetooth module only usning blutooth() function and it connects fine!
My question is: Is there a way to establish the connection between MATLAB and the HC-05 Bluetooth module connected to my Arduino Uno without using arduinosetup. Just by using objects and functions step by step manually. I’m connecting IMU9250 sensor and Bluetooth module HC-05 to my arduino and I want to get the data of the IMU using the Bluetooth module instead of using the Arduino cable.
I’m trying to use arduinosetup command but it fails at last step while testing the connection between Arduino and Bluetooth module.
I’ve tested the connection of the Bluetooth module only usning blutooth() function and it connects fine!
My question is: Is there a way to establish the connection between MATLAB and the HC-05 Bluetooth module connected to my Arduino Uno without using arduinosetup. Just by using objects and functions step by step manually. arduino, bluetooth, hc-05, imu, robotics, serial MATLAB Answers — New Questions
Why MATLAB crashed while running PV based boost converter simulink model
MATLAB simulink crashed while running model based on PV array system with boost converter. When I changed irradiation of PV array it crash simulink model and also closed MATLAB. Initially i used stair function then tried with manually constant block during running model.MATLAB simulink crashed while running model based on PV array system with boost converter. When I changed irradiation of PV array it crash simulink model and also closed MATLAB. Initially i used stair function then tried with manually constant block during running model. MATLAB simulink crashed while running model based on PV array system with boost converter. When I changed irradiation of PV array it crash simulink model and also closed MATLAB. Initially i used stair function then tried with manually constant block during running model. pv array, boost converter, simulink, simscape electrical MATLAB Answers — New Questions
One drive time to back up
Hi,
Is there a way to setup a time or date that onedrive makes a back up, like every week once?
It’s for Android one drive
Hi,Is there a way to setup a time or date that onedrive makes a back up, like every week once?It’s for Android one drive Read More
Is my Wondos controlled by my company?
I am running Windows 11 Pro that I got from Visual Studio Essentials since I have a company subscription. I then upgraded it to Insider. A new Windows update was installed and on the Update screen it was saying that your company will restart you r computer ….. does that mean my PC is controlled by my company?
Thanks
I am running Windows 11 Pro that I got from Visual Studio Essentials since I have a company subscription. I then upgraded it to Insider. A new Windows update was installed and on the Update screen it was saying that your company will restart you r computer ….. does that mean my PC is controlled by my company? Thanks Read More
Prob lem with SUMIF
I feel bad having to ask this question because I have used it in the past 10 years ago
I have a column with names in the next column I have amounts. I want to sum the total
of the amounts with the name Carolyn in the 1st comumn but I keep getting errors. I have fixed
the dumb ones but am unable to get the rest to give me a value I get a blank cell.
I feel bad having to ask this question because I have used it in the past 10 years ago I have a column with names in the next column I have amounts. I want to sum the total of the amounts with the name Carolyn in the 1st comumn but I keep getting errors. I have fixedthe dumb ones but am unable to get the rest to give me a value I get a blank cell. Read More