Answered
How to find Angle of Impedence?
You should take into consideration that there can be phase difference between the voltage and the current signals. One way is to...

mer än ett år ago | 0

Answered
How to reconstruct/reassemble a decomposed signal?
You can use the “waverec” function for this purpose. Follow the following documentation for more details. Multilevel 1-D discr...

mer än ett år ago | 0

Answered
How to model a PD (Photo-diode) in SIMULINK?
You can use Photo Diode from the Simscape Library. “Simscape / Electrical / Sensors & Transducers” Documentation for Photodiode...

mer än ett år ago | 0

Answered
Error using the invoke function,picoscope
It is difficult to say until we do not have the variables that you are sending as parameters. You can go through the following d...

mer än ett år ago | 1

Answered
Add field to input struct array in Mex
In order to add a new field to the struct Array in Mex, you can use “mxAddField” function. Please go through the following docu...

mer än ett år ago | 0

Answered
Is there a way to remove one channel group from a tdms file and write a new tdms file?
You can execute the following steps to remove a channel group from an existing TDMS file and create a new TDMS file with the upd...

mer än ett år ago | 0

Answered
Resistance in PEM electrolyzer block
The external resistance "R" in the setting of Simscape's Electrolyzer block denotes an additional resistance that can be connect...

mer än ett år ago | 0

Answered
spdfcdfinfo - how to avoid a crash when the cdf file is corrupted?
One approach is to use the built-in MATLAB function exist to check if the file exists and is readable. Another approach is to u...

mer än ett år ago | 0

Answered
How to extract MIDI data from mxarray in simulink ?
To extract the MIDI data correctly from the “mxarray” received by the “midireceive()” function in Simulink, you can use the foll...

mer än ett år ago | 0

| accepted

Answered
Hanging during large parallel processing tasks.
There are a few possible reasons why MATLAB may occasionally freeze during demanding parallel processing workloads. Here are som...

mer än ett år ago | 0

Answered
How to resolve "Transparency violation error" for parallel programming?
The error message you're getting implies that your code is violating the transparency rule. The “parfor” loop in MATLAB can do t...

mer än ett år ago | 0

| accepted

Answered
two trigger events, can specify in different color
Yes, you can distinguish between the two events “A” and “B” in MATLAB by using the “eventData” input argument of the event funct...

mer än ett år ago | 1

| accepted

Answered
rocmetric 'Unrecognized function or variable 'rocmetrics'.'
I could not find "rocmetric" function in R2021b release documentation. So I think “rocmetric” function was introduced in the R20...

mer än ett år ago | 0

Answered
Fast aggregates over overlapping subsets of a vector
You are correct in saying that “accumarray” only functions for sets of indices that are mutually exclusive. You can apply a func...

mer än ett år ago | 0

Answered
I don't understand MATLAB coder to C
You must write an entry-point function that invokes each function your main function needs in order to introduce numerous functi...

mer än ett år ago | 0

Answered
Simulink optimizer solve for largest value
In your Simulink model, you may use a variety of optimization techniques to determine the greatest value of the output for a giv...

mer än ett år ago | 0

Answered
Derivative of state '1' in block 'model_name' at time 0.0 is not finite
It is difficult to tell the exact solution without knowing the context and the settings of the model. You can go through below ...

mer än ett år ago | 0

Answered
How can I storage data in simulink to use it as one set of data?
To perform an FFT on the entire vector in one step in Simulink, you can use the Buffer block to store the entire vector and then...

mer än ett år ago | 1

| accepted

Answered
Exporting uneven nested cells to excel
Xlswrite is not recommended. Go through the below documentation. (Not recommended) Write Microsoft Excel spreadsheet file - M...

mer än ett år ago | 0

Answered
Index exceeds the number of array elements. Index must not exceed 8.
To handle this error, you should better add proper checks as the function is getting agl_grid as input. For eg. For the stateme...

nästan 2 år ago | 0

Answered
How can I combine two correlation matrices (corrplot)?
The corr function is used to calculate the correlation matrix of each dataset, and the triu and tril functions are used to extr...

nästan 2 år ago | 0

Answered
Can i get the remaining time from the start of a timer?
You can use tic, toc and a while loop for this. t = timer; t.StartDelay = 20; t.TimerFcn = @(myTimerObj, thisEvent)disp('20 s...

nästan 2 år ago | 0

Answered
Going from Euler's method to trapezoidal rule
You would have to modify the calculation of the intermediate value m as follows: if true syms t y f=@(t,y) 1-t+4.*y; t=0;...

nästan 2 år ago | 0

Answered
how to prepare a matlab code for tcsc
Yes, it is Possible to write MATLAB code to implement TCSC. f_base = 60; %Hz R = 0.1; %Ohm C = 100e-8; %F V_base = 20e4; %V ...

nästan 2 år ago | 0

Answered
Save plot values as table values and output them to the table
A matrix can be created representing the image. We can than visualize the image. Array2table can be used to get a table out of ...

nästan 2 år ago | 0

Answered
How to generate random numbers in a Gaussian distribution?
You can use the randn function in MATLAB. You can follow the following steps: Generate Random Numbers from a standard normal ...

nästan 2 år ago | 0

| accepted