Answered
Error using horzcat Dimensions of arrays being concatenated are not consistent.
The reason is that ‘T’ is a (1x21) row vector, and ‘Y’ is a (21x1) column vector. The (:) subscript convention forces ‘T’ to ...

7 years ago | 0

Answered
Heatmap with log scale axis
That actually looks more like a surf plot. Try something like this: zdata = rand(10,50); figure surf(zdata) view(0,90)...

7 years ago | 0

Answered
How to add line style after color
Try this: figure hl = plot((0:9), rand(1,10)); hl.Color = [0 0.4470 0.7410]; % Define Line Col...

7 years ago | 2

| accepted

Answered
How to shade time intervall
Try this: time = datetime('17:00','InputFormat','HH:mm'):minutes(1):datetime('18:00','InputFormat','HH:mm'); ...

7 years ago | 1

| accepted

Answered
How to import correct time format from Excel
It is likely best to use readtable to read the Excel file. Otherwise, use datetime to convert the vector from Excel to a date...

7 years ago | 0

| accepted

Answered
How to find peak value in graph like normal distribution?
The max function would likely do what you want.

7 years ago | 0

| accepted

Answered
Extract changes on a string
Try this: D1 = load('status.mat'); D2 = load('dates.mat'); status = string(D1.fontes); datestimes = D2.data_tracking_tratad...

7 years ago | 1

| accepted

Answered
ODE and Data fitting
All I can do is to point you in the direction of successful efforts to do what you want. One such is: Parameter Estimation f...

7 years ago | 0

| accepted

Answered
Saving a figure with details
I am not certain what you are asking, so I am assuming you have created a plot of some sort and want to work with it later. I...

7 years ago | 0

Answered
Incredible symbolic integration problems
It looks correct to me. The int call first simplifies: -1/(1-x) to: 1/(x-1) and then integrates it to get: Q1 = int (...

7 years ago | 0

| accepted

Answered
Why Power of Matrix with decimal values gives really big numbers?
It depends what you want to do. Note that ‘T^20’ multiplies the entire matrix by itself 20 times (although the actual algorithm...

7 years ago | 0

Answered
Ascending table column labels
Use the compose function (R2016b and later versions): colnames = compose("Cycle %d", 1:size(matrix,2)); Alternatively, use th...

7 years ago | 0

| accepted

Answered
How to design FIR filter with EEG Signal as Input in Matlab?
Use the kaiserord function. There are several examples in Answers (I wrote some of them), although using more recent versions. ...

7 years ago | 0

Answered
Shade the region between a curve and the vertical axis
I am not certain what you want. Try this: Y = linspace(-1,1,50); V = atan(Y); % R is an array for the radial positions al...

7 years ago | 0

| accepted

Answered
Too many input arguments while plotting
Your friends most likely do not have a variable or user-created function called plot. To find the one on your computer, run t...

7 years ago | 0

Answered
Findpeaks function won't plot all peaks.
Thje last R-wave is not actually a peak as findpeaks defines it. It is necessary to get creative in order to isolate and defi...

7 years ago | 0

| accepted

Answered
Efficiently Running MATLAB: system specifications?
Two resources are: System Requirements for MATLAB R2019 Product Requirements for MATLAB R2019b With respect to processor...

7 years ago | 0

Answered
Genetic Algorithm Initial Population Problem in Matlab
This is what I would do: opts = optimoptions('ga', 'InitialPopulationMatrix',[randi([20 80], 50, 5) randi([95 110], 50, 6)*1E-...

7 years ago | 0

Answered
What capability would you want to see added to the symbolic toolbox in the future?
That the Laplace transforms work with solve and other such functions, and are actually tractable! See for example: this Comme...

7 years ago | 2

Answered
how to plot two seperate figures the left and right channels
Either: figure plot(t, y(:,1)) figure plot(t, y(:,2)) or: figure subplot(2,1,1) plot(t, y(:,1)) subplot(2,1,2) plot(...

7 years ago | 2

| accepted

Answered
Why does this ode23 simulation not run/plot
Give it time! I shortened ‘tspan’ to 150 elements to see if there was a problem with the code (there isn’t): tspan = linspa...

7 years ago | 0

| accepted

Answered
Random points between lines
On approach: x = rand(1, 20)*20; y = rand(1, 20)*30; figure plot(x, y, '.r') hold on plot([20 20], ylim, '-b') hold of...

7 years ago | 1

Answered
How to plot properly a 2d fft of data?
Not entirely. The posted image is the plot of the two-sided Fourier transform after using the fftshift function. The result is...

7 years ago | 2

| accepted

Answered
Step response of rc circuit
step

7 years ago | 0

Answered
(ODE23) Unable to perform assignment because the left and right sides have a different number of elements error
First, pass the extra parameters as arguments. It is best never to use global variables: function dx=boost(t, x, v_in, R, C, ...

7 years ago | 0

| accepted

Answered
How to sweep a sinusoidal signal using the system transfer function?
I am not certain what you want. A Bode plot of a filter with those frequency limits is straightforward, with the freqs functi...

7 years ago | 0

Answered
scatter plot: x and y vectors must be of the same length -- errors
It is probably not possible to use scatter with a categorical variable. You can do what I believe you want using plot (and a ...

7 years ago | 0

| accepted

Answered
Code error with parameter
I am not certain what you want, however it most likely depends on how you define ‘t’. Example — rg = 0.01; rl = 0.01; s1 ...

7 years ago | 0

| accepted

Answered
how do i correct my q command
Do element-wise multiplication (the dot operator): q=pi*m.^2.*n; ↑ ← HERE

7 years ago | 1

Answered
Creating a function for derivative.
See if the polyder function will do what you want.

7 years ago | 0

Load more