Answered
Include "star dot" in plot legend.
I am not certain what you want to do. Try this: x = [-1 1 -1 1]; y = [-1 1 1 -1]; x1 = 0; y1 = 0; ...

9 years ago | 0

| accepted

Answered
How to conect camera labtob with matlab
Type *|webcam|* in your Command Window. If you do not have the support package installed, you will get this red error message: ...

9 years ago | 0

Answered
minimizing the distance between the data and model
What you got was not an error. It was the result of the *|fsolve|* optimisation (or parameter estimation or whatever you are do...

9 years ago | 0

Answered
Problems converting a row(1, length) to a column matrix (3x3)
I am not certain what you want to do. Try this: a = 1:8; % Original Vector N = ...

9 years ago | 0

| accepted

Answered
Plotting a red asterisk on a certain point
I am not certain what result you want. Try this: figure (); meshc(x,y,z(x,y)); hold on; plot3(loc(1), loc(2...

9 years ago | 0

| accepted

Answered
How to divide matrix into sub matrix
First, this is easier if you create *|‘time’|* so the length is an integer multiple of *|4|*. Then, creating the cell array...

9 years ago | 0

| accepted

Answered
How to generate a vector whose values are two by two multiplication/sum of elements of other vector
This works, and no explicit loops are necessary: A=[1 2 3]; AA = A' * A; AA = AA(:)' BB = bsxfun(@plus, A...

9 years ago | 1

Answered
Just making sure my 3dplot is as the question is asking
It seems correct to me, and produced the plot I would expect. I would add *|grid on|* at the end to include the grid (personal ...

9 years ago | 0

| accepted

Answered
How to solve a system of three equations with 2 parameters and initial values?
I am *_guessing_* that *|I=x(2)|*. (It would be nice to know for sure.) This is one option: av = 0 : 0.25 : 1; qv...

9 years ago | 0

| accepted

Answered
In a 3D plot, what are the independent and dependent variables?
The first two arguments to *|plot3()|* (usually *|‘X’|* and *|‘Y’|*) are the _independent_ variables. The third (usually *|‘Z’|...

9 years ago | 0

| accepted

Answered
How to summarize a matrix based on unique groups
Try this: A=[1 2 1 4; 5 3 5 7; 6 1 8 9]; [Au, ~, ic] = unique(A([1 2],:)', 'rows'); % Unique Columns R3...

9 years ago | 2

| accepted

Answered
Handle for y axis in a histogram
If you have *|R2014b|* or later, use the <https://www.mathworks.com/help/matlab/ref/histcounts.html *|histcounts|*> (link), or <...

9 years ago | 2

Answered
How do I optimize the inputs to a function?
See <https://www.mathworks.com/matlabcentral/answers/329901-solving-coupled-differential-equations *Solving Coupled Differential...

9 years ago | 0

| accepted

Answered
how to shift origin or graph without changing the data value.
It’s easier to demonstrate if you plot something in all four quadrants. *_Example_ —* x = [-1 1 -1 1]; y = [-1 1 1...

9 years ago | 0

| accepted

Answered
How can I fit linear regression model with the measured data with a known intercept?
You have not stated what *|‘x’|* and *|‘y’|* are in your code. However, knowing that *|‘PL_do’|* is the desired *|y|*-intercept...

9 years ago | 1

| accepted

Answered
How to make this matrix
This is as efficient as I can get get the code to calculate the matrix: v = eomday(2000, (1:12)'); ...

9 years ago | 0

| accepted

Answered
Number of Elements Between 2 Elements in a matrix.
MATLAB uses column-major ordering, so it ‘counts’ elements column-wise, and it is necessary to transpose *|‘M’|* to do what you ...

9 years ago | 0

| accepted

Answered
Randomise List with Repetitions
One approach: Ncols = 10; % Columns In Matrix v = 8*ones(12,Ncols); ...

9 years ago | 0

Answered
How do I decrease the amplitude of frequencies between 200Hz and 2kHz by factor of 10 from a wav file?
Consult the documentation on the <https://www.mathworks.com/help/signal/ref/designfilt.html *|designfilt|*> (link) function. ...

9 years ago | 0

Answered
Calculating frequency of a signal of mixed frequencies - No FFT.
One option is described in: <http://www.mathworks.com/matlabcentral/answers/121579-curve-fitting-to-a-sinusoidal-function *Curve...

9 years ago | 0

| accepted

Answered
Finding the maximum point of a function
Try this: T=600:10:850; t = 1; k1 = 1e7.*exp(-12700./T); k2 = 5e4.*exp(-10800./T); k3 = 7e7.*exp(-15000./T); ...

9 years ago | 0

| accepted

Answered
How to change the last row of a vector to a sum of the vector?
See the documentation on <https://www.mathworks.com/help/matlab/math/matrix-indexing.html *Matrix Indexing*> (link). That shoul...

9 years ago | 0

Answered
Hello guys , please help me ! I
It *_is_* an interpolation, regardless of the method you want to use. There are likely several ways to do this. Using *|in...

9 years ago | 0

Answered
Matrix Multiplication Having Problems
If you want to do *_matrix_* multiplication, you have to transpose the second matrix, *|‘ML’|* to get a *|(2x2)|* result for *|‘...

9 years ago | 0

Answered
Hi i have made a separable differential equation now i want to put values of t at instant, equations are made but i down know how to put value
When you run your code, you create *|‘Asol’|* and *|‘Csol’|* as _functions_. So you only need to give them numeric arguments (h...

9 years ago | 0

Answered
how to fix inner matrix dimensions 3D plot?
You have to do _element-wise_ operations, so replace |/| with |./|, and |*| with |.*| in your *|‘Y_B’|* calculation: Y_B =...

9 years ago | 0

| accepted

Answered
How to write the variables in for loop into the workspace?
They will be in your workspace when you calculate them. My _guess_ is that you want to know how to save them as a vector (o...

9 years ago | 0

| accepted

Answered
unbalanced parenthesis on a problem
*_‘sorry, it is supposed to be 2cos(2pi((f(1)-f(2)/2)t)sin(2pi((f(1)+f(2)/2)t)’_* MATLAB does not recognise implied multiplic...

9 years ago | 0

Answered
How to obtain the fundamental frequency from music instrument?
If you already know the frequencies you want to detect, and you want to find if a particular frequency is present, use the <http...

9 years ago | 0

Answered
Need help running simple equation over vector of data?
You are passing *|‘data’|* as a *|(100x2)|* matrix. You need to refer to the individual *_columns_* of *|‘data’|* in your funct...

9 years ago | 0

| accepted

Load more