Answered
forming a function handles in matrix
MATLAB used to allow nonscalar arrays of function handles, but that functionality was removed probably 10 to 15 years ago. As th...

5 years ago | 0

Answered
Problem creating a cash register function
Every time through your while loop you overwrite the value of the change variable with the contents of the total variable. Neith...

5 years ago | 0

Answered
Array indices must be positive integers or logical values.
In the last line of your for loop: (Lambda_1(1-exp(-1*Lambda_0*t(i)))-Lambda_0(1-exp(-1*Lambda_1*t(i)))) It's very unlikely 1-...

5 years ago | 1

| accepted

Answered
Can histogram bin edges and width be specified for the same histogram?
The edges input is not required to be a uniformly spaced vector. x = rand(1, 1e5); E = [0 2.^(-5:0)]; h = histogram(x, E, 'No...

5 years ago | 0

| accepted

Answered
How to read a very large number, say of 700 digits?
Your 700 digit number is too large to fit in double precision. The largest finite double precision number doesn't have that many...

5 years ago | 0

Answered
How Do I compare classes without having an error
Either use isequal or (especially if class hierarchies are involved) use isa. x = 5; y = int8(3); z = 42; f = figure; isequ...

5 years ago | 0

Answered
Error loading files after compiling an app in AppDesigner
[file, path] = uigetfile('*.nii'); disp(['User selected ', fullfile(path, file)]); app.nifti = niftiread(file); You ask the u...

5 years ago | 0

Answered
solve a set of two linear equations
If this isn't a homework assignment, use fsolve from Optimization Toolbox. If this is a homework assignment, check your textboo...

5 years ago | 0

Answered
I want an old Matlab Webinar on GPS Receiver
Do you mean this book, published in 2007? A lot has changed in the past fourteen years: many (most?) of the products whose docum...

5 years ago | 0

Answered
how to remove error"Conversion to logical from sym is not possible."?
This doesn't do what you probably think it does or want it to do. p<= tol >=t This is the same as: (p<= tol) >=t which wou...

5 years ago | 0

| accepted

Answered
SelectionType of Mousebutton is empty
Likely your figHandle variable is empty. If you're looking to determine how the mouse button was pressed _in your app window_ wh...

5 years ago | 0

| accepted

Answered
A figure created in script "x" is being automatically deleted (didn't used to) when script "x" calls another script.
The GUI that deletes the figure probably calls close. You can protect the figure against closing somewhat by changing its Handle...

5 years ago | 0

Answered
Showing that Newtons method is quadratic convergent in Matlab
Before you implement this in code, how would you implement Newton's method (with error data collection, to assess convergence) i...

5 years ago | 0

Answered
Stop Bit growth for power computation
If you want to saturate one way you can do this is to use integer arithmetic. b = int32(-97) C = power(b, 28) Alternately you...

5 years ago | 1

Answered
i cannot find all x values from abs(x) using solve() function
Tell solve to show you the parameterized solution and the conditions that those parameters need to satisfy in order for the para...

5 years ago | 2

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

Load more