Answered
How to sort table more than one variable with specified condition ?
See the "Sort Rows of Table by Variables" example on the documentation page for the sortrows function.

2 years ago | 0

Answered
Can't get matrix to populate first column
The smallest value in z is 1. Because you add 1 to z to generate z1, that means the smallest value in z1 is 2. You use z1 to det...

2 years ago | 0

Answered
description of highlighted code
From the variable names and the signature, this looks like a function you wrote or were given as part of solving a system of ODE...

2 years ago | 0

Answered
Possible to iterate over table rows without a loop index variable?
To perform an operation on all rows of a table array you could use rowfun, but that isn't the same as writing a general for loop...

2 years ago | 0

| accepted

Answered
pcregistericp using GPU Support
Note that "GPU Code Generation" and "GPU Arrays" are two different Extended Capabilities. For example, in MATLAB there are 200 f...

2 years ago | 1

| accepted

Answered
ode45 invalid parameter 981/100
When you call odeFunction with g as part of the third input, it is not a symbolic variable. You originally defined it using syms...

2 years ago | 0

| accepted

Answered
I need to Fix an Error For Lines 34 & 126
Let's look at your cal_obj function. function z = cal_obj(A,B,MB) n = length(MB); z = 0; for i = 1:n z = z + B(MB(i))*A(i);...

2 years ago | 0

Answered
I get an error using fsolve but I don't understand why?
Look at the description of the fun input argument on the documentation page for the fsolve function. The relevant part of that d...

2 years ago | 0

| accepted

Answered
Problem with solve() and "Empty sym: 0-by-1".
Let's look at the systems of equations you're trying to solve. Ax = [0 1 0 0; 0 -0.1 0 0.8; 0 0 -4 9; -1 -9 2 -8]; Bx = [0 0 0...

2 years ago | 1

Answered
Error using fclose in MATLAB on Mac: "Invalid file identifier. Use fopen to generate a valid file identifier.
When you call fopen you should call it with two output arguments and check if the first is -1. If it is, that means MATLAB and/o...

2 years ago | 0

Answered
how do I get my license number?
See this Answers post for instructions on how to determine your license number either from within MATLAB or without having MATLA...

2 years ago | 1

Answered
I have a code in python and want to convert it in matlab format
Do you need to convert the code or would being able to run the code in MATLAB be sufficient? If the latter, see the documentatio...

2 years ago | 0

Answered
How to Get one Property of a Structure Array Using a Property on the Same Line
You could do what you described by making a non-scalar struct, each element of which has three fields, each of which has a piece...

2 years ago | 0

Answered
How to extract numerator and denominator coeficients from polynomial function to array
Do you have separate symbolic expressions for the numerator and denominator or do you have the fraction created by dividing nume...

2 years ago | 1

Answered
Error in matlab.internal.doc.csh.DocPageTopicMap/parseTopicPath
Likely you've written your own split.m function that takes precedence over the split function included in MATLAB. What does this...

2 years ago | 0

| accepted

Answered
Trouble labeling x and y axis
Do you have a variable named xlabel in the workspace? If you do, you cannot call the xlabel function. Clear or rename the variab...

2 years ago | 0

Answered
Maximum recursion limit is reached when I try to open any script
Did you create an open.m file that tries to call open? What does this command show? which -all open

2 years ago | 0

Answered
convert a range vector of bin centers to bin edges. Bin Centers and edges are non-uniform
If you know one of the edges of the region you're trying to bin, either the left-most or right-most edge, you can do this. Let's...

2 years ago | 0

Answered
How to Fix "Warning: Colon operands must be real scalars" Warning
If you have a small case with which you can reproduce this behavior, could you please send it to Technical Support directly usin...

2 years ago | 0

Answered
How to open a directory in Matlab ? Like how do I make the code open a directory ?
I've copied and pasted your code commented out into this message so I can run some sections of code I wrote. This line: %{ % ...

2 years ago | 0

Answered
Optimization toolbox installed, but MATLAB says it has been removed
The Optimization Tool interface (optimtool) was removed in release R2021a. The Optimization Toolbox has not been removed. Inste...

2 years ago | 0

Answered
how to multiply every single element in a matrix to entire of another matrix?
If you're asking can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes. Should you do this? The g...

2 years ago | 2

Answered
is there a way to make the 0 x and y axis bold?
If you wanted to highlight the X and Y axes by making them cross at the origin, set the XAxisLocation and YAxisLocation properti...

2 years ago | 0

Answered
Wrong suming output in simulink r2023A
I don't work with Simulink that much, but I'd check the data types of the various signals in your code. 106 - (-150) The fact ...

2 years ago | 0

Answered
Subtracting a Vector from a Scalar-Multiplied Matrix
See this documentation page.

2 years ago | 1

| accepted

Answered
Unrecognized method, property, or field 'updateGraph' for class 'app1'.
Your updateGraph function is nested inside your UIAxesButtonDown method. So it's not a method of the class. Move the updateGrap...

2 years ago | 0

Answered
Number of counts in matrix
Use histcounts with unique (or uniquetol) to generate the bins. You will need to add one more bin at the end since the last bin ...

2 years ago | 0

Answered
Download of addons & update are blocked by company firewall
I am not 100% certain but I believe Add-Ons Manager and the Update installer need to connect to the same servers as the MathWork...

2 years ago | 0

Answered
Parse error at x
If all of the code you posted is in the same file, the line where you define the initial value occurs after the end keyword that...

2 years ago | 1

Answered
Generate 3D histogram while capping the height of bars
Rather than trying to make hist3 or histogram2 truncate the bins, consider using zlim to control the limits of the Z axis. x = ...

2 years ago | 0

Load more