Answered
How to pick a value according to its probability
You can use discretize (which didn't exist when this question was asked originally) to do this. Generate uniform random numbers,...

6 years ago | 1

Answered
Number of license ??
Please contact your university's IT staff. Assuming the university has a license for MATLAB, they should be able to help you dow...

6 years ago | 0

Answered
Sortrow on certain elements within array
You could use sortrows, but another approach would be to turn the date and time information stored in the filenames into a datet...

6 years ago | 0

Answered
Near sighted pirate while loop?
In addition to keeping track of the pirate's position left or right of the center of the dock you need to keep track of how far ...

6 years ago | 0

| accepted

Answered
Out of memory error when working with small matrices
Can you confirm that you haven't created or downloaded your own eig.m and chol.m that's taking precedent over the built-in eig a...

6 years ago | 1

Answered
says unused value , consider it by replacing it by~, how do I fix it ?
Rather than assuming that solve returns the variables in the order you think it does (since you haven't specified the order, it ...

6 years ago | 0

Answered
Modifying colourmap to suit needs
Just flip the colormap. figure peaks colorbar colormap gray % effectively equivalent, due to how colormap works, to colormap...

6 years ago | 0

Answered
alternative rounding method when using histcounts
If a value in your data exactly matches one of the elements of the edges vector, that value is counted in the right bin of the t...

6 years ago | 0

Answered
some quetions about ode45
1.in following code,what‘s the effect of symbol '[ ]'? why must use it? [t,uvtsol]=ode45('wave1D',t1,u0,[],N,k,a); That's an ...

6 years ago | 1

| accepted

Answered
Why R2018a and 2019b give different results for cosine (cosd) function?
I suspect the answer was changed by the fix for bug 1839169.

6 years ago | 0

| accepted

Answered
addEntityDetails() available on matlab 2018b?
The documentation page for the addEntityDetails method for tokenizedDocument objects indicate it was introduced in Text Analytic...

6 years ago | 0

| accepted

Answered
polt a polygon made up for four points
See the polyshape function.

6 years ago | 0

Answered
I got a code from my professor as an answer to one of our recitation problems and I am trying to decipher it.
See the Description section on the documentation page for the for keyword. The array over which for iterates can be defined as a...

6 years ago | 0

Answered
Field name with integer value
Depending on what data you're trying to store in this struct, storing the data as variables in a table array (using release R201...

6 years ago | 0

| accepted

Answered
what is substitution for fscmrmr in MATLAB R2016a?
This function was introduced in Statistics and Machine Learning Toolbox in release R2019b according to the note at the end of it...

6 years ago | 0

Answered
using loops to play blackjack
Coding the cards so the aces are 1:4 and the tens are 5:20 is okay, but we can get closer to the actual game with our simulator....

6 years ago | 1

Answered
Determine Matrix Operation Memory Usage
Does MATLAB crash or does it throw an error? Those are two very different things. Crash: MATLAB shows a crash log file with a l...

6 years ago | 0

Answered
When opening a 2020a app-designer file in 2018a all the element have been deleted
At least some of the functionality you are using in the release R2020a version of the app (specifically the grid layout function...

6 years ago | 0

| accepted

Answered
How to allow same function name to be used various ways?
You can customize completions for the functions you've written if you're using release R2018a or later.

6 years ago | 0

Answered
Can i add heaviside step function in Matlab runtime library?
Are you trying to call the heaviside function in Symbolic Math Toolbox? Nothing in Symbolic Math Toolbox is supported for use wi...

6 years ago | 0

| accepted

Answered
Creating variables based on number of columns?
How can I in my script create varibles for each column, and have it be expandable? CAN you do this? Yes. SHOULD you do this? NO...

6 years ago | 1

| accepted

Answered
Every time I start MATLAB I receive: 'Attempt to execute SCRIPT path as a function'
Rename or remove the file C:\Program Files\MATLAB\R2020a\path.m. It is preventing MATLAB from calling the path function included...

6 years ago | 1

Answered
Plotting time/date on surf or mesh plot
surf can handle datetime and duration data. Let's create some sample datetime data and use that to compute a duration. [d1, d2]...

6 years ago | 1

| accepted

Answered
Complex number when using variables
That's correct. The unary minus operator (before 50.8478) is at precedence level 4. The matrix power operator with unary minus (...

6 years ago | 1

| accepted

Answered
Is it better to generate a plot from a spreadsheet or enter it directly into MatLab?
There's no tutorial that covers creating a plot specifically like that, but there are tutorials for some of the pieces that you'...

6 years ago | 0

| accepted

Answered
Want to solve for x
Call double or vpa on the output of solve.

6 years ago | 0

Answered
Maximum variable size allowed by the program is exceeded.
You can't. The output of perms(x) has factorial(n) rows, where n is the number of elements in x. How big is that? >> x1=250:.0...

6 years ago | 0

| accepted

Answered
Create a matrix with multiple values at each element and apply a function to all?
If all the binary operations in your f function support implicit expansion (which is the case for your sample f, as plus support...

6 years ago | 1

| accepted

Answered
Alternatives to plot3.
If you have scattered data (your depth and time data doesn't form a regular grid) use griddata or scatteredInterpolant to grid y...

6 years ago | 0

| accepted

Answered
Throw Error in TimerFcn
This is not going to work as you've written it. Imagine if the timer's StartDelay was 60 seconds and the body of your try block...

6 years ago | 0

| accepted

Load more