Answered
Creating legend based on numeric array
If you're using a newer release of MATLAB, I'd use a string array to create the legend. N = [1 7 14 30 90 180 360]; x = linspa...

6 years ago | 9

Answered
letting an object name itself
With the clarifications you gave I now have enough information to make some suggestions that may resolve the question, so I'm ma...

6 years ago | 1

| accepted

Answered
Error creating matrix using a integer and vector in Matlab
madhan ravi has told you how to do this but I want to explain why your original approach didn't work. If x is a column vector w...

6 years ago | 0

Answered
Why is there no one to help me?
Count your parentheses. If you start a counter at 0, add 1 to the counter every time you see a (, and subtract 1 from the counte...

6 years ago | 2

| accepted

Answered
How do I increment "I" more than once in more than one range in a single for loop? Basically combine all for loops into a single loop with different "I" values.
for k = [1:9 10:10:90 100:100:1000] fprintf("The current value of k is " + k + newline) end

6 years ago | 0

Answered
The end operator must be used within an array index expression
The identifiers shot (all lower-case) and Shot (first letter capitalized) are two different things in MATLAB. Did you mean to in...

6 years ago | 1

| accepted

Answered
Remove legend from patches in Matlab
Specify the handles of the objects that you want to see in the legend when you create it. x = 0:360; axis([0 360 -1 1]) hold ...

6 years ago | 0

Answered
Why the results are different every time using the code of Nonnegative matrix factorization ?
From the documentation page for the nnmf function: "The factorization uses an iterative method starting with random initial valu...

6 years ago | 0

Answered
Plot shows no line, only markers
Do your time and/or data vectors contain NaN values? any(isnan(time1)) any(isnan(time2)) any(isnan(data1)) any(isnan(data2))...

6 years ago | 0

Answered
Worldwide statistics on use of Matlab products
This page states "The tools used at more than 6500 universities worldwide." You may find the company fact sheet interesting. W...

6 years ago | 0

Answered
Matlab 5.2
Are you asking if you can run MATLAB 5.2 using that license? Possibly if you can find an old machine. The System Requirements fo...

6 years ago | 0

Answered
code analyzer bar not indicating syntax errors
There are some problems that Code Analyzer's static analysis can detect, but a misspelled function name is not always something ...

6 years ago | 0

| accepted

Answered
fmincon and optimization with a symbolic matrix
The function is optimoptions (plural) not optimoption (singular).

6 years ago | 0

| accepted

Answered
hold on does not work
Can you confirm that you're calling the hold function included in MATLAB and not a different hold.m that you've written and/or d...

6 years ago | 0

Answered
How to plot histogram where the data is the height
histogram('BinEdges', [0 1 2], 'BinCounts', [107 55])

6 years ago | 0

Answered
working with missing table data
Calling scatter on data stored in a table array is possible. You just need to extract the data from the table rather than trying...

6 years ago | 0

| accepted

Answered
Unrecognized function or variable 'typeof'
You have downloaded or written an isa function that is shadowing (taking precedence over) the built-in isa function. Locate that...

6 years ago | 0

| accepted

Answered
Is Simscape available with student/campus license?
Looking at the online store (by clicking the "Buy Now" button on this page) I see that Simscape is listed as an available add-on...

6 years ago | 0

Answered
Solve equations by fsolve and with input anonymous function format
fun = @(x,y) [x+y^2-5, 6*x^2+13*y-5] Since fsolve requires the function you pass into it to accept one input, a vector, you nee...

6 years ago | 1

| accepted

Answered
Writing a function, when each argument is dependent on previous argument while the first argument is known
You start off with L being a matrix but then you turn it into an anonymous function. Which should it be? If it should be a matr...

6 years ago | 0

Answered
coordinates of a point from a matrix
Clear the variable you've defined named find that's preventing you from calling the find function.

6 years ago | 1

| accepted

Answered
calling dependent properties from one class to another
classdef fitFunction methods(Static) function f=fit(objDS) P=[0.456,0.2030] objCore.Matc...

6 years ago | 0

Answered
How to use matlab debugger
Show us the whole stack at which MATLAB is stopped. dbstack You're stopped inside the factorial function that is included with...

6 years ago | 0

Answered
Finding peaks in signal
It doesn't seem like you want to locate peaks (which you could do using the islocalmax function) but you want to remove a trend....

6 years ago | 0

Answered
Error using brace indexing with function hypot
Nowhere in your first section of code do you define a variable named expData. MATLAB doesn't get as far as your hypot call in th...

6 years ago | 0

Answered
How to create a for loop to automatically assign names to colomns from excel data
Consider reading your data into a table array using the readtable function.

6 years ago | 0

Answered
Looking for the Source code of built in function ldl.m
The ldl function is built into MATLAB. It is not implemented as a MATLAB script, function, or class file. We don't distribute it...

6 years ago | 0

Answered
Sizeof error and Z is a scalar/Vector but needs to be matrix
x = 1:10; if any(size(x) < 3) error('x has size less than 3 in at least one of its dimensions.') end Compare: y = magic...

6 years ago | 0

Answered
Find duration of signal
If the empty data points are represented by NaN then find the 'last' 1 element of the vector that isfinite. x = [1:10 NaN(1, 5)...

6 years ago | 0

Answered
Indexing arrays of binned data
Take a look at the groupsummary function. % Include rng default so you generate the exact same random numbers I did rng defaul...

6 years ago | 0

Load more