Answered
Warning: Matrix is singular to working precision.
See this documentation page for an explanation of the difference between the / and ./ operators.

6 years ago | 1

| accepted

Answered
Unrecognized function or variable
I suspect you copied and pasted what had been typed and/or displayed in the Command Window (including the text that your disp ca...

6 years ago | 0

Answered
change table var type
A = array2table(magic(4)) A.Var1 = string(A.Var1) Though depending what you're trying to do, using discretize or categorical t...

6 years ago | 1

| accepted

Answered
How to stop Matlab from execution when it reaches a certain value for specific variable when I use ode45?
Use an Events function to stop the solver when a particular condition is satisfied at some time not known in advance. If you kno...

6 years ago | 1

Answered
converting table 2 timetable using timeVarName
A = array2table(magic(4)) T = table2timetable(A, 'RowTimes', seconds(A.Var1)) You'd probably want to remove Var1 from T if you...

6 years ago | 0

| accepted

Answered
Executable file with inputs
See this documentation page for information on how to write and call standalone applications that accept input arguments.

6 years ago | 0

Answered
How do you name single output functions?
function result = calculateResult(input) % calculateResult calculates Result ;D end I have some feedback on this. First, the...

6 years ago | 0

Answered
Finding start and end points of a sloped plateau
The islocalmax function or the Find Local Extrema task may be of use to you.

6 years ago | 1

| accepted

Answered
how to find the basis of a null space of matrix in matlab
Take a look at the null function.

6 years ago | 0

| accepted

Answered
How do you name time series / table variables?
My advice is to name the variable that contains your timetable array something that makes sense for your application. If you're ...

6 years ago | 0

| accepted

Answered
Xticks as Days for specific data points
Something along the lines of that code should work if you plotted your data with datetime X data. daysSinceJanuary1st = randi([...

6 years ago | 0

Answered
Why I get wrong in integral function?
fun = @(x) ((x.^3)+x+1)/((x^2)+1)^2; f = integral(fun, 1,6); Because you are using the matrix power operator (^) instead of th...

6 years ago | 0

Answered
[basic class syntax question] how can i fix this code
The add_3 method of the example2 class uses state information from an instance of the class that was passed into it. While Stati...

6 years ago | 1

| accepted

Answered
Normalize data set between 0 and 1
If you're using release R2018a or later, see the normalize function.

6 years ago | 0

Answered
ImageDataStore read issue -- works sometimes, sometimes not
If you try running imread inside a parfor loop rather than at the MATLAB prompt, does it throw an error? I'm wondering if the pa...

6 years ago | 0

Answered
Copy and paste current MATLAB code in another folder
Why are you trying to do this? If you're trying to modify the copy and later run the modified copy, I would instead have the fun...

6 years ago | 0

| accepted

Answered
Performance improvement array of class instances
I would probably create a method of the class that accepts an array of instances of the class and does the extraction / deletion...

6 years ago | 0

Answered
The question about subfigure size and property loop scripts
I would create a function that accepts data (and possibly an axes handle) and performs the necessary setup. The example below re...

6 years ago | 0

Answered
array indices must be positive intergers or logical values - not sure why i am getting this error message. same code worked for a friend of mine.
My guess is that earlier in that code you created variables named sum and/or mean. Attempts to call sum and/or mean while variab...

6 years ago | 0

Answered
List of version number for each ML version including numbered updates?
I'm curious how you would use this information if it was available. If you're planning to use it to ask "Are you using a version...

6 years ago | 1

| accepted

Answered
Does MathWorks have software for rocket trajectory modeling at supersonic speed?
I'd imagine that at least some of the applications described on the MATLAB and Simulink for Space Systems page required modeling...

6 years ago | 0

Answered
How to buy a new toolbox with a subscription running
Please contact Customer Support for official answers to these pricing and licensing questions.

6 years ago | 0

Answered
Loop Computation with i=1:N
What do you expect this code segment to do? sd=rng; phi(i)=normrnd(1,0.15); %G-distribution Draw rng=sd; If you expect ...

6 years ago | 0

Answered
How can i plot this function with factorial?
You haven't shown us what semilap is. If you intended for that to be the expression in lap evaluated at the points in xValues, y...

6 years ago | 0

Answered
How to display the correct output of the product of matrix correctly when i wanted to conver degrees to radians
The fprintf function will iterate through the elements of the second input you pass to it when determining how to fill the forma...

6 years ago | 0

Answered
Giving a moving point a chance to change path every step?
Rather than creating a large number of small line segments, you may want to look at either the animatedline function (and the ad...

6 years ago | 1

Answered
Why do I get Array indices must be positive integers or logical values?
t = [0:tl]; %snip a bunch of code, none of which changes t plot(x(t),y(t)) There's no such thing as element 0 of an array in ...

6 years ago | 0

Answered
How to insert an if conditional in ode45?
Don't use a conditional. Use an events function to detect when the condition occurs, stop the ODE solver, use the result from th...

6 years ago | 1

Answered
About the end used in vector append
% run the following code, there will be wrong % I wanna know why a=[]; a(end+1:2)=[8,9] % a(end+1:2)=[8,9] % wrong, why ...

6 years ago | 1

| accepted

Answered
Expected input number 2, edges, to be one of these types
function [chi2, critical] = chi2test (data, n, alpha, dist, a1, a2) prob = @(a,b) sprintf('cdf(''%s'', b, %10.10g, %10....

6 years ago | 0

| accepted

Load more