Answered
How do I use the strsplit function to split a sentence into a string of letters?
Another option: sentence = 'This is a sentence'; y = num2cell(sentence); % Cell Array Of Le...

8 years ago | 0

Answered
How to use repmat in the textscan()
I lost track of all of that, so I am not going to attempt to code it. This is actually in the documentation for *|textscan|*. ...

8 years ago | 0

Answered
How to plot multiple data sets in the same graph for a common range?
If you want to have the two curves overlap as much as possible, this may work: x_Shift = min(x_Model) - min(x_Exp); ...

8 years ago | 1

| accepted

Answered
Differentiate and store results in matrix
Try this: Density = (0:310)'; % Create Data Temperature = sin((0:310)'*(0:20)*2...

8 years ago | 0

| accepted

Answered
How to solve for a different variable
Try this: syms a e rpark rmoon [Sa,Se] = solve(a == (rmoon*(1+e*cos(-20)))/(1-e^2), a == (rpark*(1-e))/(1-e^2), [a,e])...

8 years ago | 1

| accepted

Answered
How to do a right join based on multiple columns as ID?
This comes close to doing what you want: A=[1 2 3 9 8; 1 2 3 3 12; 1 4 3 11 12; 2 3 4 3 12]; B=[2 3 4 0 0; 1 2 3 9 8; 1...

8 years ago | 0

| accepted

Answered
how can i create figures in a for loop
Try this: repts = fix(numel(Bn)/80); for k1 = 1:repts figure(k1) idxrng = (1:80) + 80*(k1-1); plot...

8 years ago | 1

| accepted

Answered
Automate multiple graph for y values
No loop necessary. MATLAB will plot these correctly for you: x = [1:5]; y = [2 3 5 6 4; 4 5 6 2 10; 13 4 12 10 4]; ...

8 years ago | 0

| accepted

Answered
Plotting the spiral of archimedes?
In your other <https://www.mathworks.com/matlabcentral/answers/426736-how-to-plot-complex-functions-of-phase-and-amplitude#comme...

8 years ago | 0

Answered
How do I do this? I NEED HELP!!!
You need to determine if the characters are sorted. (For homework problems, we give hints.)

8 years ago | 0

Answered
how do I change position index to 'coordinate' index in an array?
The *|find|* function can return both the rows and column indices if you want it to: Second, *|‘p’|* and *|‘P’|* are not...

8 years ago | 0

| accepted

Answered
solving second order differential equations with LaPlace Transforms: getting an error when trying to input an initial condition (R2017b) ("error: untitled line")
The *|laplace|* function does not accept initial conditions (as *|dsolve|* does). I requested this as an enhancement severa...

8 years ago | 1

| accepted

Answered
Not enough input arguments error
Most likely that is due to your using the green *Run* option in the *Editor* rather than calling your function from a script, as...

8 years ago | 0

Answered
How can I flip a row vector without using flip(lr) function?
Reverse the indices: A = [1 2 -3 4]; B = A(numel(A):-1:1) B = 4 -3 2 1

8 years ago | 1

| accepted

Answered
Integral calling another integral
Change your *|‘AD’|* assignment to: AD(age,1)=integral(f_AD,age,106, 'ArrayValued',1);

8 years ago | 0

| accepted

Answered
ode45 and sol structure - different results
If you look separately at *|‘sol.x’|*, it only has *|19|* points. If you want to get all the results from your *|deval|* call, ...

8 years ago | 0

| accepted

Answered
Frequency and periodic analysis
Use the <https://www.mathworks.com/help/ident/index.html *System Identification Toolbox*> (link). First, see the documentat...

8 years ago | 0

Answered
FFT in Matlab to analyze analog accelerometer data
It would help to have at least a representative sample of your data. You can upload it here in a number of formats, a *|‘.txt’|...

8 years ago | 0

Answered
How do I create a new matrix with daily averages given hourly data?
There are several ways. One option: M = [721473 1.920 ... 721474 0.820]; [M1u,~,ix] = un...

8 years ago | 0

| accepted

Answered
Strange "solve" error and undefined "vpasolve"
This may be a path problem. Try typing these either in your Command Window or a script: restoredefaultpath rehash...

8 years ago | 0

| accepted

Answered
I can't fplot(39)
The *|fplot|* function is interpreting *|‘39’|* as a single quote, its ASCII equivalent: chr39 = char(39) chr39 = ...

8 years ago | 1

| accepted

Answered
how can I calculate the matrix?
You can get a *|(9x10)|* matrix by using either vector as a row vector and the other as a column vector: Z=(a(:).^2*100)./...

8 years ago | 0

Answered
how do i make one function that i am able to use trapezoidal rule for integration from this code?
One option: yx = @(x) (0.1553567*(x.^6)-2.0416*(x.^5)+9.1837*(x.^4)-14.829*(x.^3)-1.3703*(x.^2)+32.821*(x)-1.3155).*((x>=0...

8 years ago | 0

Answered
Input value and compare to values in an array
Using the <https://www.mathworks.com/help/matlab/ref/interp1.html *|interp1|*> (link) function: M1=input('What is the Mach...

8 years ago | 1

| accepted

Answered
How to change values of a matrix when subscribts meet a condition
One approach: M = rand(10); for k1 = 1:numel(M) [r,c] = ind2sub(size(M), k1); M(r,c) = 0; M(r,c) =...

8 years ago | 1

| accepted

Answered
How do i set the marker and line commands to accept the symbols as inputs
See if the <https://www.mathworks.com/help/matlab/ref/strcmpi.html *|strcmpi|*> (link) function will do what you want. Thi...

8 years ago | 0

| accepted

Answered
Merge table with different rows
You probably want the <https://www.mathworks.com/help/matlab/ref/outerjoin.html *|outerjoin|*> (link) function: Com = oute...

8 years ago | 2

| accepted

Answered
Matlab plotting and breathing rate
To calculate and plot the continuous wavelet transform of your signal, use the <https://www.mathworks.com/help/wavelet/ref/cwt.h...

8 years ago | 0

| accepted

Answered
How to limit the contour plot with a line plot?
There is likely no way to prevent it from plotting in that region. The next best thing is to use a *|patch|* object to plot a w...

8 years ago | 0

| accepted

Answered
How do I tell if a point is in or on a boundary set by equations
The <https://www.mathworks.com/help/matlab/ref/inpolygon.html *|inpolygon|*> (link) function could be helpful.

8 years ago | 0

| accepted

Load more