Category: News
Is there a way in Simulink/System Composer to override the drag and drop event?
I wish to drag a block from a different application and drop it into simulink/System Composer. Upon dropping the block, Simulink should call a pre-defined Matlab function.
Is this kind of drop-handler customization possible?I wish to drag a block from a different application and drop it into simulink/System Composer. Upon dropping the block, Simulink should call a pre-defined Matlab function.
Is this kind of drop-handler customization possible? I wish to drag a block from a different application and drop it into simulink/System Composer. Upon dropping the block, Simulink should call a pre-defined Matlab function.
Is this kind of drop-handler customization possible? customization, simulink, systemcomposer, ui MATLAB Answers — New Questions
Updating the User Password and Authentication Report
Change to Beta Graph API Requires Update to User Password and Authentication Report Script
Last year, I wrote about how to exploit the newly-added Graph API to report the per-user MFA state for Entra ID accounts. As with all additions to the Graph, the new API used the beta endpoint, which is where APIs function when Microsoft is happy to expose the API in public while still knowing that some work is needed before the API can advance to the production (V1.0) endpoint.
Recently, a reader posted a comment about the article and said that when they ran the script in their tenant, no data showed up in the “Default MFA method” column in the report. I write scripts to illustrate principals and explore what’s possible rather than attempting to create production-ready code. In addition, it’s impossible for me to see what’s happening in another tenant, unless the tenant administrator gives me the necessary account with permissions, and that shouldn’t happen. My default response is therefore to ask people who report issues to do some basic PowerShell debugging by selecting the code where the problem seems to lie and running the commands to see what happens. Besides, I was on vacation, so I didn’t want to spend any time looking into what the issue might be.
Searching for the Problem
To cut a long story short, the person who reported the problem responded with sufficient data to indicate that an issue was present. After returning from vacation, it was time to open Visual Studio Code (and GitHub Copilot) and try to figure out what was happening.
The code looked good, and nothing seemed out of the ordinary. The script used Graph requests rather than cmdlets from the Microsoft Graph PowerShell SDK, but that’s a normal state with newly-released beta APIs because the AutoRest tool that generates SDK cmdlets from the API metadata hasn’t yet included the cmdlets in an SDK release. To make the code easier to read, I replaced a couple of API requests with SDK cmdlets and then noticed that the output from the Get-MgBetaUserAuthenticationRequirement cmdlet no longer contained details of a user’s default MFA method. This was the cause of the problem.
The Downside of Beta Graph APIs
Using beta APIs (or beta cmdlets) is a double-edged sword. The positive is access to functionality sooner than waiting for Microsoft to upgrade an API to a production release. Some APIs stay in the beta endpoint for years, and you can’t predict when Microsoft might consider an API to be reliable, robust, and performant enough to justify promotion from beta to production.
The downside is that beta features are prone to change based on developer and customer feedback, the need to accommodate changes elsewhere in the underlying workload, or as the side effects of bug fixing or tuning for performance. I have no idea why Microsoft removed the default MFA method output from the data reported by the cmdlet. Maybe it was because the UserPreferredMethodForSecondaryAuthentication property contains similar information.
A New User Password and Authentication Report Script
In any case, my script can only report what’s available, so I updated the code to remove the obsolete column and renamed the UserPreferredMethodForSecondaryAuthentication column to be “Preferred MFA method” (Figure 1). The change seemed to make sense at the time. If you disagree, feel free to create a GitHub push request to update the script. I’m happy to review any and all suggestions.

Don’t Depend on Beta Graph APIs
All of this goes to show that developers who rely on beta Graph APIs need to keep a wary eye out for changes that might impact their code. The change can happen at any time and probably won’t be flagged by Microsoft because it is, after all, a change to a beta API that’s expressly not intended for production use. I should learn my lesson (some day). In the meantime, enjoy the updated user password and authentication report script and all the other examples in the Office365itpros GitHub repository. I’m sure there’s a few more bugs lurking there that I need to attend to.
Need some assistance to write and manage PowerShell scripts for Microsoft 365, including Azure Automation runbooks? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle.
simulink matlab function dimension error
In my first Matlab function, I set the input to a 4×1 vector, a feedback vector, and a scalar, but the output is a scalar. Please tell me how to make the output a 4×1 vector. I have attached my simulink fileIn my first Matlab function, I set the input to a 4×1 vector, a feedback vector, and a scalar, but the output is a scalar. Please tell me how to make the output a 4×1 vector. I have attached my simulink file In my first Matlab function, I set the input to a 4×1 vector, a feedback vector, and a scalar, but the output is a scalar. Please tell me how to make the output a 4×1 vector. I have attached my simulink file simulink MATLAB Answers — New Questions
Help me understand this PQ Controller Model (ABC to dq-reference using Park Transform) in Simulink
Good day! I’m currently having troubles interpreting this block diagram of a PQ controller, which I will be applying for BESS support in a bus network.
Right now, I’m figuring out how I should implement the Park Transform block to convert from ABC to dq reference in Simulink. I’m also confused when I should implement the transfer functions and PI controllers (considering the dq-reference).
If any further context is needed, I will try my best to provide more.
Also, if you are an expert in control modeling, especially in BESS, I would love to keep in contact with you for more help, as I have more questions with regards to my BESS model for voltage and frequency support.
Thank you very much!Good day! I’m currently having troubles interpreting this block diagram of a PQ controller, which I will be applying for BESS support in a bus network.
Right now, I’m figuring out how I should implement the Park Transform block to convert from ABC to dq reference in Simulink. I’m also confused when I should implement the transfer functions and PI controllers (considering the dq-reference).
If any further context is needed, I will try my best to provide more.
Also, if you are an expert in control modeling, especially in BESS, I would love to keep in contact with you for more help, as I have more questions with regards to my BESS model for voltage and frequency support.
Thank you very much! Good day! I’m currently having troubles interpreting this block diagram of a PQ controller, which I will be applying for BESS support in a bus network.
Right now, I’m figuring out how I should implement the Park Transform block to convert from ABC to dq reference in Simulink. I’m also confused when I should implement the transfer functions and PI controllers (considering the dq-reference).
If any further context is needed, I will try my best to provide more.
Also, if you are an expert in control modeling, especially in BESS, I would love to keep in contact with you for more help, as I have more questions with regards to my BESS model for voltage and frequency support.
Thank you very much! simulink, control, transfer function MATLAB Answers — New Questions
Unable to use structName.?ClassName for VideoWriter class
I am finding the structName.?ClassName method of arguments validation does not work when trying to validate name-value arguments for the VideoWriter class.
I have a short function:
function myDemo(videoData,fileName,vwOpts)
arguments
videoData
fileName
vwOpts.?VideoWriter
end
disp(vwOpts);
videoObj = VideoWriter(fileName);
% Open video, write, close, etc.
end % MakeVideo
I would expect that calling this function with VideoWriter properties such as FrameRate would result in vwOpts being a struct that contains values passed to the function. However, I am getting the error:
>> myDemo(0:10,"myVideo.avi","FrameRate",20)
Error using myDemo
Too many input arguments.
I validated my approach by attempting to filter for arguments to the Bar() function by mimicking the matlab.graphics.chart.primitive.Bar example shown in the documentation and was successful.
I noticed I get this same error when failing to specify the full name of the Bar class, so looked for other methods of specifying the VideoWriter class, using matlab.audiovideo.VideoWriter as the full class name, with no success.
What am I missing about this approach? Is there a way of locating the full name of the VideoWriter class, or is there some reason I should not expect this example to work?
Thanks!I am finding the structName.?ClassName method of arguments validation does not work when trying to validate name-value arguments for the VideoWriter class.
I have a short function:
function myDemo(videoData,fileName,vwOpts)
arguments
videoData
fileName
vwOpts.?VideoWriter
end
disp(vwOpts);
videoObj = VideoWriter(fileName);
% Open video, write, close, etc.
end % MakeVideo
I would expect that calling this function with VideoWriter properties such as FrameRate would result in vwOpts being a struct that contains values passed to the function. However, I am getting the error:
>> myDemo(0:10,"myVideo.avi","FrameRate",20)
Error using myDemo
Too many input arguments.
I validated my approach by attempting to filter for arguments to the Bar() function by mimicking the matlab.graphics.chart.primitive.Bar example shown in the documentation and was successful.
I noticed I get this same error when failing to specify the full name of the Bar class, so looked for other methods of specifying the VideoWriter class, using matlab.audiovideo.VideoWriter as the full class name, with no success.
What am I missing about this approach? Is there a way of locating the full name of the VideoWriter class, or is there some reason I should not expect this example to work?
Thanks! I am finding the structName.?ClassName method of arguments validation does not work when trying to validate name-value arguments for the VideoWriter class.
I have a short function:
function myDemo(videoData,fileName,vwOpts)
arguments
videoData
fileName
vwOpts.?VideoWriter
end
disp(vwOpts);
videoObj = VideoWriter(fileName);
% Open video, write, close, etc.
end % MakeVideo
I would expect that calling this function with VideoWriter properties such as FrameRate would result in vwOpts being a struct that contains values passed to the function. However, I am getting the error:
>> myDemo(0:10,"myVideo.avi","FrameRate",20)
Error using myDemo
Too many input arguments.
I validated my approach by attempting to filter for arguments to the Bar() function by mimicking the matlab.graphics.chart.primitive.Bar example shown in the documentation and was successful.
I noticed I get this same error when failing to specify the full name of the Bar class, so looked for other methods of specifying the VideoWriter class, using matlab.audiovideo.VideoWriter as the full class name, with no success.
What am I missing about this approach? Is there a way of locating the full name of the VideoWriter class, or is there some reason I should not expect this example to work?
Thanks! arguments validation MATLAB Answers — New Questions
using standalone app designer how to print figure using pushbutton ,thanks .
using standalone app designer need to using pushbutton to print figures.using standalone app designer need to using pushbutton to print figures. using standalone app designer need to using pushbutton to print figures. app designer, print figure of standalone app designer using push MATLAB Answers — New Questions
Automating Microsoft 365 with PowerShell October 2025 Update
Version 16 of Automating Microsoft 365 with PowerShell Available for Download

