Answered
bug in multiplication operations
Not all integer values that are in range of double precision are exactly representable as doubles. If we look at your constant: ...

3 years ago | 4

| accepted

Answered
Unfamiliar error message from ode45: "Unrecognized function or variable 'packageAsFuncHandle".
More likely than not they have an ode45.m file that's not in the correct location that MATLAB expects it to be. What does this f...

3 years ago | 0

| accepted

Answered
How to rearrange 2x5 matrix while keeping the size the same?
x = [1, 5, 9, 4, 8; 3, 7, 2, 6, 10] y = reshape(x(:), flip(size(x))).' For comparison: expected =[1, 3, 5, 7, 9 ; 2, 4, 6, 8,...

3 years ago | 1

Answered
How to deseasonalize this temperature record?
Try the trenddecomp function or the Find and Remove Trends Live Editor Task.

3 years ago | 0

Answered
A matrix times a vector whose elements are matrix too.
a vector initialvector whose elements are also matrix That doesn't exist in MATLAB, at least not if you want initialvector to b...

3 years ago | 0

Answered
How to do "class " like Python to control equipment
You can create class files in MATLAB. But rather than writing your own VISA interface, if you have a license for Instrument Cont...

3 years ago | 0

Answered
Why do I get "Array indices must be positive integers or logical values"
You use Tm in your code but nowhere do you define it. My suspicion is that you've defined it as a numeric vector like you did Tf...

3 years ago | 0

| accepted

Answered
Non linear fit of y=f[x] where y can have multiple values for a single value of x
Are you trying to fit x and y as functions of a third variable t, which in this case could be the indices of the elements in the...

3 years ago | 1

Answered
how to create a cell array with functions from a matrix consisting symbolic expression
Use arrayfun to call matlabFunction on each element of your symbolic array. In order for all the functions to have the same sign...

3 years ago | 1

| accepted

Answered
Read older MATFILE in the current version.
I tried loading the original data using the oldest release of MATLAB I can run and was able to read it. It must have been create...

3 years ago | 0

Answered
I have a problem in the value of a2 becuase I need to change the value of p and se in the same time to have the right array
Can you create and use variables with numbered names like phi1, phi2, phi3, etc.? Yes. Should you do this? The general consensu...

3 years ago | 0

Answered
For loop over permutations of 1:n with very large n
How long does your loop body take to execute? If it's one loop body execution per second, running all 1e18 of those iterations w...

3 years ago | 1

| accepted

Answered
Symbolic eigenvectors returned by eig are incorrect
clc; clear; % Define variables syms U R T E Gamma Ma % Define Jacobian A = [0, 0, R, 0, 0; 0, 0, R*U, 0, 0; T/(Gamma*Ma^...

3 years ago | 1

| accepted

Answered
MATLAB R2013b
Apple Silicon-based Macs do not satisfy the system requirements for release R2013b on Mac. If you made a typo and were asking a...

3 years ago | 0

Answered
Why simulink online cannot run my slx file? is this normal for all users?
Are you using blocks from a third-party blockset or from a blockset not supported for use with Simulink Online?

3 years ago | 0

| accepted

Answered
Make a Truth Table
See the islocalmax function.

3 years ago | 0

Answered
Getting an error using theta
Rhsprob=@ (t,U)[U(2),-32.17/2*sin(theta )] Nowhere in the code you posted before this line do you define a variable named theta...

3 years ago | 0

Answered
Overlaying Surface and Vector Plot
Let me add one more command to the code you posted. a=10; [X,Y]=meshgrid(-1:0.1:1,-1:0.1:1); U=a.*X.*(X.^2 + Y.^2).^(-(3/2));...

3 years ago | 1

Answered
How can we access individual edges in a Graph ?
I'd be careful asking for say "edge 8" because graph and digraph reserve the right to reorder the edges array if you insert or d...

3 years ago | 1

| accepted

Answered
How to compute total links in a Graph?
There are many functions you can call on graph objects, including the numedges function.

3 years ago | 0

| accepted

Answered
First number in foor loop
Don't hard code the first number. Store it in a variable that you can use to define the loop and then to retrieve the starting v...

3 years ago | 0

Answered
Error in interp1 (line 188). VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
So that error is coming from the second of these lines (commented out so that later lines in this answer can run.) % inc=find(~...

3 years ago | 0

| accepted

Answered
how to install Deep Learning Toolbox in MATLAB Runtime
The MATLAB Runtime is not a way to run arbitrary MATLAB code for free. It is used to run applications created by MATLAB Compiler...

3 years ago | 0

Answered
output of two function results
In order to return multiple outputs from a function you need to do two things. Define the function to return two or more output...

3 years ago | 1

Answered
Error in fminunc function line 477
Let's check that you haven't written or downloaded a file that's conflicting with a function provided by MATLAB. What do the fol...

3 years ago | 0

Answered
r2023a offline update wont find install root folder
Try wrapping the directory name in double quotes. j:\r2023a update package\bin\win64\mathworksupdateinstaller.exe --destination...

3 years ago | 0

| accepted

Answered
Compiled matlab function does not recognize 'predict' function from the statistics and machine learning toolbox
How are you creating or obtaining the first input you pass to predict? My suspicion is that you're loading an object from a MAT-...

3 years ago | 0

Answered
builded function converts from polar to rectangular
If this is not a homework assignment use the pol2cart function. If this is a homework assignment show us the code you've writte...

3 years ago | 0

Answered
Set a variable equal to the string of the corresponding season.
BD = (1:12).'; whichMonth = discretize(BD, ... [1 3 6 9 12 12], ... 'categorical', ... ["Winter", "Spring", "Sum...

3 years ago | 1

Answered
'invaudfilt' function to be found?
I find no function by that name in any MathWorks product. Nor does Google find any hits for "MATLAB invaudfilt" after I tell it ...

3 years ago | 0

Load more