Answered
how to apply bounds restriction in PSO
If you were using particleswarm() and if each position element was paired with a velocity element, then the way it would be hand...

4 years ago | 0

Answered
Solving System of Equations with Symbolic Toolbox
E = Equation; partial.(X(1)) = solve(E(1), X(1)); for n = 2 : min(length(Equation), length(X)); E = subs(E(2:end), partia...

4 years ago | 0

Answered
How can I call a toolbox in a script?
You can call the just-released curveFitter from a script, or the older cftool(), and you can pass in the values of variables. Ho...

4 years ago | 0

Answered
Close uialert - App designer
Why create a uifigure() there? uialert() will create its own uifigure()

4 years ago | 1

Answered
overlap ylabel with values axis
format long g x = 1.2e7 num2str(x, '%.1e') sprintf('%.1e', x) compose('%.1e', x) num2str() invokes sprintf() internally (ex...

4 years ago | 0

Answered
Conversion to double from timeseries is not possible
getsampleusingtime() retrieves a subset of a timeseries, but is itself a timeseries object. You need to access the Data property...

4 years ago | 1

| accepted

Answered
Correct error in parfor loop
parfor j = 1:nk2 if abs(ID_sat) < 1e-5 T_mesh(nt,j) = 11; h1 = Time_h1(:,j); HT = HD_...

4 years ago | 0

| accepted

Answered
Proper use of DSP toolbox (filter)
<https://www.mathworks.com/help/control/ug/continuous-discrete-conversion-methods.html> DSP toolbox is for Digital Signal Pro...

4 years ago | 0

Answered
send data to workspace without using mxArray
Is there another way using engine API for C? Yes. You can construct a string that codes a MATLAB assignment, and use https://ww...

4 years ago | 0

Answered
Unused Variable in Function
it does not show any variables in the workspace. Values assigned to inside a function disappear as soon as the function returns...

4 years ago | 0

Answered
optimizing two variables in fmincon with different sizes
You cannot directly pass two inputs to be optimized to fmincon, and you cannot directly return two outputs from fmincon. What y...

4 years ago | 0

Answered
How to convert an image into bytes that i can then packet up to 512 bytes?
function [I] = photo(i) %i is the image file name A = imread(i); I = reshape(typecast(A, 'uint8'), [], 1); l...

4 years ago | 0

Answered
An error occurred when calculating the correlation coefficient using "reduce_data_points" for two sets of data. Thanks for all the corrections.
[x_new,X_new] = reduce_data_points(x,X,d); Your x and X are different sizes. The first parameter needs to be no longer than the...

4 years ago | 0

Answered
I need help with a Fill a figure with 1 and 0
Your x values start at r1 = 30 and go down from there, as far as -15. In each case, x ~= 100 is true, so there is never a reason...

4 years ago | 0

Answered
How do you solve a matrix after setting a variable thats a part of it to a number?
syms x L0 = [1 0; 0 -1] Rtheta = [cos(x) -sin(x); sin(x) cos(x)] Rnegtheta = [cos(-x) -sin(-x); sin(-x) cos(-x)] Ltheta = Rt...

4 years ago | 0

Answered
I am having troubles running my Newton Raphson function, it says it is an unrecognized function.
Different directories. The NewtonRaphson_v2 function is directly under Downloads, but the mlx you are executing is in a subdirec...

4 years ago | 0

| accepted

Answered
Loop and sum, pls help!!!!
help for help input help sum help abs

4 years ago | 0

Answered
Vector plot with a discretized data set (x, y, z, vx, vy, vz)
%x y z vx vy vz Data = [ 0.250 0.250 0.125 0.000 4.000 0.000 0.250 0.750 0.1...

4 years ago | 1

| accepted

Answered
How to read and plot the data from csv files of subfolders?
projectdir = 'F:\3-PIV_Experimental_Data\Outlet_110\Data_LaserSheet_D\Data_PIV\5-AverageFilter_VelocitiesExtration\Point_Velocit...

4 years ago | 1

| accepted

Answered
How to create a circle when its center is located (15, 4.5) and its radius is 5?
viscircles([15,4.5], 5) axis equal

4 years ago | 0

Answered
NaN (not a number) problem in my integration
w = zeros(T + 1,1); w is all zero h(i) = 1 - ((eta * c(i))/ w(i)) including when you divide by w(1) w(i) = A * (1- alpha) * ...

4 years ago | 1

Answered
How to extract positive, negative and fraction numbers from string?
Copying to an Answer... turns out that in context the solution was a bit easier than was originally asked about. S = '{(0, 0): ...

4 years ago | 1

| accepted

Answered
Index exceeds the number of array elements. Index must not exceed 0.
datos2= fread(fid,"int8"); What if that returns empty? fid= fopen("D:\Documentos\audioprueba.wav","w"); .wav files do not jus...

4 years ago | 0

Answered
Matlab giving the warning of Exiting fzero!
d1=20; n=10^-11.4; m=2.7; a=0.5; T=1; PsByN_0dB=25; PsByN_0=10.^(PsBy...

4 years ago | 0

| accepted

Answered
I am using genetic algorithm optimization toolbox. i have done evrything i am also getting output and all. but i want is i want the output in particular range.
<https://www.mathworks.com/help/gads/custom-output-function-for-genetic-algorithm.html> If you are using ga() then the above ...

4 years ago | 0

| accepted

Answered
why range of x axis of time is not showing
Because after that your values go to infinity or nan. Automatic selection of plot axes range is based only on the finite coordin...

4 years ago | 0

Answered
Sum of random numbers to certain value for each row in Matlab?
Assign all 3 to each column. For each row, if you have not reached the total for the row yet, determine the columns of the ro...

4 years ago | 0

Answered
Finding a propriate function to fit "U" curve
polyfit degree 4 is not bad

4 years ago | 0

Answered
I HAVE A VECTOR AND I NEED TO INSERT 2 ZEROS BETWEEN EACH ELEMENT FROM THE ORIGINAL VECTOR.
reshape([V;zeros(2,length(V))], 1, [])

4 years ago | 0

Load more