Answered
can someone tell me what is the problem in this code?
Your code builds something that is 2x2. Which would be fine if your inputs were each scalars. But your inputs are not scalars. Y...

3 years ago | 0

Answered
In this code, how can I add a time function for how long it takes to draw the graph?
You could add tic before the plot() and drawnow(); toc after the title()... But really you cannot measure it. Once the graph ...

3 years ago | 0

Answered
Help me convert this Equation
x^1/3 means (x^1) divided by 3 which is x/3 . If you want to raise to the power of 1/3 you need x^(1/3) Watch out for ^1/6 for ...

3 years ago | 1

Answered
How to convert sym formula to an array
num = sym2poly(num, s); However you would end up with symbolic K in num and tf() cannot accept symbolic variables. It is no...

3 years ago | 1

Answered
How to find the largest length of a cell array?
max(cellfun(@length, YourCell))

3 years ago | 2

| accepted

Answered
Is it possible to create a transfer function in Matlab with unknown constants
No. What is possible is to create control systems with tunable parameters. A tunable parameter always has a specific value at...

3 years ago | 0

Answered
How many instances of MATLAB can I run simultaneously on Windows/Linux platform ?
On Linux the maximum number of MATLAB processes is 2^22 minus the number of other processes in use. You are almost certain to...

3 years ago | 2

Answered
How can I move the Matlab license from old PC with WIndows 7 to a new one?
Yes. If it is a Student license or Home license then you might need to deactivate it on the old machine before installing it ...

3 years ago | 0

Answered
Multivariate Normal Distribution : Error using mvnpdf (line 67)
mvnpdf does not accept cell for any parameters. mvnpdf does not accept a series of different mu with the intention of evaluat...

3 years ago | 0

Answered
How to get the indices based on month and year?
You can use timerange But if you want to group by month, then typically it is easier to do something like take [y, m] = ymd(D...

3 years ago | 0

Answered
How to Use MatLab for Lean Six Sigma Continuous Improvement (DMAIC)?
https://www.mathworks.com/help/stats/improve-an-engine-cooling-fan-using-design-for-six-sigma-techniques.html https://www.math...

3 years ago | 0

Answered
Error Unrecognized property 'L' for class 'patchMicrostrip'.
There is still an error in the below because I could not figure out what property Z might be intended to represent. freq = 10e...

3 years ago | 0

Answered
Genetic Algorithm output is different than manual calculation
S=1000000*exp(0.000005*t).*sin(2*pi*5000*t.^2); Consider sin(2*pi*5000*t): that would be a sine wave with frequency 5000 cycles...

3 years ago | 1

Answered
Text file spacing values so they start at the same point on each new line
There are three strategies: when you are using numeric or text columns whose width differs by no more than 7, then use the tab ...

3 years ago | 0

| accepted

Answered
How to filter multiple columns with conditions
row_is_selected = ismember(VD.Veh1Type, [630 640]) & ismember(VD.Veh2Type, [630 640]); subset = DV(row_is_selected, :);

3 years ago | 0

| accepted

Answered
integral method gives an answer of zero
The values are so small relative to your constants that they might as well be zero. With your beta being 1/(k*t) you are ending...

3 years ago | 1

| accepted

Answered
Curve fitting the data series
This takes too long to execute online, but I pasted in the results. data = readmatrix('test_Rac.xlsx'); D1 = data(:,1); D2 = d...

3 years ago | 0

Answered
Handling errors in parfeval processes
You can potentially use try/catch to control errors on the workers. If there is an error then the hidden property OutputArgumen...

3 years ago | 1

| accepted

Answered
how to make discrete inputs to multi-objective optimazation?
Use integers constrained from -1 to +2 and multiply by 45.

3 years ago | 1

Answered
Does the radon and iradon built in functions use the center as the reference for the projections?
No, the center is not used; see the algorithm at https://www.mathworks.com/help/images/ref/radon.html#f6-466342 which has a diag...

3 years ago | 1

Answered
How can I integrate this function?
Assuming the the posted formula is correct in having the exp() raised as an exponent to the (r/2KB) then: Because you want to i...

3 years ago | 0

Answered
Unable to classify the variable 'feq' in the body of the parfor-loop
initializing feq before the parfor loop implies that you expect feq to be an output, that you expect to be able to access feq af...

3 years ago | 0

Answered
can I write my own boolean algebra function where I specifically write the output of every input combination?
CATEGORIES = categorical({'OFF', 'MEDIUM', 'ON'}, {'OFF', 'MEDIUM', 'ON'}) OFF = CATEGORIES(1); MEDIUM = CATEGORIES(2); ON = CA...

3 years ago | 0

Answered
Plotting a high frequency sine
Pi = sym(pi); syms t real y = ((-36/(Pi^2))*sin(2*Pi*10^3*t)) - ((28/(9*Pi^2))*sin(2*Pi*3*10^3*t))-((4/(5*Pi^2))*sin(2*Pi*5*1...

3 years ago | 0

Answered
I am trying to plot the first 2 dimensions of a 3d matrix with respect to the third.
%code to get SOME 3D matrix imloc = fileparts(which('AT3_1m4_01.tif')); dinfo = dir(fullfile(imloc, 'AT3_1m4_*.tif')); filena...

3 years ago | 0

Answered
How to convert value to the closest value from a given table ?
x = sort(randi([1 500], 10, 1)) bins = [10 12 15 20 40 100 200 300 400 500]; bins(discretize(x, [-inf bins]))

3 years ago | 3

Answered
Extra variable in differential equation's symbolic solution
Notice that the z occurs within the context of a call to root In the Symbolic Toolbox, root(EXPRESSION,VARIABLE) is a placehold...

3 years ago | 1

| accepted

Answered
In Matlab, how can I run 2 separate programs simultaneously, each turned on and off by separate buttons.
WIth relatively new versions of MATLAB, you might be able to take advantage of backgroundPool and parfeval the functions. parfev...

3 years ago | 0

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
out = fscanf(s) That could return 0 or more characters. temperature(i) = str2num(out(1:4)); Your code assumes that at le...

3 years ago | 0

Answered
Can I install my license in iPad Pro
No. MATLAB is not supported on iOS, even if you use the M1 beta version of MATLAB.

3 years ago | 0

Load more