已回答
Legend being occupied by background spectrogram
hold on Field4fig=Field(1:round(length(Field)/length(T)):length(Field),1); F = plot(T_forspectrogrm,Field4fig,'r',... T_f...

5 years 前 | 0

| 已接受

已回答
How to make stack plot with y axis consisting of multiple plots?
tbl = readtable('stacked.xlsx'); Vars = {{'A','B','C','D','E'},'F'}; % assuming 6 variable names(Var1 ...Var6) as A,B... E, Fiv...

5 years 前 | 2

| 已接受

已回答
Substracting a number from certain section of the array
Try this A = [ 1.002 2.003 3.004 4.005 339.006 341.007 342.008 343.009 1.002 2.003 3.004 4.005];% your array A(A>300) = 360-...

5 years 前 | 1

| 已接受

已回答
Log(x) equation does not plot correctly
%f true comet(x,real(y)) Use the real components to graph.

5 years 前 | 2

已回答
Comparing two plots which are functions of time
%if true %if true t = -10:0.1:10; x1 = 2*sin(2*pi*3*t); x2 = 3*sin(2*pi*2*t); y11 = t.*(x1+x2); plot(t,y11,'b'); figure; ...

5 years 前 | 1

| 已接受

已回答
Square root of the summation(RMS)
height = 40:60; width= linspace(0.2,0.5,length(height)); sqrt(sum((height.*width).^2))

5 years 前 | 0

| 已接受

已回答
Trying to plot two lines in the same figure, doesn't work?
%if true plot(lesteps,leerros) yyaxis right plot(trapsteps,traperrors) Try this to plot The graph with two ...

5 years 前 | 2

| 已接受

已回答
How to use multiple arguments in matrix
%if true %if true clear all t = [1:8760]'; hours = rem(t,24); hours((hours<6&hours>=0)|hours==23|(hours<=15&hours>=1...

5 years 前 | 2

| 已接受

已回答
How do I plot a table with dates?
T = table({'2020-01-01';'2020-01-02';'2020-01-03'},[17;15;20],[18;13;15],[12;16;16],'VariableNames',{'Date','Country A','Country...

5 years 前 | 0

| 已接受

已回答
How to reduce the margin space in plotting
Try using PaperPosition, PaperUnits, to resize the figure window as given in this link https://www.mathworks.com/help/matlab/r...

5 years 前 | 0

| 已接受

已回答
Two lines populated from one plot
Change this line from E4 = a1*(p3)/(1+(p3/b2)) % before to E4 = a1*(p3)./(1+(p3/b2)) % after and plot again

5 years 前 | 0

| 已接受

已回答
How to divide the y-axis of heatmapin groups?
%if true % code % end ytickformat('QQQ')

5 years 前 | 0

| 已接受

已回答
MATLAB two Graph Plotting
%if true % code % end figure(1) plot() ... ... figure(2) plot() ... ... Follow this sequence for plotting. T...

5 years 前 | 0

| 已接受

已回答
How to Make this Matrix Work
%if true % code %end x=5; y=0; z=0; S=[(1.28*10^10)*x*y-(2.56*10^10)*y (2.56*10^6)-(6.4*10^9)*(y^2) -(6.4*10^9)*y*...

5 years 前 | 0

| 已接受

已回答
Function outputs NaN for a cell which is assigned a separate value?
since you want 1 when y is zero, you need something like y(y==0) = 1; y(y~=0) = 1./y; x = y;

5 years 前 | 1

| 已接受

已回答
How do I fix this plot failure?
plot(x(1:n,1),y(1:n,3),'b') %clf Comment the clf line and use vector to plot

5 years 前 | 0

| 已接受

已回答
Output of transfer function with stochastic signal as input
%if true % code %end numerator = [1.85*10^-10, 5.883*10^-11, 7.4*10^-12]; denominator = [1, 0.43, 0.339, 0.09, 0.0...

5 years 前 | 0

| 已接受

已回答
how to program given formula
% if true % code % end x= 1:100;y = linspace(2,250,length(x)); Fx = diff(x,1); Fy = diff(y,1); L = sqrt(Fx.^2 + Fy.^...

5 years 前 | 0

| 已接受

已回答
Getting values for equation written in for loop but not getting plots
rol = 5:10; plot(rol,V2fl); you dont need for loop when you are using element wise multiplication .* delete the loop and pl...

5 years 前 | 0

| 已接受

已回答
Error using diff Difference order N must be a positive integer scalar.
Replace the term %if true % code %end (1+diff(I,V)*Rs) To %if true % code % end (1+diff(I,1)*Rs)...

5 years 前 | 0

| 已接受

已回答
How to cut out/delete rows in a cell
% if true % code %end for u = 1:5 for i = 1:5 mu_short_Mess_20kmh_HA{u,i} = mu_20kmh_all_VA{u,i}(101:end,:); mu_mea...

5 years 前 | 0

| 已接受

已回答
lenend keep only text
dummyh = line(nan, nan, 'Linestyle', 'none', 'Marker', 'none', 'Color', 'none'); dummyv = line(nan, nan, 'Linestyle', 'none', '...

5 years 前 | 0

| 已接受

已回答
Error using optimoptions (line 124)
%if true % code % end opts = optimoptions(@fmincon,'Algorithm','interior-point'); Try function handle for passing s...

5 years 前 | 0

| 已接受

已回答
How to write a mathematical function in MATLAB?
%if true % code % end syms t i j k vx = t^2; vy = t^3; vz = t^4; V = @(t) vx*i+vy*j+vz*k; VV = diff(V,t);% differ...

5 years 前 | 0

| 已接受

已回答
To plot the sin signal continues and discrete form
fs = 100; t = 0:1/fs:1; f = 5; x = sin(2*pi*f*t); subplot(211) plot(t,x);

5 years 前 | 1

| 已接受

已回答
Creating a time input dialog and plotting in the time period.
You have additional ] at the end of input box. Plus you have defined st and at as structure. Define them outside the if conditio...

5 years 前 | 0

| 已接受

已回答
For Loop Variable Selection from Index
Assuming the vectors _Time, BiSGspeed, Counts_ are equal length then you can try like %if true % code % end Time =...

5 years 前 | 0

| 已接受

已回答
How to plug in values to symbolic variables and update the matrix?
%if true % code % end lambda = sym('20'); mu = sym('10'); T = your matrix k = 1; P = transpose(T)*k.*T

5 years 前 | 0

| 已接受

已回答
Index exceeds the number of array elements error
Use _for loop_ index to access the vector as below %if true % code % end >> r=exprnd(1/8, 1,5); >> at=cumsum(r); ...

5 years 前 | 0

| 已接受

已回答
Help storing my iterations into my variables
Inside the while loop use %if true % code % end X(k) = xr; EE(k) = ea; F(k) = yrp;

5 years 前 | 0

| 已接受

加载更多