Month: July 2024
getting name of the txsite that offers best SINR (or signal strength)
Hi All,
I am trying to put RF propagation functionality in the Antenna Toolbox to good use.
I have a scenario where there are multiple transmitters and I produce the SINR plot in a region of interest using sinr() function. My question is whether there is a way to programmatically find out the txsite that offered the best signal strength (and hence the best SINR) at a given point in the region of interest?
Thanks in advanceHi All,
I am trying to put RF propagation functionality in the Antenna Toolbox to good use.
I have a scenario where there are multiple transmitters and I produce the SINR plot in a region of interest using sinr() function. My question is whether there is a way to programmatically find out the txsite that offered the best signal strength (and hence the best SINR) at a given point in the region of interest?
Thanks in advance Hi All,
I am trying to put RF propagation functionality in the Antenna Toolbox to good use.
I have a scenario where there are multiple transmitters and I produce the SINR plot in a region of interest using sinr() function. My question is whether there is a way to programmatically find out the txsite that offered the best signal strength (and hence the best SINR) at a given point in the region of interest?
Thanks in advance rf propagation, txsite, sinr, rxsite MATLAB Answers — New Questions
How to call a DLL sub-function in Simulink EML suitable for use in accelerated models & generated code
I think the Summary says it all.
But please note that other sub-functions of the same DLL will be called by other EML instances in the same model (as the DLL is intended to be used as a shared/common dataset to overcome Simulink problems with passing large datasets over model reference boundaries and accelerated code generation failures).
Also I have, working perfectly well, developed mex and s-function (and tlc files) suitable for calling the DLL’s sub-functions outside of the EML. However, the model will flow better if I can do it from EML too.
And yes I know for accelerated use I can use "coder.extrinsic", but I believe that this does not work for generated code (unless you tell me I’m wrong)I think the Summary says it all.
But please note that other sub-functions of the same DLL will be called by other EML instances in the same model (as the DLL is intended to be used as a shared/common dataset to overcome Simulink problems with passing large datasets over model reference boundaries and accelerated code generation failures).
Also I have, working perfectly well, developed mex and s-function (and tlc files) suitable for calling the DLL’s sub-functions outside of the EML. However, the model will flow better if I can do it from EML too.
And yes I know for accelerated use I can use "coder.extrinsic", but I believe that this does not work for generated code (unless you tell me I’m wrong) I think the Summary says it all.
But please note that other sub-functions of the same DLL will be called by other EML instances in the same model (as the DLL is intended to be used as a shared/common dataset to overcome Simulink problems with passing large datasets over model reference boundaries and accelerated code generation failures).
Also I have, working perfectly well, developed mex and s-function (and tlc files) suitable for calling the DLL’s sub-functions outside of the EML. However, the model will flow better if I can do it from EML too.
And yes I know for accelerated use I can use "coder.extrinsic", but I believe that this does not work for generated code (unless you tell me I’m wrong) simulink, matlab function MATLAB Answers — New Questions
Oracle Datetime stamp conversion to SQL Server in SSIS
I have date like this in oralce 14-SEP-19 02.21.02.902547000 PM
getting below err
Inputs[OLE DB Destination Input]. The column status returned was: “Conversion failed because the data value overflowed the specified type.”.
I am trying to insert this into datetime data type in sqlserver table
What conversion I need to apply to make this data pass and store in to SQL server table.
Versions: Sql server version 2016 and VS 2017 SSDT 2015
I have date like this in oralce 14-SEP-19 02.21.02.902547000 PMgetting below err Inputs[OLE DB Destination Input]. The column status returned was: “Conversion failed because the data value overflowed the specified type.”. I am trying to insert this into datetime data type in sqlserver table What conversion I need to apply to make this data pass and store in to SQL server table. Versions: Sql server version 2016 and VS 2017 SSDT 2015 Read More
Copilot Studio plugins are not showing up in Copilot for M365 in Teams
I have created a conversation plugin in Copilot studio using add actions in Copilot for M365 and published the plugin. I have added the user in settings of M365 – integrated app section – available apps (Enabled plugins to specified user) and also deployed the Copilot Studio app (user has been added for specified user/ group).
I am not able to see any Copilot studio plugins in the Copilot for M365 in Teams. I have waited for more than 24 hours. Am I missing any other settings?
I have created a conversation plugin in Copilot studio using add actions in Copilot for M365 and published the plugin. I have added the user in settings of M365 – integrated app section – available apps (Enabled plugins to specified user) and also deployed the Copilot Studio app (user has been added for specified user/ group). I am not able to see any Copilot studio plugins in the Copilot for M365 in Teams. I have waited for more than 24 hours. Am I missing any other settings? Read More
Power Apps and Okta Verification
Hi,
We use Okta for identity management for our O365 accounts and I’m interested in using it from within my apps as an additional level of authentication – perhaps an Okta login or MFA screen before a user can interact with the app:
I’ve seen other posts asking this but haven’t seen any recent ones. Does anyone know if this is possible? Could this be accomplished by using creating a custom connector in Power Automate?
Hi,We use Okta for identity management for our O365 accounts and I’m interested in using it from within my apps as an additional level of authentication – perhaps an Okta login or MFA screen before a user can interact with the app: I’ve seen other posts asking this but haven’t seen any recent ones. Does anyone know if this is possible? Could this be accomplished by using creating a custom connector in Power Automate? Read More
How to disable beep on backspace. Beep off does not work.
I loaded Matlab 2023a this morning, and discovered that it had started beeping in a variety of ways, all of which are incredibly annoying. This never used to happen, so imagine my surprise when I search the problem and discover that people have been complaining about this very issue since at least 2012. I don’t know why this has suddenly become a problem, but it is infuriating. I know it sounds like a minor issue, but it has hamstrung my productivity entirely.
The command beep off does not do what it says on the label, leaving the annoying beeps on. If there is any solution that I may have overlooked in my search, I would be most appreciative.
Disabling the system sound in question has had no effect. Matlab ignores my system preferences and plays the sound anyway.
Hacky workaround: I deleted the system bell sound and rebooted, which caused Matlab to go looking for another sound. It defaulted to the freedesktop theme, which I do not use, so from there, I replaced the bell sound with silence. Without completely rebooting, it was still using the same system sound, so it’s storing a copy of it somewhere. If anyone knows where that is, or what exactly it is doing, maybe that’s a pathway to a better solution?I loaded Matlab 2023a this morning, and discovered that it had started beeping in a variety of ways, all of which are incredibly annoying. This never used to happen, so imagine my surprise when I search the problem and discover that people have been complaining about this very issue since at least 2012. I don’t know why this has suddenly become a problem, but it is infuriating. I know it sounds like a minor issue, but it has hamstrung my productivity entirely.
The command beep off does not do what it says on the label, leaving the annoying beeps on. If there is any solution that I may have overlooked in my search, I would be most appreciative.
Disabling the system sound in question has had no effect. Matlab ignores my system preferences and plays the sound anyway.
Hacky workaround: I deleted the system bell sound and rebooted, which caused Matlab to go looking for another sound. It defaulted to the freedesktop theme, which I do not use, so from there, I replaced the bell sound with silence. Without completely rebooting, it was still using the same system sound, so it’s storing a copy of it somewhere. If anyone knows where that is, or what exactly it is doing, maybe that’s a pathway to a better solution? I loaded Matlab 2023a this morning, and discovered that it had started beeping in a variety of ways, all of which are incredibly annoying. This never used to happen, so imagine my surprise when I search the problem and discover that people have been complaining about this very issue since at least 2012. I don’t know why this has suddenly become a problem, but it is infuriating. I know it sounds like a minor issue, but it has hamstrung my productivity entirely.
The command beep off does not do what it says on the label, leaving the annoying beeps on. If there is any solution that I may have overlooked in my search, I would be most appreciative.
Disabling the system sound in question has had no effect. Matlab ignores my system preferences and plays the sound anyway.
Hacky workaround: I deleted the system bell sound and rebooted, which caused Matlab to go looking for another sound. It defaulted to the freedesktop theme, which I do not use, so from there, I replaced the bell sound with silence. Without completely rebooting, it was still using the same system sound, so it’s storing a copy of it somewhere. If anyone knows where that is, or what exactly it is doing, maybe that’s a pathway to a better solution? beep MATLAB Answers — New Questions
Invalid use of operator
Hello,
How are you? I am using MATLAB to work on a research project. Our lab previously created a code to generate a GUI, enabling us (non-coders) to use MATLAB and carry out the research. The code was working fine, but then I tried to copy the MATLAB file from the Documents folder to a different folder. It worked fine for one case but then stopped working. I am getting this error:
X.m Line:709 Column:1 Invalid use of operator.
We have checked the code and there is no issue, especially in line 709 and its surroundings. I have tried the following steps:
Putting the MATLAB folder back in Documents -> same error.
Uninstalling MATLAB from my Mac and reinstalling the same version -> same error.
Using a previous code for the GUI that has exactly the same code in line 709 -> works fine. (I can’t use this code as the latest one has functions that I need for my work.)
Seeing that the only thing that had changed was the directory, I am assuming it has something to do with that. I must note that even after changing the directory, it worked for one sample and then stopped working. I am really stuck and would appreciate anyone’s feedback.
Thank you and kind regards,
SouvikHello,
How are you? I am using MATLAB to work on a research project. Our lab previously created a code to generate a GUI, enabling us (non-coders) to use MATLAB and carry out the research. The code was working fine, but then I tried to copy the MATLAB file from the Documents folder to a different folder. It worked fine for one case but then stopped working. I am getting this error:
X.m Line:709 Column:1 Invalid use of operator.
We have checked the code and there is no issue, especially in line 709 and its surroundings. I have tried the following steps:
Putting the MATLAB folder back in Documents -> same error.
Uninstalling MATLAB from my Mac and reinstalling the same version -> same error.
Using a previous code for the GUI that has exactly the same code in line 709 -> works fine. (I can’t use this code as the latest one has functions that I need for my work.)
Seeing that the only thing that had changed was the directory, I am assuming it has something to do with that. I must note that even after changing the directory, it worked for one sample and then stopped working. I am really stuck and would appreciate anyone’s feedback.
Thank you and kind regards,
Souvik Hello,
How are you? I am using MATLAB to work on a research project. Our lab previously created a code to generate a GUI, enabling us (non-coders) to use MATLAB and carry out the research. The code was working fine, but then I tried to copy the MATLAB file from the Documents folder to a different folder. It worked fine for one case but then stopped working. I am getting this error:
X.m Line:709 Column:1 Invalid use of operator.
We have checked the code and there is no issue, especially in line 709 and its surroundings. I have tried the following steps:
Putting the MATLAB folder back in Documents -> same error.
Uninstalling MATLAB from my Mac and reinstalling the same version -> same error.
Using a previous code for the GUI that has exactly the same code in line 709 -> works fine. (I can’t use this code as the latest one has functions that I need for my work.)
Seeing that the only thing that had changed was the directory, I am assuming it has something to do with that. I must note that even after changing the directory, it worked for one sample and then stopped working. I am really stuck and would appreciate anyone’s feedback.
Thank you and kind regards,
Souvik invalid use of operator MATLAB Answers — New Questions
What Are the Latest Updates for Fixing Q.B Pay-roll Error PS038?
I’m running across the PS038 Quick-Books Pay-roll problem. How can I resolve this problem so that my pay-roll processing goes without a hitch?
I’m running across the PS038 Quick-Books Pay-roll problem. How can I resolve this problem so that my pay-roll processing goes without a hitch? Read More
regain access to my outlook for my emails
My ICON for outlook suddenly stopped opening – I contacted support and the QR code they sent never openened either Help
My ICON for outlook suddenly stopped opening – I contacted support and the QR code they sent never openened either Help Read More
How do I generate constant harmonic currents
I can use the three phase constant current block to generate a constant current of the fundamental frequency. How do I generate constant three phase harmonic currents? For example, 5A of the 7th harmonic. I don’t see a frequency setting in the block parameters for the three phase constant current block.
Thanks,
DavidI can use the three phase constant current block to generate a constant current of the fundamental frequency. How do I generate constant three phase harmonic currents? For example, 5A of the 7th harmonic. I don’t see a frequency setting in the block parameters for the three phase constant current block.
Thanks,
David I can use the three phase constant current block to generate a constant current of the fundamental frequency. How do I generate constant three phase harmonic currents? For example, 5A of the 7th harmonic. I don’t see a frequency setting in the block parameters for the three phase constant current block.
Thanks,
David constant current MATLAB Answers — New Questions
What are common causes and solutions for Quick-Books Pay-roll error PS038?
I’m encountering Quick-Books error PS038 while trying to update my pay-roll. What could be causing this issue, and how can I resolve it quickly?
I’m encountering Quick-Books error PS038 while trying to update my pay-roll. What could be causing this issue, and how can I resolve it quickly? Read More
Purview and Snowflake
we are trying to create scans connecting to Snowflake. I successfully created snowflake subscription, established connection creating new data source in Purview and created new scan details following the documentation Microsoft provided. When I try run the scans, I am getting the below error. Can please help what I am missing here. When I look at the log file, I can see the connection is successfully establishing but Metadata Discovery is getting failed.
Error: Snowflake Internal Error: Unable to connect. Invalid URI: The hostname could not be parsed. SqlState: 08006, VendorCode: 270001, QueryId:
Errorcode : FailToConnect
OperationItem : snowflake://abcdefg.snowflakecomputing.com/databases/SNOWFLAKE_SAMPLE_DATA/schemas/TPCDS_SF100TCL/tables/CALL_CENTER
Purview successfully establishing the connection and Ingesting successfully but failing at Metadata Discovery state.
Please help how to we resolve this issue.
Sincerely,
Krishna.
we are trying to create scans connecting to Snowflake. I successfully created snowflake subscription, established connection creating new data source in Purview and created new scan details following the documentation Microsoft provided. When I try run the scans, I am getting the below error. Can please help what I am missing here. When I look at the log file, I can see the connection is successfully establishing but Metadata Discovery is getting failed. Error: Snowflake Internal Error: Unable to connect. Invalid URI: The hostname could not be parsed. SqlState: 08006, VendorCode: 270001, QueryId:Errorcode : FailToConnectOperationItem : snowflake://abcdefg.snowflakecomputing.com/databases/SNOWFLAKE_SAMPLE_DATA/schemas/TPCDS_SF100TCL/tables/CALL_CENTER Purview successfully establishing the connection and Ingesting successfully but failing at Metadata Discovery state. Please help how to we resolve this issue. Sincerely,Krishna. Read More
Microsoft Tech Community Update: July 2024
Today, we are excited to announce a new update for the Microsoft Tech Community that brings some important changes and enhancements to the platform. In this blog post, we will explain what these changes are and why they matter for you as a community member.
Display Names without Spaces
One of the most noticeable changes in this update is that we have begun asking affected users who have spaces in their display name to change them. This means that if you still have a display name that contains spaces, such as John Doe or Jane Smith, you will need to update it to a single word, such as JohnDoe or Jane_Smith. You can change your display name at any time from your profile settings.
Why did we make this change? There are two main reasons. First, we wanted to fix some user experience issues with the @mention feature, which allows you to tag other users in your posts and comments. It was previously not possible to tag users with spaces in their names. Now, you can simply type @ followed by the display name, like this: @JohnDoe. This is much easier and consistent, and it also makes the @mentions more visible and clickable.
Second, we wanted to prepare for a new user interface that we are planning to launch in the early fall. This new UI will have a more modern and streamlined look and feel, and it will also introduce some new features and functionalities which don’t work if the display name has a space in it. We will be sharing more about this update in the coming weeks and months.
We understand that this change may require some adjustment for some of you, and we appreciate your understanding and cooperation. We believe that this change will improve the overall user experience and prepare the platform for the future.
We will approach this update in two phases, between now and end of August 2024 we will present affected users with a pop up and ask them to update their display name. This pop up can be dismissed.
Phase 2, starting from September 1st , we will require all affected users to make this change.
Registration Experience
Another change that we have made in this update is to improve the registration experience for new users. Previously, when you signed up for the Microsoft Tech Community, you had to choose a display name. The process for doing this was confusing and we observed some users would leave before selecting a display name. Now, we have simplified the process by suggesting a display name for you based on your first name. You can then change this if you want or keep it as it is.
For example, if your first name is John, we will suggest JohnS123 as your display name. You can then change it to something else, like JohnDoe or JoDoe, or keep it as john_doe. You can also change it later by going to your settings.
We hope that this change will make the registration process easier and faster for new users, while still allowing users to choose their own display name if they wished to do so.
Bug Fixes
Finally, we have also fixed some bugs and issues that were affecting the platform. Here are some of the most notable ones:
We fixed an issue where images on the events pages would break out of the box on the page, causing the layout to look messy and distorted. Now, the images are resized and cropped to fit the box.
We fixed an issue where there was no accessible text for screen readers on the ‘Accepted Solution’ check icon. This icon indicates that a post has been marked as the best answer by the original poster or a moderator. Now, the icon has text that says, ‘Go to Accepted Solution’, which can be read by screen readers.
We are always working to improve the Microsoft Tech Community platform and make it the best place for you to learn, share, and connect with other Microsoft enthusiasts and experts. We welcome your feedback and suggestions, and we thank you for your continued support and participation.
Microsoft Tech Community – Latest Blogs –Read More
How to solve coupled differential equations using ode45 for “n” modes
Hello everyone,
I am trying to solve some differential equation in matlab using ode45. The equations are as shown below:
I have written the equations in state space form where ydot_1(i) is , ydot_2(i) is , ydot_3(i) is and ydot_4(i) is . In the equation of motion of x, eq(2), x terms are not in terms of “ i “ but I have written them like that (so ydot_3(i) is and ydot_4(i) is )b ecause of the loop that I use on the function below. So the “for” loop, for each time step, lets say starting at solves first the ydot terms for each mode for i = 1:n and then gets out of the loop, goes to the new time step and then solve again for each mode. However, since for each time step it will start from the first mode again, and ydot_1(i) and ydot_2(i) depend on ydot_3(i) and ydot_4(i) , then I am solving the equation of x, eq.2, for each mode. For the new time step, before starting with the first mode again I am defining the
ydot_1=y(1:n); %displacement beam
ydot_2=y(n+1:2*n); %velocity beam
ydot_3=y(2*n+1:3*n); %displacement mass
ydot_4=y(3*n+1:4*n); %velocity mass
v_m=0;
x_m=0;
x_c_prev = x_c_prev_modes{1};
so it can start with the data from the previous first mode (first mode of the previous time step). My problem is that when I solve for 1 mode only, so for n=1 and get the solution du_1= y(:,n+i).*sin(i*pi.* x_c_values_new); and then solve for n=2 but still get the solution du_1= y(:,n+i).*sin(i*pi.* x_c_values_new); for the first mode only, these first modes do not match. The solution have the same shape but differ in amplitude. The same happens with I use n=20, for example, but again plot only the first mode du_1. The solution changes from the first mode obtained when n=2 and from the first mode obtained for n=1. I have checked for days and cant see my mistake so have reached desperation. Would really appreciate your help! thank youuu!
clear all
clc
global xi xi_b r_w r_m mu_s mu_k v alpha P l a w l_0 n x_c_prev x_c_prev_modes
dt=0.01;
tspan = (0:dt:150).’;
% parameters
xi=0.14;
xi_b=0.0025;
r_w=4.5;
r_m=4.8;
mu_s=0.5;
mu_k=0.2 ;
alpha=300;
P=0.002;
l=1/75;
l_0=0.25;
a=0;
w=9;
v=0.005;
% Initialize y_c_prev and the array to store x_c values
x_c_prev = 0;
global t_values x_c_values; % Declare t_values and x_c_values as global
t_values = tspan; % Store time values
x_c_values = zeros(size(tspan)); % Initialize array to store x_c values
n=1;
y0 = zeros(4*n,1);
y0(3*n+1) = -v;
% Initialize y_c_prev
x_c_prev = 0;
% Define your initial value for x_c_prev
x_c_prev_initial = 0;
% Initialize x_c_prev_modes, assuming you have ‘n’ modes
x_c_prev_modes = cell(1, n);
% Initialize the first mode’s x_c_prev
x_c_prev_modes{1} = x_c_prev_initial;
[t,y] = ode45(‘rhs_cont4’,tspan,y0);
for i=1:1
u_1= y(:,i).*sin(i*pi.* x_c_values_new);
du_1= y(:,n+i).*sin(i*pi.* x_c_values_new);
end
figure
plot(t,du_1)
legend("beam vel mode 1")
function ydot=rhs_cont4(t,y)
global xi xi_b r_w r_m mu_s mu_k v alpha P a w l_0 n x_c_prev x_c_prev_modes
% ydot_1=y(1:n); %displacement beam
% ydot_2=y(n+1:2*n); %velocity beam
% ydot_3=y(2*n+1:3*n); %displacement mass
% ydot_4=y(3*n+1:4*n); %velocity mass
ydot_1=zeros(n,1); %displacement beam
ydot_2=zeros(n,1); %velocity beam
ydot_3=zeros(n,1); %displacement mass
ydot_4=zeros(n,1); %velocity mass%
v_m=0;
x_m=0;
x_c_prev = x_c_prev_modes{1};
% fprintf(‘x_c_prev %.7fn ‘, x_c_prev);
for i = 1:n
x_m=y(i)*sin(i*pi*x_c_prev)+x_m;
x_c=y(2*n+i)+v*t+l_0-x_m;
x_c_prev = x_c; % Update y_c_prev for the next iteration
x_c_prev_modes{i} = x_c_prev;
%Store y_c values at the corresponding time step
global t_values x_c_values; % Access global variables
[~, idx] = min(abs(t – t_values)); % Find the index of the closest time step
x_c_values(idx) = x_c; % Store y_c at the corresponding time step
v_m=y(n+i)*sin(i*pi*x_c)+v_m;
ydot_1(i) = y(n+i);
ydot_2(i) = -2*xi_b*r_w*y(n+i)-(r_w*i)^2*y(i)+2*sign(y(3*n+i)+v-v_m)*(mu_k+(mu_s-mu_k)*exp(-alpha*abs(y(3*n+i)+v-v_m)))*P*sin(i*pi*x_c);
ydot_3(i) =y(3*n+i);
ydot_4(i) =-2*xi*y(3*n+i)-y(2*n+i)-r_m*sign(y(3*n+i)+v-v_m)*(mu_k+(mu_s-mu_k)*exp(-alpha*abs(y(3*n+i)+v-v_m)))*P+a*w^2*sin(w*t);
%
% if i == 1
% fprintf(‘Time: %.4f, ydot_1: %.7fn, ydot_2: %.7fn, ydot_3: %.7fn, ydot_4: %.7fn ‘, t, ydot_1(i), ydot_2(i), ydot_3(i), ydot_4(i));
% end
end
ydot = [ydot_1; ydot_2; ydot_3; ydot_4];
endHello everyone,
I am trying to solve some differential equation in matlab using ode45. The equations are as shown below:
I have written the equations in state space form where ydot_1(i) is , ydot_2(i) is , ydot_3(i) is and ydot_4(i) is . In the equation of motion of x, eq(2), x terms are not in terms of “ i “ but I have written them like that (so ydot_3(i) is and ydot_4(i) is )b ecause of the loop that I use on the function below. So the “for” loop, for each time step, lets say starting at solves first the ydot terms for each mode for i = 1:n and then gets out of the loop, goes to the new time step and then solve again for each mode. However, since for each time step it will start from the first mode again, and ydot_1(i) and ydot_2(i) depend on ydot_3(i) and ydot_4(i) , then I am solving the equation of x, eq.2, for each mode. For the new time step, before starting with the first mode again I am defining the
ydot_1=y(1:n); %displacement beam
ydot_2=y(n+1:2*n); %velocity beam
ydot_3=y(2*n+1:3*n); %displacement mass
ydot_4=y(3*n+1:4*n); %velocity mass
v_m=0;
x_m=0;
x_c_prev = x_c_prev_modes{1};
so it can start with the data from the previous first mode (first mode of the previous time step). My problem is that when I solve for 1 mode only, so for n=1 and get the solution du_1= y(:,n+i).*sin(i*pi.* x_c_values_new); and then solve for n=2 but still get the solution du_1= y(:,n+i).*sin(i*pi.* x_c_values_new); for the first mode only, these first modes do not match. The solution have the same shape but differ in amplitude. The same happens with I use n=20, for example, but again plot only the first mode du_1. The solution changes from the first mode obtained when n=2 and from the first mode obtained for n=1. I have checked for days and cant see my mistake so have reached desperation. Would really appreciate your help! thank youuu!
clear all
clc
global xi xi_b r_w r_m mu_s mu_k v alpha P l a w l_0 n x_c_prev x_c_prev_modes
dt=0.01;
tspan = (0:dt:150).’;
% parameters
xi=0.14;
xi_b=0.0025;
r_w=4.5;
r_m=4.8;
mu_s=0.5;
mu_k=0.2 ;
alpha=300;
P=0.002;
l=1/75;
l_0=0.25;
a=0;
w=9;
v=0.005;
% Initialize y_c_prev and the array to store x_c values
x_c_prev = 0;
global t_values x_c_values; % Declare t_values and x_c_values as global
t_values = tspan; % Store time values
x_c_values = zeros(size(tspan)); % Initialize array to store x_c values
n=1;
y0 = zeros(4*n,1);
y0(3*n+1) = -v;
% Initialize y_c_prev
x_c_prev = 0;
% Define your initial value for x_c_prev
x_c_prev_initial = 0;
% Initialize x_c_prev_modes, assuming you have ‘n’ modes
x_c_prev_modes = cell(1, n);
% Initialize the first mode’s x_c_prev
x_c_prev_modes{1} = x_c_prev_initial;
[t,y] = ode45(‘rhs_cont4’,tspan,y0);
for i=1:1
u_1= y(:,i).*sin(i*pi.* x_c_values_new);
du_1= y(:,n+i).*sin(i*pi.* x_c_values_new);
end
figure
plot(t,du_1)
legend("beam vel mode 1")
function ydot=rhs_cont4(t,y)
global xi xi_b r_w r_m mu_s mu_k v alpha P a w l_0 n x_c_prev x_c_prev_modes
% ydot_1=y(1:n); %displacement beam
% ydot_2=y(n+1:2*n); %velocity beam
% ydot_3=y(2*n+1:3*n); %displacement mass
% ydot_4=y(3*n+1:4*n); %velocity mass
ydot_1=zeros(n,1); %displacement beam
ydot_2=zeros(n,1); %velocity beam
ydot_3=zeros(n,1); %displacement mass
ydot_4=zeros(n,1); %velocity mass%
v_m=0;
x_m=0;
x_c_prev = x_c_prev_modes{1};
% fprintf(‘x_c_prev %.7fn ‘, x_c_prev);
for i = 1:n
x_m=y(i)*sin(i*pi*x_c_prev)+x_m;
x_c=y(2*n+i)+v*t+l_0-x_m;
x_c_prev = x_c; % Update y_c_prev for the next iteration
x_c_prev_modes{i} = x_c_prev;
%Store y_c values at the corresponding time step
global t_values x_c_values; % Access global variables
[~, idx] = min(abs(t – t_values)); % Find the index of the closest time step
x_c_values(idx) = x_c; % Store y_c at the corresponding time step
v_m=y(n+i)*sin(i*pi*x_c)+v_m;
ydot_1(i) = y(n+i);
ydot_2(i) = -2*xi_b*r_w*y(n+i)-(r_w*i)^2*y(i)+2*sign(y(3*n+i)+v-v_m)*(mu_k+(mu_s-mu_k)*exp(-alpha*abs(y(3*n+i)+v-v_m)))*P*sin(i*pi*x_c);
ydot_3(i) =y(3*n+i);
ydot_4(i) =-2*xi*y(3*n+i)-y(2*n+i)-r_m*sign(y(3*n+i)+v-v_m)*(mu_k+(mu_s-mu_k)*exp(-alpha*abs(y(3*n+i)+v-v_m)))*P+a*w^2*sin(w*t);
%
% if i == 1
% fprintf(‘Time: %.4f, ydot_1: %.7fn, ydot_2: %.7fn, ydot_3: %.7fn, ydot_4: %.7fn ‘, t, ydot_1(i), ydot_2(i), ydot_3(i), ydot_4(i));
% end
end
ydot = [ydot_1; ydot_2; ydot_3; ydot_4];
end Hello everyone,
I am trying to solve some differential equation in matlab using ode45. The equations are as shown below:
I have written the equations in state space form where ydot_1(i) is , ydot_2(i) is , ydot_3(i) is and ydot_4(i) is . In the equation of motion of x, eq(2), x terms are not in terms of “ i “ but I have written them like that (so ydot_3(i) is and ydot_4(i) is )b ecause of the loop that I use on the function below. So the “for” loop, for each time step, lets say starting at solves first the ydot terms for each mode for i = 1:n and then gets out of the loop, goes to the new time step and then solve again for each mode. However, since for each time step it will start from the first mode again, and ydot_1(i) and ydot_2(i) depend on ydot_3(i) and ydot_4(i) , then I am solving the equation of x, eq.2, for each mode. For the new time step, before starting with the first mode again I am defining the
ydot_1=y(1:n); %displacement beam
ydot_2=y(n+1:2*n); %velocity beam
ydot_3=y(2*n+1:3*n); %displacement mass
ydot_4=y(3*n+1:4*n); %velocity mass
v_m=0;
x_m=0;
x_c_prev = x_c_prev_modes{1};
so it can start with the data from the previous first mode (first mode of the previous time step). My problem is that when I solve for 1 mode only, so for n=1 and get the solution du_1= y(:,n+i).*sin(i*pi.* x_c_values_new); and then solve for n=2 but still get the solution du_1= y(:,n+i).*sin(i*pi.* x_c_values_new); for the first mode only, these first modes do not match. The solution have the same shape but differ in amplitude. The same happens with I use n=20, for example, but again plot only the first mode du_1. The solution changes from the first mode obtained when n=2 and from the first mode obtained for n=1. I have checked for days and cant see my mistake so have reached desperation. Would really appreciate your help! thank youuu!
clear all
clc
global xi xi_b r_w r_m mu_s mu_k v alpha P l a w l_0 n x_c_prev x_c_prev_modes
dt=0.01;
tspan = (0:dt:150).’;
% parameters
xi=0.14;
xi_b=0.0025;
r_w=4.5;
r_m=4.8;
mu_s=0.5;
mu_k=0.2 ;
alpha=300;
P=0.002;
l=1/75;
l_0=0.25;
a=0;
w=9;
v=0.005;
% Initialize y_c_prev and the array to store x_c values
x_c_prev = 0;
global t_values x_c_values; % Declare t_values and x_c_values as global
t_values = tspan; % Store time values
x_c_values = zeros(size(tspan)); % Initialize array to store x_c values
n=1;
y0 = zeros(4*n,1);
y0(3*n+1) = -v;
% Initialize y_c_prev
x_c_prev = 0;
% Define your initial value for x_c_prev
x_c_prev_initial = 0;
% Initialize x_c_prev_modes, assuming you have ‘n’ modes
x_c_prev_modes = cell(1, n);
% Initialize the first mode’s x_c_prev
x_c_prev_modes{1} = x_c_prev_initial;
[t,y] = ode45(‘rhs_cont4’,tspan,y0);
for i=1:1
u_1= y(:,i).*sin(i*pi.* x_c_values_new);
du_1= y(:,n+i).*sin(i*pi.* x_c_values_new);
end
figure
plot(t,du_1)
legend("beam vel mode 1")
function ydot=rhs_cont4(t,y)
global xi xi_b r_w r_m mu_s mu_k v alpha P a w l_0 n x_c_prev x_c_prev_modes
% ydot_1=y(1:n); %displacement beam
% ydot_2=y(n+1:2*n); %velocity beam
% ydot_3=y(2*n+1:3*n); %displacement mass
% ydot_4=y(3*n+1:4*n); %velocity mass
ydot_1=zeros(n,1); %displacement beam
ydot_2=zeros(n,1); %velocity beam
ydot_3=zeros(n,1); %displacement mass
ydot_4=zeros(n,1); %velocity mass%
v_m=0;
x_m=0;
x_c_prev = x_c_prev_modes{1};
% fprintf(‘x_c_prev %.7fn ‘, x_c_prev);
for i = 1:n
x_m=y(i)*sin(i*pi*x_c_prev)+x_m;
x_c=y(2*n+i)+v*t+l_0-x_m;
x_c_prev = x_c; % Update y_c_prev for the next iteration
x_c_prev_modes{i} = x_c_prev;
%Store y_c values at the corresponding time step
global t_values x_c_values; % Access global variables
[~, idx] = min(abs(t – t_values)); % Find the index of the closest time step
x_c_values(idx) = x_c; % Store y_c at the corresponding time step
v_m=y(n+i)*sin(i*pi*x_c)+v_m;
ydot_1(i) = y(n+i);
ydot_2(i) = -2*xi_b*r_w*y(n+i)-(r_w*i)^2*y(i)+2*sign(y(3*n+i)+v-v_m)*(mu_k+(mu_s-mu_k)*exp(-alpha*abs(y(3*n+i)+v-v_m)))*P*sin(i*pi*x_c);
ydot_3(i) =y(3*n+i);
ydot_4(i) =-2*xi*y(3*n+i)-y(2*n+i)-r_m*sign(y(3*n+i)+v-v_m)*(mu_k+(mu_s-mu_k)*exp(-alpha*abs(y(3*n+i)+v-v_m)))*P+a*w^2*sin(w*t);
%
% if i == 1
% fprintf(‘Time: %.4f, ydot_1: %.7fn, ydot_2: %.7fn, ydot_3: %.7fn, ydot_4: %.7fn ‘, t, ydot_1(i), ydot_2(i), ydot_3(i), ydot_4(i));
% end
end
ydot = [ydot_1; ydot_2; ydot_3; ydot_4];
end ode45, differential equations MATLAB Answers — New Questions
How can i make optimization of nonlinear spring
How can i make optimization of nonlinear spring ?How can i make optimization of nonlinear spring ? How can i make optimization of nonlinear spring ? optimization, synthesis MATLAB Answers — New Questions
Power Query Data Sources Cannot Be Refreshed in Excel for the Web
I am trying to build an Excel report that uses power query to connect to Sharepoint lists. The workbook is also stored on the same SharePoint site. I have the required permissions.
When viewing the report in Excel for the web, I receive this message when clicking Data/Refresh All, I receive this message:
COULDN’T REFRESH DATA This workbook contains Power Query queries using data sources that can’t be refreshed in Excel for the Web.
Originally, I loaded the query to the Data Model only. Still could not refresh in Excel for the web.
Changed the query to load to a pivot table report – same error message.
Is there any way to refresh power queries connected to a SharePoint list?
I am trying to build an Excel report that uses power query to connect to Sharepoint lists. The workbook is also stored on the same SharePoint site. I have the required permissions.When viewing the report in Excel for the web, I receive this message when clicking Data/Refresh All, I receive this message:COULDN’T REFRESH DATA This workbook contains Power Query queries using data sources that can’t be refreshed in Excel for the Web.Originally, I loaded the query to the Data Model only. Still could not refresh in Excel for the web.Changed the query to load to a pivot table report – same error message. Is there any way to refresh power queries connected to a SharePoint list? Read More
New Outlook: Plain Text Until Proven Innocent?
I used to turn off Rich Format emails and just view them plain text in old Outlook; but I have been forced to upgrade to new Outlook and I do not see the option listed anymore.
Where has it been moved? Also, is there a way to turn it on network wide?
Also, how stupid and irresponsible is it of Microsoft to bury a setting like that when so many people’s jobs rely on the computer systems of their livelyhood not being encrypted by malware?
It makes me feel like Microsoft is trying to rid the world of additional companies.
I used to turn off Rich Format emails and just view them plain text in old Outlook; but I have been forced to upgrade to new Outlook and I do not see the option listed anymore.Where has it been moved? Also, is there a way to turn it on network wide?Also, how stupid and irresponsible is it of Microsoft to bury a setting like that when so many people’s jobs rely on the computer systems of their livelyhood not being encrypted by malware?It makes me feel like Microsoft is trying to rid the world of additional companies. Read More
MS Access Report with tab characters in content cannot be exported as PDF/A file
PDF files are created without problems if the PDF/A-compatible option is not activated. The problem is reproducible with VBA code (Error 2501) and manually with export as PDF or XPS from the menu (see below).
If I remove all tab stops from the text content of the report pages, I can save the PDF file even if the PDF/A-compatible option is set (e.g. via HKCUSoftwareMicrosoftOffice16.0CommonFixedFormatLastISO19005-1 = 1 or AD Office 365 Group Policy).
I made a small Access DB with the string “ABC DEF” (whitespace is a tab) in Table1, which is displayed in Report1.
In my environments Win 11, Win 10, and Win 2022 Datacenter with Locale de-DE it reproduces this bug in 32-bit and 64-Bit Versions of Access 365 MSO Version 2406.
I’ve reported this problem to the german Microsoft Support (TrackingID#2407051410001308), but they couldn’t reproduce it. They recomeded to report instead to the Windows Feedback-Hub, but this software seem to send my reports to /dev/null. I can post, but the posts never show up.
Any ideas?
PDF files are created without problems if the PDF/A-compatible option is not activated. The problem is reproducible with VBA code (Error 2501) and manually with export as PDF or XPS from the menu (see below). If I remove all tab stops from the text content of the report pages, I can save the PDF file even if the PDF/A-compatible option is set (e.g. via HKCUSoftwareMicrosoftOffice16.0CommonFixedFormatLastISO19005-1 = 1 or AD Office 365 Group Policy). I made a small Access DB with the string “ABC DEF” (whitespace is a tab) in Table1, which is displayed in Report1.Export via “PDF or XPS” with PDF/A-compliant option setIn my environments Win 11, Win 10, and Win 2022 Datacenter with Locale de-DE it reproduces this bug in 32-bit and 64-Bit Versions of Access 365 MSO Version 2406.After print dialog finishes normaly, but before file is created, this error message shows.I’ve reported this problem to the german Microsoft Support (TrackingID#2407051410001308), but they couldn’t reproduce it. They recomeded to report instead to the Windows Feedback-Hub, but this software seem to send my reports to /dev/null. I can post, but the posts never show up.Any ideas? Read More
Macro to copy rows to sheet2 based on value in row
Hello,
Hoping someone can help with a formula or macro to copy data in rows to sheet2 based on the value in the row (column F). Column F does not need to come over to sheet 2 but the other column headings should. Using the example below, row 2 would duplicate 17 times and row 3, 106 times.
I am using Excel365
Thanks in advance!
Ryan
Hello, Hoping someone can help with a formula or macro to copy data in rows to sheet2 based on the value in the row (column F). Column F does not need to come over to sheet 2 but the other column headings should. Using the example below, row 2 would duplicate 17 times and row 3, 106 times.I am using Excel365 Thanks in advance!Ryan Read More
Macro or formula to analyze data in a range for similar data in another range
Hi,
I’m not even sure if this is possible but I’m hoping to find a way to have excel make a best guess and return the value in a dataset. Using the example below Excel would read the values in column D and enter the closest match from column F next to it in column E. So FACBK*3VCAQ3YFL2 would result “Facebook” in cell E2. I’m not looking for perfection, just a head start.
Thank you in advance!
Ryan
Hi,I’m not even sure if this is possible but I’m hoping to find a way to have excel make a best guess and return the value in a dataset. Using the example below Excel would read the values in column D and enter the closest match from column F next to it in column E. So FACBK*3VCAQ3YFL2 would result “Facebook” in cell E2. I’m not looking for perfection, just a head start. Thank you in advance!Ryan Read More