Answered
About function in methods of a class
If getRandomMusic is a non-Static method of a class (which I'll call iPod just to have some way to refer to the class) then at l...

6 years ago | 0

| accepted

Answered
Citing MathWorks Documenation (ASCE format)
This Answers post offers some suggestions.

6 years ago | 0

Answered
simple problem with double integral, why give me an error?
The function you pass into simulannealbnd must return a double array not a sym array. Convert the value of the integral into dou...

6 years ago | 0

| accepted

Answered
SOS: How do I get the same amount of positive and negative values in a random vector?
% Generate sample data x = randn(1, 50); y = randn(1, 50); % Determine where positive and negative values occur in each xp...

6 years ago | 0

| accepted

Answered
How to...live script
When you're checking with your calculator, are you taking the sine of x in degrees (for which the corresponding function in MATL...

6 years ago | 0

Answered
How to Display a message in a separate window
If you're using App Designer use uialert. If you're not using App Designer use msgbox.

6 years ago | 0

| accepted

Answered
Undefined function 'mtimes' for input arguments of type 'function_handle'.
You can't multiply a function handle and a number or two function handles. You can multiply the result you get from evaluating ...

6 years ago | 0

| accepted

Answered
Solve (a*B) + (c*D) = E without the Symbolic Toolbox
This is a generalization of Cleve's simplest impossible problem. Cleve's has B = 1/2, D = 1/2, E = 3.

6 years ago | 0

Answered
Add Edges to Network Graph Without Changing the Layout
plot the first graph. Turn hold on. plot the second graph, specifying the XData, YData, and (if plotting the graph in 3D) ZDat...

6 years ago | 1

| accepted

Answered
assign categorical value for weekday variables
Since you have a timetable you can use the isweekend function to get true and false values (which you could convert to categoric...

6 years ago | 0

| accepted

Answered
It shows "Your MATLAB license will expire in 5 days. Please contact your system administrator or MathWorks to renew this license."What to do
As the message suggests, I would contact your system administrator. If you're using your educational institution's license or yo...

6 years ago | 0

Answered
Redistribution of histogram type data in specified bins
>> x = randi(12, 1, 1000); >> h = histogram(x, 0:4:12); % Look at the histogram before running the next line of code >> h.B...

6 years ago | 0

Answered
How to make a list of appearance
histcounts and histogram can handle categorical arrays. names = ["cat" "dog" "cat" "cat" "dog"]; animals = categorical(names);...

6 years ago | 0

Answered
Something is wrong with my Matlab
A = [x x x; x y y; y -2z] b = [60 30 3]' I suspect this is supposed to represent the equations 3*x = 60, x+2*y = 30, y-2*z = 3...

6 years ago | 3

| accepted

Answered
Convert/copy array to different type of array (single to uint16 for example) bit by bit
Are you trying to typecast one of the variables into the other?

6 years ago | 0

| accepted

Answered
Variable from function to change value
What's the purpose of your function? Is it simply to score the set of dice (meaning that it's some other function, perhaps its c...

6 years ago | 0

Answered
Help calling my basic function
That is the correct and documented behavior. See the first Note on this documentation page. You could do this by either creatin...

6 years ago | 1

Answered
Python 3.8 interoperability
The Release Notes for release R2020b indicate that cPython 3.8 is now supported.

6 years ago | 1

Answered
Row unity in matrix
>> P = rand(9); >> NP = normalize(P, 2, 'norm', 1); >> sum(NP, 2) ans = 1 ...

6 years ago | 0

Answered
Index daily values in TT over many years to determine mean
Use groupsummary with the GROUPBINS input specified as "dayofyear".

6 years ago | 1

Answered
Can someone provide me the theory and math behind this function of eigen?
You might find the "Eigenvalues and Singular Values" chapter in Cleve Moler's Numerical Computing with MATLAB, available here, u...

6 years ago | 0

Answered
Can't figure out the error in my pcolor line, keep getting color data input must be a matrix error
Please run this command immediately before the line where you call pcolor and show us the output from just before the pcolor cal...

6 years ago | 0

| accepted

Answered
Error using barrier Objective function is undefined at initial point. Fmincon cannot continue.
What values do you receive when you evaluate your objective function fun at the initial values in the start field of the paramet...

6 years ago | 0

Answered
How to modify an anonymous function with another function
As written, y1sig and y2sig aren't function handles. You could make them function handles like this: f1 = @(d) sind(d); f2 = @...

6 years ago | 0

Answered
How I can correct this error? "Undefined operator '/' for input arguments of type 'function_handle'."
z=@(x) x(1)+x(2)+x(3)+x(4)+x(5); F1=@(x) 19720+(R*T*log(x(1)/z))-x(6)-4*x(7); You can't divide x(1) by the function handle z. ...

6 years ago | 2

| accepted

Answered
specifying the horizontal linetype '_' produces an error.
The horizontal and vertical line markers for plots were introduced in release R2020b. If you're using an older release you will ...

6 years ago | 2

| accepted

Answered
Property access in subclass
As you've defined A and B they are value classes but you're using them like they are handle classes. See this documentation page...

6 years ago | 0

| accepted

Answered
Error using odearguments with a symbolic system of differential equations
Your ODE function can use symbolic calculations internally but it must return a double or single array to the ODE solver. Call d...

6 years ago | 0

| accepted

Answered
I can't find the mistake in the code
I've seen two different conventions for representing polynomials as vectors of coefficients. The one used by functions like poly...

6 years ago | 0

| accepted

Answered
How to extract input variable name when calling to GUI (GUIDE) function?
If you want your app to display the name of the file that was loaded, you should probably have your app accept the filename rath...

6 years ago | 1

Load more