The Office 365 for IT Pros team is proud to announce the October 2025 update for the Automating Microsoft 365 with PowerShell eBook. The book is available separately and as part of the Office 365 for IT Pros eBook bundle. Current subscribers can download the latest files from their Gumroad.com account. See our FAQ for more information about how to download the updated EPUB and PDF files.
The October 2025 update for Office 365 for IT Pros is under development and should be available for download on October 1, 2025. Subscribers can check their account then or wait until they see the update notification posted here.
Current Files are Version 16.2
At the time of writing, the current files are labelled version 16.3 and dated 22 September 2025. I originally created version 16.0 to use as the basis for the paperback version so that I could get some printed copies to take with me to The Experts Conference (TEC) in Minneapolis (September 30-October 1). TEC features a PowerShell script-off where conference participants sign up to compete against others to solve common Microsoft 365 administrative problems, and I wanted printed copies to give to the script-off competitors.
Alas, the best laid plans sometimes come a cropper, and I found changes that I wanted to get into this month’s update not once but twice, which resulted in the 16.1, 16,2, and 16.3 versions. However, the delay involved in print on demand means that the books that will show up at TEC are version 16.0. When you get used to being able to update and publish a book update electronically, reverting to waiting for printing presses to run seems very antiquated, even in a print on demand scenario. Tant pis, or so the French might say.
Exchange SE for Administrators
In other news, Scott Schnoll, who left Microsoft earlier this year, has published The Admin’s Guide to Microsoft Exchange Server Subscription Edition. The book is available from Amazon.com (paperback and Kindle) for a whopping list price of $119.99 (currently available at a discounted $90.07 for the paperback and $99.99 for Kindle) and promises “never before heard details on the development of Exchange Server Subscription Edition.”
There’s no doubt that some confusion exists around Exchange SE, especially in terms of licensing (this FAQ helps), but that’s probably a symptom of the move to subscriptions. To facilitate the changeover, Microsoft made sure that 99.99% of the technical detail for Exchange SE is the same as for Exchange 2019. This position will change as Microsoft adds new functionality to Exchange SE over time.
Whether a new book about existing technology with a high price point will succeed remains to be seen. Amazon takes a large chunk (up to 70%) of the price paid by buyers and that might have dictated the price for a book that targets a declining (but still important) market.
The nice thing about writing about on-premises server products is that authors don’t have to cope with the rapid pace of change experienced in the cloud. However, the details and features of Exchange SE will diverge from Exchange 2019 from this point, so change will come. That change probably won’t be unduly dramatic and Exchange SE will not become like Exchange Online, so the work to keep the book updated shouldn’t be too onerous.
For any self-published book about technology, I recommend using a site like gumroad.com (which we use for Office 365 for IT Pros) or leanpub.com (home of Paul Thurrott’s Windows 11 Field Guide and other great books). Both sites offer authors more revenue for book sales and better control over changes, which is always nice. On the other hand, Amazon offers a decent on-demand paperback printing service that we use for the paperback version of the Automating Microsoft 365 with PowerShell book. You pay your money and make your choice…
On to Version 17
We continue to develop content for Automating Microsoft 365 with PowerShell based on changes and updates to PowerShell modules. I can’t predict what the next month will bring. I can only say that things will happen that will turn up in version 17.
ilaplace doesn’t handle tanh()
While doing convolutions, I wanted to convolve a function f() with a square wave. There are two Laplace transformations of a square wave that I tried, as shown below. The problem occurs when I do the inverse Laplace on the Laplace of the original square wave, or more precisely when I attempt to plot that result. (In the code below I only show the inverse laplace of the laplace transformed squarewave, not the convolution.)
% P1 = ilaplace( 1/s*(1-2/(exp(T/2*s)+1)) );
P2 = ilaplace( 1/s*tanh(s*T/4) );
% Unfortunately, both don’t work with the symbolic toolbox.
assume(P2,’real’)
Tsteps = 0.1:0.5:20;
num = vpa(subs(P2,t,Tsteps),6)’;
stairs(Tsteps(:),num(:,1))
When I inspect the contents of num, the (voluminous!) contents are largely symbolic:
[conj(subs(diff(floor(s), s), s, -400))*(35.334851093590259552001953125 + 0.00000000023283064365386962890625i) + conj(s …
My program works with ‘simpler’ functions, like sinewaves, and then plots OK.
The stairs function faults in the (undocumented) getRealData().
Do I have to assume() something on the arguments of laplace(), ilaplace(), subs() or vpa()?
% getRealData returns the real components of ARGS. If ARGS contains any
% complex data, a warning is displayed. If any of ARGS are not numeric
% and cannot be converted to a double, an error is thrown.While doing convolutions, I wanted to convolve a function f() with a square wave. There are two Laplace transformations of a square wave that I tried, as shown below. The problem occurs when I do the inverse Laplace on the Laplace of the original square wave, or more precisely when I attempt to plot that result. (In the code below I only show the inverse laplace of the laplace transformed squarewave, not the convolution.)
% P1 = ilaplace( 1/s*(1-2/(exp(T/2*s)+1)) );
P2 = ilaplace( 1/s*tanh(s*T/4) );
% Unfortunately, both don’t work with the symbolic toolbox.
assume(P2,’real’)
Tsteps = 0.1:0.5:20;
num = vpa(subs(P2,t,Tsteps),6)’;
stairs(Tsteps(:),num(:,1))
When I inspect the contents of num, the (voluminous!) contents are largely symbolic:
[conj(subs(diff(floor(s), s), s, -400))*(35.334851093590259552001953125 + 0.00000000023283064365386962890625i) + conj(s …
My program works with ‘simpler’ functions, like sinewaves, and then plots OK.
The stairs function faults in the (undocumented) getRealData().
Do I have to assume() something on the arguments of laplace(), ilaplace(), subs() or vpa()?
% getRealData returns the real components of ARGS. If ARGS contains any
% complex data, a warning is displayed. If any of ARGS are not numeric
% and cannot be converted to a double, an error is thrown. While doing convolutions, I wanted to convolve a function f() with a square wave. There are two Laplace transformations of a square wave that I tried, as shown below. The problem occurs when I do the inverse Laplace on the Laplace of the original square wave, or more precisely when I attempt to plot that result. (In the code below I only show the inverse laplace of the laplace transformed squarewave, not the convolution.)
% P1 = ilaplace( 1/s*(1-2/(exp(T/2*s)+1)) );
P2 = ilaplace( 1/s*tanh(s*T/4) );
% Unfortunately, both don’t work with the symbolic toolbox.
assume(P2,’real’)
Tsteps = 0.1:0.5:20;
num = vpa(subs(P2,t,Tsteps),6)’;
stairs(Tsteps(:),num(:,1))
When I inspect the contents of num, the (voluminous!) contents are largely symbolic:
[conj(subs(diff(floor(s), s), s, -400))*(35.334851093590259552001953125 + 0.00000000023283064365386962890625i) + conj(s …
My program works with ‘simpler’ functions, like sinewaves, and then plots OK.
The stairs function faults in the (undocumented) getRealData().
Do I have to assume() something on the arguments of laplace(), ilaplace(), subs() or vpa()?
% getRealData returns the real components of ARGS. If ARGS contains any
% complex data, a warning is displayed. If any of ARGS are not numeric
% and cannot be converted to a double, an error is thrown. laplace, inverse laplace, symbolic, plot MATLAB Answers — New Questions
How can I insert breakpoints and implement debug step-by-step execution when running the FFE class functions in Serdes Designer Tools?
CEI-224G-MR Transmitter/Receiver IBIS-AMI Model – MATLAB & Simulink
How can I insert breakpoints and implement debug step-by-step execution when running the FFE class functions in Serdes Designer Tools? In the CEI-224G-MR Transmitter/Receiver IBIS-AMI Model example provided by MATLAB, I want to step through the stepImpl function in FFE to learn the specific calculation process within the function.
Step 1: Added print statements and inserted breakpoints in the stepImpl function.
Step 2: Clicked the run button in the Simulink menu bar to start simulation.
Step 3: The ‘stepImpl stop’ print information can be seen in Simulink’s Diagnostic Viewer, indicating that the program has executed into the stepImpl function. However, the program does not pause here and eventually completes running.
How can I make the program pause at the stepImpl function of FFE for debug debugging?CEI-224G-MR Transmitter/Receiver IBIS-AMI Model – MATLAB & Simulink
How can I insert breakpoints and implement debug step-by-step execution when running the FFE class functions in Serdes Designer Tools? In the CEI-224G-MR Transmitter/Receiver IBIS-AMI Model example provided by MATLAB, I want to step through the stepImpl function in FFE to learn the specific calculation process within the function.
Step 1: Added print statements and inserted breakpoints in the stepImpl function.
Step 2: Clicked the run button in the Simulink menu bar to start simulation.
Step 3: The ‘stepImpl stop’ print information can be seen in Simulink’s Diagnostic Viewer, indicating that the program has executed into the stepImpl function. However, the program does not pause here and eventually completes running.
How can I make the program pause at the stepImpl function of FFE for debug debugging? CEI-224G-MR Transmitter/Receiver IBIS-AMI Model – MATLAB & Simulink
How can I insert breakpoints and implement debug step-by-step execution when running the FFE class functions in Serdes Designer Tools? In the CEI-224G-MR Transmitter/Receiver IBIS-AMI Model example provided by MATLAB, I want to step through the stepImpl function in FFE to learn the specific calculation process within the function.
Step 1: Added print statements and inserted breakpoints in the stepImpl function.
Step 2: Clicked the run button in the Simulink menu bar to start simulation.
Step 3: The ‘stepImpl stop’ print information can be seen in Simulink’s Diagnostic Viewer, indicating that the program has executed into the stepImpl function. However, the program does not pause here and eventually completes running.
How can I make the program pause at the stepImpl function of FFE for debug debugging? serdes, ffe, debug, 224g, 112g, breakpoint, stepimpl, classdef MATLAB Answers — New Questions
Plotting sum of two vectors
I’m using Runge-Kutta method to solve a coupled system of EDO.
The function y1 is valid until a certain time (here is the "ts2" parameter). After this time, y8 is valid.
I want to plot y1 from 0 to ts2 (which happens without problem) and y8 from ts2 until the end.
But, I get the error "Arrays have incompatible sizes for this operation." during the second part.
%Parameters
or =0.2;
oc = 0.2;
gamma = 0.01;
gam=0.01;
Gamma = 1;
Gamma1 = Gamma;
Gamma2 = Gamma;
Gamma3 = 9/10;
Gamma5 = 1/10;
sig13ts2 = 5.2;
sig57ts = 2.6;
ts2=10;
f1 = @(t,y1,y2) (-Gamma/2-gam/2)*y1 -i*or*y2;
f2 = @(t,y1,y2) -i*or*y1+(-gam/2)*y2;
h=0.0001;
t(1) = 0;
y1(1) = 0;
y2(1) = sig57ts;
for j=1:1100000
t(j+1)=t(j)+h;
k1y1 = h*f1(t(j), y1(j), y2(j));
k1y2 = h*f2(t(j), y1(j), y2(j));
k2y1 = h*f1(t(j)+h/2,y1(j)+k1y1/2,y2(j)+k1y2/2);
k2y2 = h*f2(t(j)+h/2,y1(j)+k1y1/2,y2(j)+k1y2/2);
k3y1 = h*f1(t(j)+h/2,y1(j)+k2y1/2,y2(j)+k2y2/2);
k3y2 = h*f2(t(j)+h/2,y1(j)+k2y1/2,y2(j)+k2y2/2);
k4y1 = h*f1(t(j)+h, y1(j)+k3y1, y2(j)+k3y2);
k4y2 = h*f2(t(j)+h, y1(j)+k3y1, y2(j)+k3y2);
y1(j+1)=y1(j) + (k1y1 + 2*k2y1 + 2*k3y1 + k4y1)/6;
y2(j+1)=y2(j) + (k1y2 + 2*k2y2 + 2*k3y2 + k4y2)/6;
end
plot(t(1:ts2/h),abs(y1(1:ts2/h)).^2)
xlim([0 60])
hold on
%% Ligando C apos ts2
f3 = @(t,y3,y4,y5,y6,y7,y8) -(+Gamma2/2+gam/2)*y3+1i*oc*y4-1i*oc*y5;
f4 = @(t,y3,y4,y5,y6,y7,y8) 1i*oc*y3-(+gamma/2)*y4+Gamma3*y5-1i*oc*y6;
f5 = @(t,y3,y4,y5,y6,y7,y8) -1i*oc*y3-(Gamma1)*y5+1i*oc*y6;
f6 = @(t,y3,y4,y5,y6,y7,y8) -1i*oc*y4+1i*oc*y5+(-Gamma1/2-gamma/2)*y6;
f7 = @(t,y3,y4,y5,y6,y7,y8) -1i*or*y8+(-Gamma2/2-gam/2)*y7;
f8 = @(t,y3,y4,y5,y6,y7,y8) -1i*or*y7+Gamma5*y5-(gam/2)*y8;
t(1) = ts2;
y3(1) = 0;
y4(1) = sig13ts2;
y5(1) = 0;
y6(1) = 0;
y7(1) = y1(ts2/h);
y8(1) = y2(ts2/h);
for j=1:1000000
t(j+1)=t(j)+h;
k1y3 = h*f3(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y4 = h*f4(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y5 = h*f5(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y6 = h*f6(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y7 = h*f7(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y8 = h*f8(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k2y3 = h*f3(t(j)+h/2,y3(j)+k1y3/2,y4(j)+k1y4/2,y5(j)+k1y5/2,y6(j)+k1y6/2,y7(j)++k1y7/2,y8(j)+k1y8/2);
k2y4 = h*f4(t(j)+h/2,y3(j)+k1y3/2,y4(j)+k1y4/2,y5(j)+k1y5/2,y6(j)+k1y6/2,y7(j)++k1y7/2,y8(j)+k1y8/2);
k2y5 = h*f5(t(j)+h/2,y3(j)+k1y3/2,y4(j)+k1y4/2,y5(j)+k1y5/2,y6(j)+k1y6/2,y7(j)++k1y7/2,y8(j)+k1y8/2);
k2y6 = h*f6(t(j)+h/2,y3(j)+k1y3/2,y4(j)+k1y4/2,y5(j)+k1y5/2,y6(j)+k1y6/2,y7(j)++k1y7/2,y8(j)+k1y8/2);
k2y7 = h*f7(t(j)+h/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3y8);
k4y6 = h*f6(t(j)+h, y3(j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
k4y7 = h*f7(t(j)+h, y3(j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
k4y8 = h*f8(t(j)+h, y3(j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
y3(j+1)=y3(j) + (k1y3 + 2*k2y3 + 2*k3y3 + k4y3)/6;
y4(j+1)=y4(j) + (k1y4 + 2*k2y4 + 2*k3y4 + k4y4)/6;
y5(j+1)=y5(j) + (k1y5 + 2*k2y5 + 2*k3y5 + k4y5)/6;
y6(j+1)=y6(j) + (k1y6 + 2*k2y6 + 2*k3y6 + k4y6)/6;
y7(j+1)=y7(j) + (k1y7 + 2*k2y7 + 2*k3y7 + k4y7)/6;
y8(j+1)=y8(j) + (k1y8 + 2*k2y8 + 2*k3y8 + k4y8)/6;
end
plot(t,abs(y8).^2+abs(y1(ts2/h:end)).^2)I’m using Runge-Kutta method to solve a coupled system of EDO.
The function y1 is valid until a certain time (here is the "ts2" parameter). After this time, y8 is valid.
I want to plot y1 from 0 to ts2 (which happens without problem) and y8 from ts2 until the end.
But, I get the error "Arrays have incompatible sizes for this operation." during the second part.
%Parameters
or =0.2;
oc = 0.2;
gamma = 0.01;
gam=0.01;
Gamma = 1;
Gamma1 = Gamma;
Gamma2 = Gamma;
Gamma3 = 9/10;
Gamma5 = 1/10;
sig13ts2 = 5.2;
sig57ts = 2.6;
ts2=10;
f1 = @(t,y1,y2) (-Gamma/2-gam/2)*y1 -i*or*y2;
f2 = @(t,y1,y2) -i*or*y1+(-gam/2)*y2;
h=0.0001;
t(1) = 0;
y1(1) = 0;
y2(1) = sig57ts;
for j=1:1100000
t(j+1)=t(j)+h;
k1y1 = h*f1(t(j), y1(j), y2(j));
k1y2 = h*f2(t(j), y1(j), y2(j));
k2y1 = h*f1(t(j)+h/2,y1(j)+k1y1/2,y2(j)+k1y2/2);
k2y2 = h*f2(t(j)+h/2,y1(j)+k1y1/2,y2(j)+k1y2/2);
k3y1 = h*f1(t(j)+h/2,y1(j)+k2y1/2,y2(j)+k2y2/2);
k3y2 = h*f2(t(j)+h/2,y1(j)+k2y1/2,y2(j)+k2y2/2);
k4y1 = h*f1(t(j)+h, y1(j)+k3y1, y2(j)+k3y2);
k4y2 = h*f2(t(j)+h, y1(j)+k3y1, y2(j)+k3y2);
y1(j+1)=y1(j) + (k1y1 + 2*k2y1 + 2*k3y1 + k4y1)/6;
y2(j+1)=y2(j) + (k1y2 + 2*k2y2 + 2*k3y2 + k4y2)/6;
end
plot(t(1:ts2/h),abs(y1(1:ts2/h)).^2)
xlim([0 60])
hold on
%% Ligando C apos ts2
f3 = @(t,y3,y4,y5,y6,y7,y8) -(+Gamma2/2+gam/2)*y3+1i*oc*y4-1i*oc*y5;
f4 = @(t,y3,y4,y5,y6,y7,y8) 1i*oc*y3-(+gamma/2)*y4+Gamma3*y5-1i*oc*y6;
f5 = @(t,y3,y4,y5,y6,y7,y8) -1i*oc*y3-(Gamma1)*y5+1i*oc*y6;
f6 = @(t,y3,y4,y5,y6,y7,y8) -1i*oc*y4+1i*oc*y5+(-Gamma1/2-gamma/2)*y6;
f7 = @(t,y3,y4,y5,y6,y7,y8) -1i*or*y8+(-Gamma2/2-gam/2)*y7;
f8 = @(t,y3,y4,y5,y6,y7,y8) -1i*or*y7+Gamma5*y5-(gam/2)*y8;
t(1) = ts2;
y3(1) = 0;
y4(1) = sig13ts2;
y5(1) = 0;
y6(1) = 0;
y7(1) = y1(ts2/h);
y8(1) = y2(ts2/h);
for j=1:1000000
t(j+1)=t(j)+h;
k1y3 = h*f3(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y4 = h*f4(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y5 = h*f5(t(j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6 + k4y6)/6;
y7(j+1)=y7(j) + (k1y7 + 2*k2y7 + 2*k3y7 + k4y7)/6;
y8(j+1)=y8(j) + (k1y8 + 2*k2y8 + 2*k3y8 + k4y8)/6;
end
plot(t,abs(y8).^2+abs(y1(ts2/h:end)).^2) I’m using Runge-Kutta method to solve a coupled system of EDO.
The function y1 is valid until a certain time (here is the "ts2" parameter). After this time, y8 is valid.
I want to plot y1 from 0 to ts2 (which happens without problem) and y8 from ts2 until the end.
But, I get the error "Arrays have incompatible sizes for this operation." during the second part.
%Parameters
or =0.2;
oc = 0.2;
gamma = 0.01;
gam=0.01;
Gamma = 1;
Gamma1 = Gamma;
Gamma2 = Gamma;
Gamma3 = 9/10;
Gamma5 = 1/10;
sig13ts2 = 5.2;
sig57ts = 2.6;
ts2=10;
f1 = @(t,y1,y2) (-Gamma/2-gam/2)*y1 -i*or*y2;
f2 = @(t,y1,y2) -i*or*y1+(-gam/2)*y2;
h=0.0001;
t(1) = 0;
y1(1) = 0;
y2(1) = sig57ts;
for j=1:1100000
t(j+1)=t(j)+h;
k1y1 = h*f1(t(j), y1(j), y2(j));
k1y2 = h*f2(t(j), y1(j), y2(j));
k2y1 = h*f1(t(j)+h/2,y1(j)+k1y1/2,y2(j)+k1y2/2);
k2y2 = h*f2(t(j)+h/2,y1(j)+k1y1/2,y2(j)+k1y2/2);
k3y1 = h*f1(t(j)+h/2,y1(j)+k2y1/2,y2(j)+k2y2/2);
k3y2 = h*f2(t(j)+h/2,y1(j)+k2y1/2,y2(j)+k2y2/2);
k4y1 = h*f1(t(j)+h, y1(j)+k3y1, y2(j)+k3y2);
k4y2 = h*f2(t(j)+h, y1(j)+k3y1, y2(j)+k3y2);
y1(j+1)=y1(j) + (k1y1 + 2*k2y1 + 2*k3y1 + k4y1)/6;
y2(j+1)=y2(j) + (k1y2 + 2*k2y2 + 2*k3y2 + k4y2)/6;
end
plot(t(1:ts2/h),abs(y1(1:ts2/h)).^2)
xlim([0 60])
hold on
%% Ligando C apos ts2
f3 = @(t,y3,y4,y5,y6,y7,y8) -(+Gamma2/2+gam/2)*y3+1i*oc*y4-1i*oc*y5;
f4 = @(t,y3,y4,y5,y6,y7,y8) 1i*oc*y3-(+gamma/2)*y4+Gamma3*y5-1i*oc*y6;
f5 = @(t,y3,y4,y5,y6,y7,y8) -1i*oc*y3-(Gamma1)*y5+1i*oc*y6;
f6 = @(t,y3,y4,y5,y6,y7,y8) -1i*oc*y4+1i*oc*y5+(-Gamma1/2-gamma/2)*y6;
f7 = @(t,y3,y4,y5,y6,y7,y8) -1i*or*y8+(-Gamma2/2-gam/2)*y7;
f8 = @(t,y3,y4,y5,y6,y7,y8) -1i*or*y7+Gamma5*y5-(gam/2)*y8;
t(1) = ts2;
y3(1) = 0;
y4(1) = sig13ts2;
y5(1) = 0;
y6(1) = 0;
y7(1) = y1(ts2/h);
y8(1) = y2(ts2/h);
for j=1:1000000
t(j+1)=t(j)+h;
k1y3 = h*f3(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y4 = h*f4(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y5 = h*f5(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y6 = h*f6(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y7 = h*f7(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k1y8 = h*f8(t(j), y3(j), y4(j), y5(j), y6(j), y7(j), y8(j));
k2y3 = h*f3(t(j)+h/2,y3(j)+k1y3/2,y4(j)+k1y4/2,y5(j)+k1y5/2,y6(j)+k1y6/2,y7(j)++k1y7/2,y8(j)+k1y8/2);
k2y4 = h*f4(t(j)+h/2,y3(j)+k1y3/2,y4(j)+k1y4/2,y5(j)+k1y5/2,y6(j)+k1y6/2,y7(j)++k1y7/2,y8(j)+k1y8/2);
k2y5 = h*f5(t(j)+h/2,y3(j)+k1y3/2,y4(j)+k1y4/2,y5(j)+k1y5/2,y6(j)+k1y6/2,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j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
k4y5 = h*f5(t(j)+h, y3(j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
k4y6 = h*f6(t(j)+h, y3(j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
k4y7 = h*f7(t(j)+h, y3(j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
k4y8 = h*f8(t(j)+h, y3(j)+k3y3, y4(j)+k3y4,y5(j)+k3y5,y6(j)+k3y6,y7(j)+k3y7,y8(j)+k3y8);
y3(j+1)=y3(j) + (k1y3 + 2*k2y3 + 2*k3y3 + k4y3)/6;
y4(j+1)=y4(j) + (k1y4 + 2*k2y4 + 2*k3y4 + k4y4)/6;
y5(j+1)=y5(j) + (k1y5 + 2*k2y5 + 2*k3y5 + k4y5)/6;
y6(j+1)=y6(j) + (k1y6 + 2*k2y6 + 2*k3y6 + k4y6)/6;
y7(j+1)=y7(j) + (k1y7 + 2*k2y7 + 2*k3y7 + k4y7)/6;
y8(j+1)=y8(j) + (k1y8 + 2*k2y8 + 2*k3y8 + k4y8)/6;
end
plot(t,abs(y8).^2+abs(y1(ts2/h:end)).^2) vector, plot, numerical integration MATLAB Answers — New Questions
R2017b GUIDE does not create callbacks
Have a GUIDE GUI with associated code created usng R2015b. In R2015b, GUIDE offers automatic creation of default callbacks for GUI a control – e.g., a toolbar toggle – and writes the function skeleton into the GUI code.
This does not happen with my R2017b installation. Furthermore, specifying the callbacks manually on the property sheet also does not create the skeleton/template in the GUI code?
Work around?Have a GUIDE GUI with associated code created usng R2015b. In R2015b, GUIDE offers automatic creation of default callbacks for GUI a control – e.g., a toolbar toggle – and writes the function skeleton into the GUI code.
This does not happen with my R2017b installation. Furthermore, specifying the callbacks manually on the property sheet also does not create the skeleton/template in the GUI code?
Work around? Have a GUIDE GUI with associated code created usng R2015b. In R2015b, GUIDE offers automatic creation of default callbacks for GUI a control – e.g., a toolbar toggle – and writes the function skeleton into the GUI code.
This does not happen with my R2017b installation. Furthermore, specifying the callbacks manually on the property sheet also does not create the skeleton/template in the GUI code?
Work around? guide, callback MATLAB Answers — New Questions
Transpose matrix and your transposition
How can I transpose Thais Matrix: Matrix = zeros(3500000,3);How can I transpose Thais Matrix: Matrix = zeros(3500000,3); How can I transpose Thais Matrix: Matrix = zeros(3500000,3); transpose matriz MATLAB Answers — New Questions
FMCW radar chirp signal parameter
Hi
I’m pretty new to matlab and I’m currently trying to create a chirp transmitting signal for a fmcw radar setup in simulink.
The constrains are:
transmitting frequency f0 = 2.4 GHz
object distance reference = 200 m
Maximum bandwidth B = 80 MHz
I have tried using chirp blocks in simulink but the result didn’t look like a chirp signal.
any help setting up the chirp signal is much appreciated : )Hi
I’m pretty new to matlab and I’m currently trying to create a chirp transmitting signal for a fmcw radar setup in simulink.
The constrains are:
transmitting frequency f0 = 2.4 GHz
object distance reference = 200 m
Maximum bandwidth B = 80 MHz
I have tried using chirp blocks in simulink but the result didn’t look like a chirp signal.
any help setting up the chirp signal is much appreciated : ) Hi
I’m pretty new to matlab and I’m currently trying to create a chirp transmitting signal for a fmcw radar setup in simulink.
The constrains are:
transmitting frequency f0 = 2.4 GHz
object distance reference = 200 m
Maximum bandwidth B = 80 MHz
I have tried using chirp blocks in simulink but the result didn’t look like a chirp signal.
any help setting up the chirp signal is much appreciated : ) fmcw chirp MATLAB Answers — New Questions
How to form clusters correctly while implementing the work “Energy Centroid Clustering Algorithm”?
I have been implementing the work titled "Energy centroid clustering algorithm to enhance the network lifetime of wireless sensor networks". However, even after following the psuedocodes I am not able to form clusters correctly initially. The Cluster Heads are one below the other rather than being distributed in the sensing region.
The above images are of my implementation. Below is the image as given in the paper.
I have problems in correctly interpreting the Psuedocode-2 given in the paper.
Also, what values of a sensor node’s transmission radius are assumed?
What should be the default compression ratio after data aggregation by the Cluster Head, as it is not given in the paper?
Any help would be highly appreciated.I have been implementing the work titled "Energy centroid clustering algorithm to enhance the network lifetime of wireless sensor networks". However, even after following the psuedocodes I am not able to form clusters correctly initially. The Cluster Heads are one below the other rather than being distributed in the sensing region.
The above images are of my implementation. Below is the image as given in the paper.
I have problems in correctly interpreting the Psuedocode-2 given in the paper.
Also, what values of a sensor node’s transmission radius are assumed?
What should be the default compression ratio after data aggregation by the Cluster Head, as it is not given in the paper?
Any help would be highly appreciated. I have been implementing the work titled "Energy centroid clustering algorithm to enhance the network lifetime of wireless sensor networks". However, even after following the psuedocodes I am not able to form clusters correctly initially. The Cluster Heads are one below the other rather than being distributed in the sensing region.
The above images are of my implementation. Below is the image as given in the paper.
I have problems in correctly interpreting the Psuedocode-2 given in the paper.
Also, what values of a sensor node’s transmission radius are assumed?
What should be the default compression ratio after data aggregation by the Cluster Head, as it is not given in the paper?
Any help would be highly appreciated. wireless sensor networks, clustering MATLAB Answers — New Questions
Readall stops because of non-existing data, Can I skip these?
Hi y’all,
When I run my code I get an error:
Error using matlab.io.datastore.TabularDatastore/readall (line 196)
Unable to parse a "Numeric" field when reading row 39898, field 7.
Actual Text: "N,07121.27550,W,2,28,0.9,0.79,M,,,5,0131*01"
Expected: A number or literal "NaN", "Inf". (possibly signed, case insensitive
Is there a way to have the readall function skip these ,,, non-existing values in my data?
Code:
function [] = each_day_table(folder_referenced, output_folder_location)
dimention = size(folder_referenced) ;
for i = 1:dimention(2)
datastore_result = datastore(folder_referenced(i)) ;
original_data = readall(datastore_result) ;
new_table = new_table_useful_data(original_data) ;
[~, name, ext] = fileparts(folder_referenced(i)) ;
output_filename = fullfile(output_folder_location, "new_" + name + ext) ;
writetable(new_table, output_filename)
end
folder_with_files = dir(input_folder_location) ; % define directory where files are
filenames = fullfile({folder_with_files.folder}, {folder_with_files.name}) ; % access file path and name information
csvFiles = endsWith(filenames, ‘.csv’) ; % use logi → determining which values end in .csv (fullfile provides axtra info we don’t want)
filenames = filenames(csvFiles) ; % create cell array with all file names
each_day_table(filenames, output_folder_location) ; % applies all the functions to the files
I’ve attached a ference file.Hi y’all,
When I run my code I get an error:
Error using matlab.io.datastore.TabularDatastore/readall (line 196)
Unable to parse a "Numeric" field when reading row 39898, field 7.
Actual Text: "N,07121.27550,W,2,28,0.9,0.79,M,,,5,0131*01"
Expected: A number or literal "NaN", "Inf". (possibly signed, case insensitive
Is there a way to have the readall function skip these ,,, non-existing values in my data?
Code:
function [] = each_day_table(folder_referenced, output_folder_location)
dimention = size(folder_referenced) ;
for i = 1:dimention(2)
datastore_result = datastore(folder_referenced(i)) ;
original_data = readall(datastore_result) ;
new_table = new_table_useful_data(original_data) ;
[~, name, ext] = fileparts(folder_referenced(i)) ;
output_filename = fullfile(output_folder_location, "new_" + name + ext) ;
writetable(new_table, output_filename)
end
folder_with_files = dir(input_folder_location) ; % define directory where files are
filenames = fullfile({folder_with_files.folder}, {folder_with_files.name}) ; % access file path and name information
csvFiles = endsWith(filenames, ‘.csv’) ; % use logi → determining which values end in .csv (fullfile provides axtra info we don’t want)
filenames = filenames(csvFiles) ; % create cell array with all file names
each_day_table(filenames, output_folder_location) ; % applies all the functions to the files
I’ve attached a ference file. Hi y’all,
When I run my code I get an error:
Error using matlab.io.datastore.TabularDatastore/readall (line 196)
Unable to parse a "Numeric" field when reading row 39898, field 7.
Actual Text: "N,07121.27550,W,2,28,0.9,0.79,M,,,5,0131*01"
Expected: A number or literal "NaN", "Inf". (possibly signed, case insensitive
Is there a way to have the readall function skip these ,,, non-existing values in my data?
Code:
function [] = each_day_table(folder_referenced, output_folder_location)
dimention = size(folder_referenced) ;
for i = 1:dimention(2)
datastore_result = datastore(folder_referenced(i)) ;
original_data = readall(datastore_result) ;
new_table = new_table_useful_data(original_data) ;
[~, name, ext] = fileparts(folder_referenced(i)) ;
output_filename = fullfile(output_folder_location, "new_" + name + ext) ;
writetable(new_table, output_filename)
end
folder_with_files = dir(input_folder_location) ; % define directory where files are
filenames = fullfile({folder_with_files.folder}, {folder_with_files.name}) ; % access file path and name information
csvFiles = endsWith(filenames, ‘.csv’) ; % use logi → determining which values end in .csv (fullfile provides axtra info we don’t want)
filenames = filenames(csvFiles) ; % create cell array with all file names
each_day_table(filenames, output_folder_location) ; % applies all the functions to the files
I’ve attached a ference file. readall, missing data MATLAB Answers — New Questions
How to Bypass OneDrive Files Download
I just installed MATLAB on my work laptop with Windows 11. The org uses OneDrive for file storage. My OneDrive is set to only download files when they are opened ("Always keep on this device" is checked off).
What I discovered was that MATLAB insists on downloading all the files in the folder where I want to navigate to to save my script. As in, if I want to save the script in the folder OneDrive/Documents/Some Folder, and there is like 20GB of other files in that folder, MATLAB will trigger download of all 20GB of other files before it will even let me save my one file.
What’s even worse, when I cancel the automatic download MATLAB freezes. If I Block App in automatic downloads MATLAB freezes. After it freezes the only way to close it is force quit through the Task Manager. So my options are: I let MATLAB download whatever it wants as I navigate through my OneDrive, or freeze the program by cancelling the downloads.
I haven’t used MATLAB since v. 2021 and this behavior is new for me. Is there anything I can do to use the software without downloading files to local drive? I simply do not have space for that (nor the time to download GB of files each time I want to move around my OneDrive). I can use admin account but only temporarily, after coordinating with the IT department.
I found a couple of threads here on this topic but nothing that answers my question. Thank you in advance.I just installed MATLAB on my work laptop with Windows 11. The org uses OneDrive for file storage. My OneDrive is set to only download files when they are opened ("Always keep on this device" is checked off).
What I discovered was that MATLAB insists on downloading all the files in the folder where I want to navigate to to save my script. As in, if I want to save the script in the folder OneDrive/Documents/Some Folder, and there is like 20GB of other files in that folder, MATLAB will trigger download of all 20GB of other files before it will even let me save my one file.
What’s even worse, when I cancel the automatic download MATLAB freezes. If I Block App in automatic downloads MATLAB freezes. After it freezes the only way to close it is force quit through the Task Manager. So my options are: I let MATLAB download whatever it wants as I navigate through my OneDrive, or freeze the program by cancelling the downloads.
I haven’t used MATLAB since v. 2021 and this behavior is new for me. Is there anything I can do to use the software without downloading files to local drive? I simply do not have space for that (nor the time to download GB of files each time I want to move around my OneDrive). I can use admin account but only temporarily, after coordinating with the IT department.
I found a couple of threads here on this topic but nothing that answers my question. Thank you in advance. I just installed MATLAB on my work laptop with Windows 11. The org uses OneDrive for file storage. My OneDrive is set to only download files when they are opened ("Always keep on this device" is checked off).
What I discovered was that MATLAB insists on downloading all the files in the folder where I want to navigate to to save my script. As in, if I want to save the script in the folder OneDrive/Documents/Some Folder, and there is like 20GB of other files in that folder, MATLAB will trigger download of all 20GB of other files before it will even let me save my one file.
What’s even worse, when I cancel the automatic download MATLAB freezes. If I Block App in automatic downloads MATLAB freezes. After it freezes the only way to close it is force quit through the Task Manager. So my options are: I let MATLAB download whatever it wants as I navigate through my OneDrive, or freeze the program by cancelling the downloads.
I haven’t used MATLAB since v. 2021 and this behavior is new for me. Is there anything I can do to use the software without downloading files to local drive? I simply do not have space for that (nor the time to download GB of files each time I want to move around my OneDrive). I can use admin account but only temporarily, after coordinating with the IT department.
I found a couple of threads here on this topic but nothing that answers my question. Thank you in advance. onedrive MATLAB Answers — New Questions
Error when building model in simulink “Error(s) encountered while building model”
Matlab is failing to compile every block in my main. The error doesn’t give me any other information except: "Error(s) encountered while building model" and then a list of all the blocks that failed to compile. The command window says "the make command returned an error of 2, ‘An error occurred during the call to make’ is not recognized as an internal or external command, operable program or batch file."
I’m using R2013a and one of the updates listed below must have deleted microsoft SDK 7.1 the other night. The code worked fine before these updates. After reinstalling .NET framework 4 and the SDK it’s still failing to compile. I think it may be a problem with the mex or xpc setup or maybe I still need to reinstall something.
security update – microsoft visual studio 2010 xml editor
definition update – microsoft security essentials
security update – microsoft visual c++ 2008 service pack 1
security update – microsoft visual studio 2010
Any help would be appreciatedMatlab is failing to compile every block in my main. The error doesn’t give me any other information except: "Error(s) encountered while building model" and then a list of all the blocks that failed to compile. The command window says "the make command returned an error of 2, ‘An error occurred during the call to make’ is not recognized as an internal or external command, operable program or batch file."
I’m using R2013a and one of the updates listed below must have deleted microsoft SDK 7.1 the other night. The code worked fine before these updates. After reinstalling .NET framework 4 and the SDK it’s still failing to compile. I think it may be a problem with the mex or xpc setup or maybe I still need to reinstall something.
security update – microsoft visual studio 2010 xml editor
definition update – microsoft security essentials
security update – microsoft visual c++ 2008 service pack 1
security update – microsoft visual studio 2010
Any help would be appreciated Matlab is failing to compile every block in my main. The error doesn’t give me any other information except: "Error(s) encountered while building model" and then a list of all the blocks that failed to compile. The command window says "the make command returned an error of 2, ‘An error occurred during the call to make’ is not recognized as an internal or external command, operable program or batch file."
I’m using R2013a and one of the updates listed below must have deleted microsoft SDK 7.1 the other night. The code worked fine before these updates. After reinstalling .NET framework 4 and the SDK it’s still failing to compile. I think it may be a problem with the mex or xpc setup or maybe I still need to reinstall something.
security update – microsoft visual studio 2010 xml editor
definition update – microsoft security essentials
security update – microsoft visual c++ 2008 service pack 1
security update – microsoft visual studio 2010
Any help would be appreciated xpc, simulink, an error occurred during the call to make, matlab compiler, build error, xpc setup, mex, mex compiler MATLAB Answers — New Questions
Can someone help me to obtain the FRF curve and plot the curve?
%%
% clear memory
clear all
clc
%% % Define material properties and beam dimensions % % %
%xx—————————————————————————————-xx%
width = 0.3; % beam width
t1 = 0.1; % beam thickness of first layer
t2 = 0.1; % beam thickness of second layer
L = 1; % beam length
poisson1 = 0.33; % Poisson’s ratio first layer
poisson2 = 0.33; % Poisson’s ratio second layer
rho1 = 1700; % density of material 1
rho2 = 1240; % density of material 2
E1 = 2.2e11; % modulus of elasticity for material 1
E2 = 7.9e19; % modulus of elasticity for material 1
E3=7.9e9; % modulus of elasticity for material 2
% % % beam load parameters % % %
%xx—————————————————————————————-xx%
n = 0; % material gradation index
P = -100; % uniform distributed load
Mb = 24.4; % ratio of Young’s moduli between two materials
E2 = E1 / Mb;
% % % Derived FGM parameters % % %
%xx—————————————————————————————-xx%
[C1, I01, I1, A01] = effectstifmass(width, t1, rho1, rho2, E1, E2, Mb, n, poisson1);
[C2, I02, I2, A02] = effectstifmass(width, t2, rho1, rho2, E3, E3, Mb, n, poisson2);
% Mass parameters for FGM
numberElements = 40;
nodeCoordinates = linspace(0, L, numberElements + 1);
xx = nodeCoordinates’;
x = xx’;
elementNodes = zeros(size(nodeCoordinates, 2) – 1, 2);
for i = 1:size(nodeCoordinates, 2) – 1
elementNodes(i, 1) = i;
elementNodes(i, 2) = i + 1;
end
numberNodes = size(xx, 1);
GDof = 2 * numberNodes;
% % % Static analysis % % %
%xx—————————————————————————————-xx%
% Computation of the system stiffness, force, mass
[stiffness1, force, mass1] = formStiffnessMassTimoshenkoBeam(GDof, numberElements, …
elementNodes, numberNodes, xx, C1, P, rho1, I01, t1);
[stiffness2, ~, mass2] = formStiffnessMassTimoshenkoBeam(GDof, numberElements, …
elementNodes, numberNodes, xx, C2, P, rho1, I02, t2);
% % % Boundary conditions % % %
%xx—————————————————————————————-xx%
fixedNodeW = [1, 1];
fixedNodeTX = [1, 2];
prescribedDof = [fixedNodeW; fixedNodeTX + numberNodes];
stiffness = stiffness1 + stiffness2 + stiffness1;
mass = mass1 + mass2 + mass1;
K = stiffness;
m = mass;
% % % Free vibration analysis % % %
%xx—————————————————————————————-xx%
[modes, eigenvalues] = eigenvalue(GDof, prescribedDof, stiffness, mass, 0);
omega = sqrt(eigenvalues) * L * L * sqrt(rho1 * A01 / E1 / I01);
disp(‘First 3 dimensionless frequencies:’)
disp(omega(1:3))
f = sqrt(eigenvalues);
disp(‘First 3 natural frequencies (Hz):’)
disp(f(1:3))
% Drawing mesh and deformed shape
modeNumber = 3;
V1 = modes(:, 1:modeNumber);
% Normalize the mode shapes for better visualization
for i = 1:modeNumber
V1(:,i) = V1(:,i) / max(abs(V1(:,i)));
end
% Plot the first 3 mode shapes
figure;
for i = 1:modeNumber
subplot(3,1,i);
plot(x, V1(1:numberNodes, i), ‘LineWidth’, 2);
title([‘Mode Shape ‘, num2str(i)]);
xlabel(‘Beam Length (x)’);
ylabel(‘Normalized Displacement’);
grid on;
end
% Solve for static displacements
displacements = solution(GDof, prescribedDof, stiffness, force);
U = displacements;
% Max displacement
disp(‘Max normal displacement:’)
disp(min(U(1:numberNodes)))
% % % Forced vibration analysis % % %
%xx—————————————————————————————-xx%
c1 = 1.5;
c2 = 0.9; % damping coefficients
Ca = c1 * mass + c2 * stiffness;
F = @(t) force * sin(2* t); % time-dependent load
D0 = zeros(GDof,1); % initial displacement
V0 = zeros(GDof,1); % initial velocity
dt = 0.005; T = 100; tt = 0:dt:T;
[D, V, A] = Newmark(mass, Ca, stiffness, F, D0, V0, dt, T);
% Plot forced vibration displacement at a node
figure;
plot(tt, D(21,:), ‘b’, ‘LineWidth’, 2);
title(‘Forced Vibration Displacement at Node 21’);
xlabel(‘Time (s)’);
ylabel(‘Displacement’);
grid on;
% % % Export results to Excel % % %
%xx—————————————————————————————-xx%
xlswrite(‘mode vibration result.xlsx’, [x(:), V1(1:numberNodes,:)]);
xlswrite(‘normal displacement.xlsx’, [x(:), U(1:numberNodes,:)]);
xlswrite(‘forced displacement.xlsx’, [tt’, D(21,:)’]);
this is my current code%%
% clear memory
clear all
clc
%% % Define material properties and beam dimensions % % %
%xx—————————————————————————————-xx%
width = 0.3; % beam width
t1 = 0.1; % beam thickness of first layer
t2 = 0.1; % beam thickness of second layer
L = 1; % beam length
poisson1 = 0.33; % Poisson’s ratio first layer
poisson2 = 0.33; % Poisson’s ratio second layer
rho1 = 1700; % density of material 1
rho2 = 1240; % density of material 2
E1 = 2.2e11; % modulus of elasticity for material 1
E2 = 7.9e19; % modulus of elasticity for material 1
E3=7.9e9; % modulus of elasticity for material 2
% % % beam load parameters % % %
%xx—————————————————————————————-xx%
n = 0; % material gradation index
P = -100; % uniform distributed load
Mb = 24.4; % ratio of Young’s moduli between two materials
E2 = E1 / Mb;
% % % Derived FGM parameters % % %
%xx—————————————————————————————-xx%
[C1, I01, I1, A01] = effectstifmass(width, t1, rho1, rho2, E1, E2, Mb, n, poisson1);
[C2, I02, I2, A02] = effectstifmass(width, t2, rho1, rho2, E3, E3, Mb, n, poisson2);
% Mass parameters for FGM
numberElements = 40;
nodeCoordinates = linspace(0, L, numberElements + 1);
xx = nodeCoordinates’;
x = xx’;
elementNodes = zeros(size(nodeCoordinates, 2) – 1, 2);
for i = 1:size(nodeCoordinates, 2) – 1
elementNodes(i, 1) = i;
elementNodes(i, 2) = i + 1;
end
numberNodes = size(xx, 1);
GDof = 2 * numberNodes;
% % % Static analysis % % %
%xx—————————————————————————————-xx%
% Computation of the system stiffness, force, mass
[stiffness1, force, mass1] = formStiffnessMassTimoshenkoBeam(GDof, numberElements, …
elementNodes, numberNodes, xx, C1, P, rho1, I01, t1);
[stiffness2, ~, mass2] = formStiffnessMassTimoshenkoBeam(GDof, numberElements, …
elementNodes, numberNodes, xx, C2, P, rho1, I02, t2);
% % % Boundary conditions % % %
%xx—————————————————————————————-xx%
fixedNodeW = [1, 1];
fixedNodeTX = [1, 2];
prescribedDof = [fixedNodeW; fixedNodeTX + numberNodes];
stiffness = stiffness1 + stiffness2 + stiffness1;
mass = mass1 + mass2 + mass1;
K = stiffness;
m = mass;
% % % Free vibration analysis % % %
%xx—————————————————————————————-xx%
[modes, eigenvalues] = eigenvalue(GDof, prescribedDof, stiffness, mass, 0);
omega = sqrt(eigenvalues) * L * L * sqrt(rho1 * A01 / E1 / I01);
disp(‘First 3 dimensionless frequencies:’)
disp(omega(1:3))
f = sqrt(eigenvalues);
disp(‘First 3 natural frequencies (Hz):’)
disp(f(1:3))
% Drawing mesh and deformed shape
modeNumber = 3;
V1 = modes(:, 1:modeNumber);
% Normalize the mode shapes for better visualization
for i = 1:modeNumber
V1(:,i) = V1(:,i) / max(abs(V1(:,i)));
end
% Plot the first 3 mode shapes
figure;
for i = 1:modeNumber
subplot(3,1,i);
plot(x, V1(1:numberNodes, i), ‘LineWidth’, 2);
title([‘Mode Shape ‘, num2str(i)]);
xlabel(‘Beam Length (x)’);
ylabel(‘Normalized Displacement’);
grid on;
end
% Solve for static displacements
displacements = solution(GDof, prescribedDof, stiffness, force);
U = displacements;
% Max displacement
disp(‘Max normal displacement:’)
disp(min(U(1:numberNodes)))
% % % Forced vibration analysis % % %
%xx—————————————————————————————-xx%
c1 = 1.5;
c2 = 0.9; % damping coefficients
Ca = c1 * mass + c2 * stiffness;
F = @(t) force * sin(2* t); % time-dependent load
D0 = zeros(GDof,1); % initial displacement
V0 = zeros(GDof,1); % initial velocity
dt = 0.005; T = 100; tt = 0:dt:T;
[D, V, A] = Newmark(mass, Ca, stiffness, F, D0, V0, dt, T);
% Plot forced vibration displacement at a node
figure;
plot(tt, D(21,:), ‘b’, ‘LineWidth’, 2);
title(‘Forced Vibration Displacement at Node 21’);
xlabel(‘Time (s)’);
ylabel(‘Displacement’);
grid on;
% % % Export results to Excel % % %
%xx—————————————————————————————-xx%
xlswrite(‘mode vibration result.xlsx’, [x(:), V1(1:numberNodes,:)]);
xlswrite(‘normal displacement.xlsx’, [x(:), U(1:numberNodes,:)]);
xlswrite(‘forced displacement.xlsx’, [tt’, D(21,:)’]);
this is my current code %%
% clear memory
clear all
clc
%% % Define material properties and beam dimensions % % %
%xx—————————————————————————————-xx%
width = 0.3; % beam width
t1 = 0.1; % beam thickness of first layer
t2 = 0.1; % beam thickness of second layer
L = 1; % beam length
poisson1 = 0.33; % Poisson’s ratio first layer
poisson2 = 0.33; % Poisson’s ratio second layer
rho1 = 1700; % density of material 1
rho2 = 1240; % density of material 2
E1 = 2.2e11; % modulus of elasticity for material 1
E2 = 7.9e19; % modulus of elasticity for material 1
E3=7.9e9; % modulus of elasticity for material 2
% % % beam load parameters % % %
%xx—————————————————————————————-xx%
n = 0; % material gradation index
P = -100; % uniform distributed load
Mb = 24.4; % ratio of Young’s moduli between two materials
E2 = E1 / Mb;
% % % Derived FGM parameters % % %
%xx—————————————————————————————-xx%
[C1, I01, I1, A01] = effectstifmass(width, t1, rho1, rho2, E1, E2, Mb, n, poisson1);
[C2, I02, I2, A02] = effectstifmass(width, t2, rho1, rho2, E3, E3, Mb, n, poisson2);
% Mass parameters for FGM
numberElements = 40;
nodeCoordinates = linspace(0, L, numberElements + 1);
xx = nodeCoordinates’;
x = xx’;
elementNodes = zeros(size(nodeCoordinates, 2) – 1, 2);
for i = 1:size(nodeCoordinates, 2) – 1
elementNodes(i, 1) = i;
elementNodes(i, 2) = i + 1;
end
numberNodes = size(xx, 1);
GDof = 2 * numberNodes;
% % % Static analysis % % %
%xx—————————————————————————————-xx%
% Computation of the system stiffness, force, mass
[stiffness1, force, mass1] = formStiffnessMassTimoshenkoBeam(GDof, numberElements, …
elementNodes, numberNodes, xx, C1, P, rho1, I01, t1);
[stiffness2, ~, mass2] = formStiffnessMassTimoshenkoBeam(GDof, numberElements, …
elementNodes, numberNodes, xx, C2, P, rho1, I02, t2);
% % % Boundary conditions % % %
%xx—————————————————————————————-xx%
fixedNodeW = [1, 1];
fixedNodeTX = [1, 2];
prescribedDof = [fixedNodeW; fixedNodeTX + numberNodes];
stiffness = stiffness1 + stiffness2 + stiffness1;
mass = mass1 + mass2 + mass1;
K = stiffness;
m = mass;
% % % Free vibration analysis % % %
%xx—————————————————————————————-xx%
[modes, eigenvalues] = eigenvalue(GDof, prescribedDof, stiffness, mass, 0);
omega = sqrt(eigenvalues) * L * L * sqrt(rho1 * A01 / E1 / I01);
disp(‘First 3 dimensionless frequencies:’)
disp(omega(1:3))
f = sqrt(eigenvalues);
disp(‘First 3 natural frequencies (Hz):’)
disp(f(1:3))
% Drawing mesh and deformed shape
modeNumber = 3;
V1 = modes(:, 1:modeNumber);
% Normalize the mode shapes for better visualization
for i = 1:modeNumber
V1(:,i) = V1(:,i) / max(abs(V1(:,i)));
end
% Plot the first 3 mode shapes
figure;
for i = 1:modeNumber
subplot(3,1,i);
plot(x, V1(1:numberNodes, i), ‘LineWidth’, 2);
title([‘Mode Shape ‘, num2str(i)]);
xlabel(‘Beam Length (x)’);
ylabel(‘Normalized Displacement’);
grid on;
end
% Solve for static displacements
displacements = solution(GDof, prescribedDof, stiffness, force);
U = displacements;
% Max displacement
disp(‘Max normal displacement:’)
disp(min(U(1:numberNodes)))
% % % Forced vibration analysis % % %
%xx—————————————————————————————-xx%
c1 = 1.5;
c2 = 0.9; % damping coefficients
Ca = c1 * mass + c2 * stiffness;
F = @(t) force * sin(2* t); % time-dependent load
D0 = zeros(GDof,1); % initial displacement
V0 = zeros(GDof,1); % initial velocity
dt = 0.005; T = 100; tt = 0:dt:T;
[D, V, A] = Newmark(mass, Ca, stiffness, F, D0, V0, dt, T);
% Plot forced vibration displacement at a node
figure;
plot(tt, D(21,:), ‘b’, ‘LineWidth’, 2);
title(‘Forced Vibration Displacement at Node 21’);
xlabel(‘Time (s)’);
ylabel(‘Displacement’);
grid on;
% % % Export results to Excel % % %
%xx—————————————————————————————-xx%
xlswrite(‘mode vibration result.xlsx’, [x(:), V1(1:numberNodes,:)]);
xlswrite(‘normal displacement.xlsx’, [x(:), U(1:numberNodes,:)]);
xlswrite(‘forced displacement.xlsx’, [tt’, D(21,:)’]);
this is my current code composites vibartion MATLAB Answers — New Questions
Having Simulink Build Issues: How to resolve this error?
Top model targets:
Model Build Reason Status Build Duration
===========================================================================================================================================
RC_AME_CoSim_HF Information cache folder or artifacts were missing. Failed to build. For more information, see build log. 0d
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 7.1221sTop model targets:
Model Build Reason Status Build Duration
===========================================================================================================================================
RC_AME_CoSim_HF Information cache folder or artifacts were missing. Failed to build. For more information, see build log. 0d
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 7.1221s Top model targets:
Model Build Reason Status Build Duration
===========================================================================================================================================
RC_AME_CoSim_HF Information cache folder or artifacts were missing. Failed to build. For more information, see build log. 0d
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 7.1221s code generation MATLAB Answers — New Questions
We have timeharp-200 running under WIN XP 32 bit, please give us advice to read a .t3r file, we have generated
WE want to read a .t3r file with detailed photon counting time-tags generated by a single Timeharp 200 card and a photomultiplier detecting photon events. Is there an information about programs like " FRETchen" from Dr. Gansen, which was able to open these files?
If there is a module in LABVIEW 8.5 for example, which let the file open and read the time tags precisely it would also help.WE want to read a .t3r file with detailed photon counting time-tags generated by a single Timeharp 200 card and a photomultiplier detecting photon events. Is there an information about programs like " FRETchen" from Dr. Gansen, which was able to open these files?
If there is a module in LABVIEW 8.5 for example, which let the file open and read the time tags precisely it would also help. WE want to read a .t3r file with detailed photon counting time-tags generated by a single Timeharp 200 card and a photomultiplier detecting photon events. Is there an information about programs like " FRETchen" from Dr. Gansen, which was able to open these files?
If there is a module in LABVIEW 8.5 for example, which let the file open and read the time tags precisely it would also help. tttr, timeharp200 MATLAB Answers — New Questions