Answered
Why does my function handle change to a vector when I pass it to another function?
f_pe turns into a 1x150 double vector, No it doesn't. If it did I'm guessing your result function handle would throw an error w...

5 years ago | 1

| accepted

Answered
Finding sum of intersecting area of many circles
Make polyshape objects, one for each circle. You can then intersect, union, etc. those objects.

5 years ago | 0

| accepted

Answered
Class-based Unit Tests: Running Specific Methods
While runtests would be my first choice, you could also create a matlab.unittest.TestSuite object and either use a selector in t...

5 years ago | 0

Answered
How to check if a symbolic function is positive or negative?
MATLAB is unable to prove that y is always greater than or equal to 0 because y is not always greater than or equal to 0. Here i...

5 years ago | 0

| accepted

Answered
How to use the sum function on a matrix to get the sum of the rows not the columns
Use the dim input argument. See the third example titled "Sum of Matrix Rows" on the documentation page.

5 years ago | 1

| accepted

Answered
How to create variable names and then declare them as global in a function
Consider using a struct array. This can encapsulate the related data into one variable that can be easily passed into functions....

5 years ago | 0

Answered
zoom(app.UIAxes, 'on') is generating "Function 'subsindex' is not defined for values of class 'matlab.ui.control.UIAxes' " error in 2017a
Rename the variable named zoom that you've created. While that variable exists you will be unable to call the zoom function.

5 years ago | 1

| accepted

Answered
Storing an unknown number of variables on disk individually
See if some of the tools and techniques described in the Large Files and Big Data chapter in the documentation will meet your ne...

5 years ago | 1

| accepted

Answered
Rank(ab)
Do you mean you want to augment the matrix a with the vector b? A = [1 2 3; 4 5 6; 7 8 9] b = [10; 11; 12] Ab = [A, b]

5 years ago | 1

Answered
when i install R2021 i have got a massage "Something Unexpected Occurred". how i resolve? please
You probably should contact Technical Support and work with the Support staff to determine what happened and how to avoid the er...

5 years ago | 0

Answered
Summation for every hour from a timetable
retime your timetable, either using the "Retime Timetable" Live Editor Task (see the Aggregate Data section of the example, you'...

5 years ago | 0

| accepted

Answered
How to normalize a matrix?
Use the normalize function.

5 years ago | 1

Answered
Filling incomplete data with cftool
Do you want to remove the NaN values with |rmmissing|, fill them using |fillmissing|, or do something else with them (and if so ...

5 years ago | 0

Answered
Question about sorting an array column by column
Specify the dim input argument to the sort function. A = magic(5) B = sort(A, 1) % Compare with C = sort(A, 2) If you want ...

5 years ago | 0

Answered
5D Data with scatter3?
It is possible to plot with five arrays: [x, y, z] = peaks; s = 10*(x.^2 + y.^2 + 1); c = abs(z); scatter3(x(:), y(:), z(:),...

5 years ago | 1

| accepted

Answered
R2021b: The Run Section tool in the Editor has been removed
I believe that entry in the Release Notes could use a set of quotes around the name of the tool. There was a tool that would let...

5 years ago | 0

Answered
Why the pushbutton does not work?
MATLAB is behaving correctly. You create the pushbutton and give it a callback and then immediately exit from the function in wh...

5 years ago | 0

Answered
Multiply matrix with previous result
Use a matrix to store the population at each year, not a vector. M = [0 0 2; 0.25 0 0; 0 0.52 0.73]; x_k = [24; 15; 28]; popu...

5 years ago | 0

| accepted

Answered
How to reduce computation time with 8 nested for loop
a1=a1(a2,a3,a4,b1,b2,b3,b4); B1=B1(a1,a3,a4,b1,b3,b4); ...

5 years ago | 0

Answered
Creat 1000 different matrix
Can you define variables with numbered names like C1, C2, C3, ... ? Yes. Should you do this? Generally we recommend against it....

5 years ago | 1

| accepted

Answered
mex error for path names with spaces
Wrap all the text inputs that can contain spaces in single quotes. disp 'Hello world!' % Equivalent of disp('Hello world!') fp...

5 years ago | 1

Answered
How can i perform indefinite integral in script?
The integral function requires its first input to be a function handle. If you're trying to integrate a numeric set of data, see...

5 years ago | 0

Answered
How to view the source code of "Delaunay" function?
which -all delaunay We do not distribute the source code for functions that are built into MATLAB like delaunay. If you want to...

5 years ago | 0

Answered
How to reshape data long version table in MATLAB into wide version table for more in deep repeated measures statistical analysis?
It's not completely clear to me what you want your "wide version" of that table to look like, but I suspect the stack and/or uns...

5 years ago | 0

| accepted

Answered
who to write this function in another way?
Try using the discretize function.

5 years ago | 0

Answered
I need a function or equivalent code fgetl, but it is very fast.
Are you sure that fgetl is what's taking the time? Or are you trying to read data one line at a time from a file and storing eac...

5 years ago | 0

Answered
Separate date and time
dt = datetime('now') % Sample data theTime = timeofday(dt) theDate = dt - theTime % or theDate2 = dateshift(dt, 'start', 'day...

5 years ago | 2

Answered
Look for string in table and return a number in the same row different column
I'd probably use matches for text data (and the normal relational operators for numeric data.) load patients P = table(LastNam...

5 years ago | 0

| accepted

Answered
Invalid expression error when I try to introduce new variable.
It's likely (in the absence of nested functions) that the statement on line 407 is not inside any function. The end on line 405 ...

5 years ago | 0

Answered
Install a toolbox from command line?
I would probably use the silent installation process.

5 years ago | 0

Load more