Answered
how do I integrate a pre-recorded function?
Try this — syms r theta p1 = r.* cos(theta); polarfun(r,theta) = p1 polarfcn = matlabFunction(polarfun) ...

5 years ago | 0

| accepted

Answered
show the output of subplot as a full screen show
Try something like this — hf = figure; subplot(2,1,1) plot(1:100, randn(1,100)) grid subplot(2,1,2) plot(1:100, sin(2*pi*...

5 years ago | 0

| accepted

Answered
Help with syms ode solving
The differential equation is nonlinear, so no analytic expression for it exists. Try this instead — syms Ca(z) Cb(z) z Y ...

5 years ago | 0

| accepted

Answered
Computing spectrogram using STFT
Use the pspectrum function with the 'spectrogram' option.

5 years ago | 0

Answered
Plotting coordinates for this graph
Use the text function to display the values of each pint near (or on) the point.

5 years ago | 0

Answered
How to divide a string into multiple rows
Transpose after doing the reshape call: A = [1 2 3 4 5 6 7 8 9]; Ar = reshape(A,3,[]).' .

5 years ago | 2

| accepted

Answered
How can I add a legend in the end of sublot ( on the bottom of sublot ) ?\
@Rahim Rahim — Responding to your Comment to your earlier Question, I took a look at this. This is the best I can do — x1=[...

5 years ago | 0

Answered
Matlab for loop plots curves in random order
The code required a bit of tweaking. Try this — lambda= 1.94e-2; %Ang res_p= linspace(0,1.5,50); %Ang^-1 def_err = (0.4:0...

5 years ago | 1

| accepted

Answered
Default Plot Graphics Settings for Step Plots?
The options are limited with the Control System Toolbox functions. The easiest ones are in bodeoptions and more geneerally in s...

5 years ago | 0

| accepted

Answered
Brace indexing is not supported for variables of this type.
The problem is immediately apparent on viewing the contents — ViewContents = readcell('https://www.mathworks.com/matlabcentral...

5 years ago | 0

| accepted

Answered
Automatik EMG aktivity and rest Detection
Use the movmean function. The ischange function may also be helpful.

5 years ago | 0

Answered
How to fixe the For loop
Do exactly this: compare values for equality using '==' However the actual solution is likely the strcmp (or related strcmp...

5 years ago | 0

| accepted

Answered
Bode diagram command is not working
First please go into detail abouot what ‘not working’ means. If it worked before, it should still work. Run this: which ...

5 years ago | 0

Answered
How to find the maximum index in a struct
Try something like this instead: Fsize = size(F) The function form is likely to give the result you want. EDIT — (23 Apr...

5 years ago | 0

| accepted

Answered
Plot 3D Graph and make level curves
Use the plot3 function. If you then want it as a 2D plot, use the view function to rotate it. EDIT — (23 Apr 2021 at 03:...

5 years ago | 1

| accepted

Answered
How to integrate dataset over a certain domain ?
Perhaps: load data.txt S_v = data(:,2); T = data (:,1); Trange = (T >= 0.1) & (T <= 2.5); I_H = trapz(T(Trange), S_v(Trang...

5 years ago | 0

| accepted

Answered
3D plot from excel data
Try this: T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/593500/prova_stress.xlsx', 'VariableN...

5 years ago | 3

| accepted

Answered
Find all the grid points that are inside of the circle
Use the inpolygon function.

5 years ago | 0

| accepted

Answered
Draw Signal graph from a frequency domain representation
That is not possible with only the information shown in the plot image. Inverting the Fourier transform of the signal require...

5 years ago | 0

Answered
Step matrix where each value is repeated
Use the repelem function (introduced in R2015a).

5 years ago | 0

| accepted

Answered
How to solve a linear system A * X = B when B and X are matrices instead as vectors?
The lsqr function is primarily used for sparse systems. There are a number of other options for iterative solutions summarised ...

5 years ago | 0

Answered
I can't load csv files properly.
Since .csv files are strictly numeric (although they can haved the first row as non-numeric headers), the files could have nonum...

5 years ago | 0

| accepted

Answered
How can I find the Q and S waves for this Particular ECG Data Set?
Assuming your EKG is Standard Lead II (we have no idea), the islocalmin function would likely work, however neither the Q or S d...

5 years ago | 0

| accepted

Answered
FFT of discrete signal .Should use nextpow2 or not
Using nextpow2 is not necessary. It will make the fft calculation a bit more efficient, and it will increase the frequency reso...

5 years ago | 1

| accepted

Answered
How can I add a print the first bar with a color, second with color different and the last with a different color in subplot ?
The only way that I am aware of to plot the individual bar colours is to use a loop: x1 = [1;2;3] y1 = [91,25,3]; cm = [1 ...

5 years ago | 1

| accepted

Answered
How to plot the point where two complicated graphs cross?
Clever animation! Since I assume you wnat to know where the ‘x_eartoMars’ and ‘x_mars’ intersect, the easiest way is to simpl...

5 years ago | 0

Answered
Ordinary Differential Equations (ODEs)
Change the ezplot call to fplot: syms t y(t) ysol=dsolve(' D2y + Dy + 4.25*y = 0','y(0)=2','Dy(0)=1'); y(t)=simplify(ysol) ...

5 years ago | 1

| accepted

Answered
Error using round every time can anyone please help me with this?
Convert ‘height’ to double first: stage = round(double(height),4) %%%LINE 18%% .

5 years ago | 1

| accepted

Answered
Adding Error Bars to a grouped Bar Plot
Change the errorbar call slightly to: errorbar(ctr, ydt, WerrL, WerrH, '.', 'MarkerSize',0.25) That should do what you want. ...

5 years ago | 0

Answered
Displaying arrays alongside fprintf() text.
Try this: A = zeros(5); TA = array2table(A, 'VariableNames',num2cell('A':char('A'+size(A,2)-1)), 'RowNames',num2cell('A':char...

5 years ago | 0

| accepted

Load more