Answered
automatically subtitle subplots after their generation
Try this: figure hs(1) = subplot(2,1,1); plot(rand(20,1), rand(20,1), 'pg') hs(2) = subplot(2,1,2); plot(rand(20,1), rand(...

7 years ago | 0

Answered
Applying shading radially outwards on a circle
I’m notr exactly certain what you want, however this should get you started: rmax = 100; r = linspace(0, 1, rmax); ...

7 years ago | 2

| accepted

Answered
How can I convert from syms to double in this code
Use Anonymous Functions (link) instead of the Symbolic Math Toolbox for this: t=.01:1:100; fh=.167 for i=1:length(t) U=...

7 years ago | 0

Answered
Converting accelerometer data to frequency
Try this: num = xlsread('test550.csv'); num = num(1:2:end,:); % Eliminate ‘NaN’ Val...

7 years ago | 0

| accepted

Answered
Unable to perform assignment because brace indexing is not supported for variables of this type.
I cannot run your code, however I can reproduce the error: a = rand(1,5); a{1} = rand(1,5); Unable to perform assignment bec...

7 years ago | 1

Answered
Plot title divided into rows, why?!
It is probably because your concatenation is having unforeseen effects. Try this instead: title(sprintf('E%d %s %s %s all p...

7 years ago | 0

| accepted

Answered
difference between next two numbers
One approach: v = [0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.79 0.54 0.33 0.10 ...

7 years ago | 1

| accepted

Answered
How to count the lines crossing the y axis?
Try this: x = randi([-10 10], 50, 2); % X-Coordinates y = randi([-10 10], 50, 2); % Y...

7 years ago | 0

Answered
Using String user input for dynamic number of legend in plot function
Change the input call to: LegendCell{jj} = input(legend2,'s') That worked (for one legend entry) when I tested it.

7 years ago | 0

| accepted

Answered
HOW TO USE GREEK LETTER FOR WRITING (LAMBDA /DELTA ) RATIO AND OTHERS
a) frac{\lambda}{\delta} b) \hat{\tau_0} c) \frac{\hat{\tau_0}}{\delta} Are these what you want?

7 years ago | 2

| accepted

Answered
when i run example on matlab
It is part of the Robotics System Toolbox: Implement Simultaneous Localization And Mapping (SLAM) with Lidar Scans (link). (No ...

7 years ago | 1

Answered
Solve issue in Matlab R2018b
Restrict ‘a’ using an assume call. Try this: syms a T assume(a >= 0 & a <= pi) v2=-2.3750 g=1; b=0; e2=0.5; k=2.5; w...

7 years ago | 1

| accepted

Answered
How can I obtain good contours ?
See if using griddata (link) or its friends to interpolate to a finer grid (more data points) helps.

7 years ago | 0

Answered
ERROR WHILE WRITING PROGRAAAME
You remembered to use element-wise division for ‘lambda’. You also need to use it for ‘m’: v2=beta.*(y-delta)+1-exp(-p)+4.*sq...

7 years ago | 1

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements. Line "u(i) = u(I+1) + acceleration * dt" seems to be the problem.
When I ran your code, I got the same error. I tracked it down to your use of ‘spring’ as a variable name, as well as noting tha...

7 years ago | 1

| accepted

Answered
Plot with linspace and for loop - what is wrong with this code?
You need to subscript ‘r’ and ‘X’ to create vectors from them, then put the plot call after the loop: c = 9000 k = 30000 m =...

7 years ago | 0

Answered
Month function doesn't work with double anymore
From the documentation: ‘m = month(t) returns the month numbers of the datetime values in t. The m output c...

7 years ago | 0

| accepted

Answered
Calculating slope of the log of the dataset
Please be more specific. Your entire Excel file consists of: NaN NaN NaN 370 ...

7 years ago | 0

| accepted

Answered
kelvin function and its derivative
Wiklipedia tells me that Kelvin functions (link) are modified Bessel functions of the second kind. The MATLAB besselk (link) ...

7 years ago | 0

Answered
Axis very tight in Matlab 2018b
I cannot find a general setting (in ‘Preferences’). The best you can likely do is to use the axis (link) and related function...

7 years ago | 0

Answered
designFilt error ONLY inside function "Incorrect dimensions for matrix multiplication"
Your code runs for me without error, both in a script and from inside a function the script calls. There must be something in y...

7 years ago | 1

| accepted

Answered
Diffrences between input and output signal on filter
I am not certain what you are doing with respect to your oscilloscope simulation. However, if you do an additional plot and loo...

7 years ago | 0

Answered
How to make plots with symbols(representing data points) and a fitting curve (fit the points with polynomial or other curve equations)
Try this: b1 = polyfit(x1, y1, 1); % Linear Function y1p = polyval(b1, x1q); b2 = p...

7 years ago | 0

Answered
Print Data to .txt Files
Put square brackets around the variables in your fprintf statement to concatenate them into a matrix, then transpose the matrix....

7 years ago | 0

| accepted

Answered
Interpolating a 3D matrix
I cannot follow what you are doing (or intend to do). However doing a 1D interpolation on a 3D matrix is likely not the correct...

7 years ago | 0

Answered
Plane fitting using 3D points
Try this: P = bsxfun(@times, rand(49, 3), [1 10 100]); % Create Matrix [x, y, z] B = [P(:,1), P(...

7 years ago | 0

| accepted

Answered
The following error occurred converting from sym to double: DOUBLE cannot convert the input expression into a double array.
To define a vector of subscripts to ‘lb’, use square brackets, just as you woukld with any other array: syms a b c d e f g h ...

7 years ago | 0

| accepted

Answered
Modifying elements in a list
You do not need the loop. Just do this: timestr = ["758" "808" "828" "838" "848" "858" "908"] timenum = str2double(timestr...

7 years ago | 1

| accepted

Answered
How can I do a datetime vector?
Just do something like this: T = datetime('03/19/2019 16:36:41') H = datetime(T,'Format','HH:mm:ss') producing: T = da...

7 years ago | 3

| accepted

Answered
moving average of array
If you have R2016a or later, use the movmean (link) function. Otherwise, see the filter (link) documentation section on Movin...

7 years ago | 0

| accepted

Load more