Answered
How to continuously create an array of the latest values of a signal in SIMULINK?
You can use a buffer block https://www.mathworks.com/help/dsp/ref/buffer.html (requires the DSP System Toolbox)

1 year ago | 0

Answered
transform table variable into struct variable.
Perhaps use table2struct ? Note that your posted code creates a cell array, U and uses () indexing to try to set U(1) and so on...

1 year ago | 0

| accepted

Answered
How to merge data in mat file?
load pot1 newpot = pot(~arrayfun(@(S)isempty(S.tr), pot)); save('newpot.mat', 'newpot')

1 year ago | 0

Answered
Can we download Predictive maintenance toolbox for free, and is it compatible with MATLAB 2017a?
The Predictive Maintenance Toolbox was introduced in R2018a, so it is not compatible with R2017a. It cannot be downloaded for f...

1 year ago | 0

Answered
How can show 2D plot of 3 file data analysis and show effect of change ?
S = fileread('ST1.txt'); S = regexprep(S, '\*I', ''); S(1:100) ST1data = cell2mat(textscan(S, '%f %f %f%f')); ST1 = reshap...

1 year ago | 0

Answered
How to remove extraneous Matlab-generated vertical lines that connect function values at jump discontinuities?
MATLAB does not do that. What is happening is that when you use plot() on a finite set of data, then where there are places tha...

1 year ago | 1

| accepted

Answered
how to crop a binary mask to remove all black pixels while maintaining the largest area of white pixels?
vertproj = any(YourMask,1); horzproj = any(YourMask,2); minx = find(vertproj,1,'first'); maxx = find(vertproj,1,'last'); min...

1 year ago | 0

Answered
Simulink Mathlab Function Block Output Variable Size Array
Insert totalValue = uint8(0); before totalValue = (y3+2);

1 year ago | 0

Answered
minimizing with genetic algorithm
y = @(x) (1.002)-((1-exp(-0.00003*x))./(0.00003*(x+1.5)+(0.00063*(1-exp(-0.00003*x))))); fplot(y, [-2, 10]) fplot(y, [-1.5 -...

1 year ago | 0

Answered
Can I plot two figures simultaneously but with less data for the second figure?
Well, you can... but it isn't worth the trouble. N1 = 1001; N2 = 20; theta = linspace(0, 2*pi, N1); [~, pi_idx] = min(abs(th...

1 year ago | 0

| accepted

Answered
chiral medium in matlab
The internal code looks like if ~isDielectricSubstrate(obj) feed_x = obj.DefaultFeedLocation(1)+ ...

1 year ago | 0

| accepted

Answered
Install MIDAS Toolbox in Matlab 2024b
Most items installed by the Add-On Explorer do not show up in ver (official MATLAB toolboxes being the exception -- but Support ...

1 year ago | 0

| accepted

Answered
Reading Arduino Serial Port into Matlab and 50% of the time getting characters instead of digits.
It is not documented what the return value is if the reading fails, such as if there happens to be non-numeric bytes in the inpu...

1 year ago | 1

| accepted

Answered
Will leftover CPU cores (not used by parfor workers) be used for built-in multithreading?
No, left-over cores will not be automatically used. They will be left for the operating system to run (whatever) on. If you wan...

1 year ago | 0

| accepted

Answered
Limitations of MATLAB Compiler SDK Free Trial?
Free trials of MATLAB Compiler SDK are 30 days. However, MATLAB Compiler SDK is not available under a Student license. If I re...

1 year ago | 0

Answered
Import data to app during simulation
To Workspace only updates when the simulation pauses or stops. There are no blocks that will update variables in the workspac...

1 year ago | 0

| accepted

Answered
How to solve nonlinear equation system with variable inputs?
syms Eta0 i0 syms w [1 3] syms T [1 3] eqn1 = T(2)/T(1) == i0 * power(Eta0, T(1) * (w(1)-w(3))/abs(T(1) * (w(1)-w(3)))); pret...

1 year ago | 0

Answered
too many outputs for ginput - documentation error?
You are not missing anything. The behaviour of returning both X and Y together in one output is undocumented . (It might perha...

1 year ago | 0

| accepted

Answered
Daily mean through long time
build a timetable() from the data. Use retime()

1 year ago | 0

Answered
i want to iterate for each crack size from 25 to 250mpa with 25 increments
for S = 25 : 25 : 250 and get rid of the S=S+25 and the test for S==250

1 year ago | 0

Answered
How to Discretize a Polygon boundary in to equally spaced points?
See John D'errico file exchange contribution interparc https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc

1 year ago | 1

Answered
.mat file to bin file
Probably something like filename = 'OUTPUTFILENAMEGOESHERE.bin'; [fid, msg] = fopen(filename, 'w'); if fid < 0; error('Failed...

1 year ago | 1

Answered
USRP X310 support in MATLAB
According to https://www.mathworks.com/help/wireless-testbench/gs/supported-sdr-devices.html the USRP X310 is not compatible wit...

1 year ago | 0

Answered
How to set UDP communication in Matlab applications?
%first application system('matlab -batch SecondApplication() &'); pause(10); u = udpport(); write(u, 1:5, "uint8", "127.0....

1 year ago | 0

Answered
Question related to area trapz
If C1/C approaches 0.9 then it is normal that trapz(t,y)/trapz(t,C) would approach 0.9 Let's say that C1 is 8 and C is 10, the...

1 year ago | 0

| accepted

Answered
How to resolve the issue of Y must be a column vector?
IncMdl = fitcensemble(Xinit, Yinit, 'Method', 'Bag', 'Learners', template); The result of fitting with method 'bag' is a Classi...

1 year ago | 0

Answered
Is it possible png to geotiff using mapping toolbox?
Sure. Just use imagefile = [basename '.png']; instead of imagefile = [basename '.jpg'];

1 year ago | 0

Answered
"Too Many Input/Output Arguments" error for nrlmsise00 function
The nrlmsiese00 function at https://www.mathworks.com/matlabcentral/fileexchange/56253-nrlmsise-00-atmosphere-model does not acc...

1 year ago | 1

Answered
Roots of Symbolic Transfer Function
syms s gm1 gmp ro1 rop R2 R1 Cgs Cout Zcgs Zcgd Zcout Z1 Z2 Vinp Vinm Vout1 Vd Vout2 Htf eqn1 = Vout1 == (-gm1*Vinp + gm1*Vin...

1 year ago | 0

Answered
Does upgrading from 2023 to 2024 require a new license key?
Yes, all upgrades to different versions require new license keys. The existing license key covers all releases up to R2023b, bu...

1 year ago | 0

Load more