Answered
equation or formula for multiple values to equal a constant
format long g x = [32.06, 34.26, 35.84, 39.2, 44.92, 52.24]; y = repelem(56.68, 1, length(x)); p = polyfit(x, y, 2) To withi...

3 years ago | 0

Answered
how can I display text of zero amplitude with text message
After having found the places that are zeros and storing the x coordinates in List_of_XCoordinates_Of_Zeros then for xcoord = r...

3 years ago | 1

Answered
Why is my "plot" function not working?
The first row has time 00. That is text not numeric. Looking at the left justification it looks to me as if the second column...

3 years ago | 0

Answered
Error while using 'tunefis"
You are using readtable. When you use () indexing on a table object the result is a table object. Use {} indexing or use dot ind...

3 years ago | 1

| accepted

Answered
Problem with integration using sym in case of "sym is not convertible to double"
One or more of the things that look like variables in your expression are symbolic functions. You should invoke each of the symb...

3 years ago | 1

Answered
How can I solve this error xdot = A*x + B*u; y = C*x + D*u; Incorrect dimensions for matrix multiplication A*x
Your A is 6x6. Your x is 4x1. You cannot matrix multiply the two. Your A should have (number of outputs) rows and (number of ...

3 years ago | 0

Answered
Conversion to double from optim.problemdef.OptimizationExpression is not possible
https://www.mathworks.com/help/optim/ug/fcn2optimexpr.html#mw_7959222a-434e-46eb-aec3-fe7942326891 I am not sure if you will ...

3 years ago | 0

Answered
How can I convert cell to a timetable?
times = datetime(YourCell{:,4}, 'InputFormat', "yyyy-MM-dd'T'hh:mm:ss'Z'", 'TimeZone', 'GMT'); data = table2timetable(cell2tabl...

3 years ago | 1

| accepted

Answered
Finding the indexes of multiple substrings within a larger string.
c = 'a91bb48353' mask = ismember(c, '0':'9'); odd_pair = find(mask(1:2:end-1) & mask(2:2:end)) * 2 - 1 even_pair = find(mask(...

3 years ago | 1

Answered
measure the distance between two object
If you want the "real-world" distance, then you will either need to know the resolution of the pixels, or else you will need to ...

3 years ago | 0

Answered
Symsum function with odd number and infinity upper limit
Pi = sym(pi); syms D x y kh kx ky syms q Q q = 2*Q - 1; expression = (((-1)^((q-1)/2)/(q*(D)^2)))*((cosh(D*x/kx)/cosh(D))-...

3 years ago | 0

Answered
Getting an error "Error using erfc... Input must be real and full"
if a is negative and t is positive then sqrt(a*t) is square root of a negative value which is imaginary. You end up taking erfc ...

3 years ago | 0

Answered
Need to test the validity of an application handle
Isvalid would do the trick, but it's not available in 2022b. isvalid with lower-case I has been available since at least 2006.

3 years ago | 0

Answered
Why do I get the error message "Unrecognized function or variable 'sim'" in my Standalone Excecutable
You need Simulink Compiler; https://www.mathworks.com/products/simulink-compiler.html

3 years ago | 1

| accepted

Answered
Failed to create file modification time character vector
The file is probably corrupted; see https://www.mathworks.com/matlabcentral/answers/1859293-imfinfo-doesnt-work-in-r2022b-it-s-b...

3 years ago | 0

Answered
How to fix the compilation problem?
This is a security concern. See https://www.mathworks.com/matlabcentral/answers/813140-confusing-warning-during-compilation-warn...

3 years ago | 0

| accepted

Answered
How to input exponentials in transfer functions using Simulink?
If this must be implemented as transfer functions then you will need to copy the transfer function block several times, set the ...

3 years ago | 0

Answered
Save multiple variables into single -Ascii File with different column of [x:y:z]
out = [SSS, Lat, Lon]; save('20150131.asc', 'out', '-ascii')

3 years ago | 0

Answered
recalculation with different rsult respect to previous one
This can happen for a couple of different reasons: if the calculations involve random numbers. The random number use might not ...

3 years ago | 0

Answered
what is the unit of amplitude in matlab simulink?
The unit of magnitude for sine wave in Simulink is the "Finagle" . https://wiki.c2.com/?FinaglesVariableConstant

3 years ago | 0

Answered
How do I fix the error of arrays having incompatible sizes?
Yes, you need to loop over KC values. Your ndt is a vector with values calculated in terms of KC. And that means that X(1:floo...

3 years ago | 1

Answered
Please help with fsolve, i keep getting this error
Your posted code has Q0 = [120;21;24;23]; which is fine. But your error message is from running some other code -- code that...

3 years ago | 0

Answered
Error while creating fitness function
It looks to me as if you ran the function by pressing the green Run button. But possibly there is a place in SparrowSearchAlgori...

3 years ago | 0

Answered
pass input arguments of built in function as cell array or structure?
feval('plot', S{:}) feval does not support passing in any kind of structured input . Most functions do not support providing s...

3 years ago | 0

| accepted

Answered
Why am I getting an error here?
function I = simpson(f,a,b) depth 1 for i = 0:n depth 2 if i==0 || i==n depth 3 elseif mod(i,2)~=0 depth 3 elseif mod(i,...

3 years ago | 0

Answered
How do I plot a prod function in MATLAB?
syms t N ht = 2 * symprod((t-5)/4, t, 1, N) T = 1:10; y = double(subs(ht, N, T)) plot(T, y)

3 years ago | 0

Answered
i don't know code
x=[10 20 30 40 50 60 70]; That is a numeric vector. f(x)=1./(cosd(x)+2*sind(x)).^2; The right-hand side calculates a vector o...

3 years ago | 1

Answered
Coloring string, fprintf seems limited and cprintf is even a thing?
cprintf is a File Exchange contribution. You can install it using the Add-On Explorer. The return value from fprintf() is the n...

3 years ago | 0

Answered
Error: Array indices must be positive integers or logical values. implementing fletcher reeves method
fletcherreeves2([5;5],@(x) x(1)^2-x(1)*x(2)+4*x(2)^2+3*x(1)+2,@(x) [2*x(1)-x(2)+3,-x(1)+8*x(2)],10^-(6)) The third parameter th...

3 years ago | 0

Load more