已回答
Where am I going wrong in setting up this function?
X(l) = symsum( x(k)* exp(-(1i)*l*k*w), k, 0, N-1 ); use exp function

5 years 前 | 0

| 已接受

已解决


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

5 years 前

已解决


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

5 years 前

已回答
Using Help using filter function in Matlab
%true xi = HPFnew.*sin((omega.*t+phase)*pi/180) u = uhat +A*sin((omega*t+phase)*pi/180) Try the above. Also see the fi...

5 years 前 | 0

| 已接受

已回答
Different results with same code??
D=double(subs(D,k_s)) Use the variable k_s as argument, I get the same results now m_s = 2000; %(kg) ...

5 years 前 | 0

| 已接受

已回答
Different results with same code??
It depends on values for input variables inside the M and K matrices If you use different values for each of script the resul...

5 years 前 | 0

已回答
Putting a step in x axis
%if true set(gca,'XTicks', 0:50:3600); xlabel('Comprimento de Onda [nm]'); ylabel('Espessura mínima [nm]'); Use...

5 years 前 | 0

| 已接受

已回答
graphing data using webread
figure(1) subplot (2,2,z) if z == 1 % plot the data and average plot(x(1:100:end),y(1:100:end),x(1:100:end),avg_y...

5 years 前 | 0

| 已接受

已回答
How do I plot a transient voltage response before and after a switch is thrown?
%if true Vc(t>0) = 4.604 * (1 + exp(-t(t>0)./ tau)); plot(t, Vc); title('Capacitor Voltage vs Time'); xlabel('Time (s)'); ...

5 years 前 | 1

| 已接受

已回答
matrix while using ODE45
Shaft_speed=1; % specify a value instead of vector %shaft speed in rad/s Rad_speed=Shaft_speed*((2*pi)/60); %freq of harmo...

5 years 前 | 0

| 已接受

已回答
Index exceeds the number of array elements
%if true x = 0:h:1;% size has 201 elements Define this according to function calculations e.g. x = 0:1/((N+1)*mm...

5 years 前 | 0

| 已接受

已回答
Plot and scatter plot, weird lines removal
%f true plot(g,f,'+'); Use a marker in the plot function By default plot uses a continous line

5 years 前 | 0

| 已接受

已回答
How can I create a horizontal bar plot and label in each stack
%if width=0.1 barh(a1,width,'stacked') legend('1','2','3','4','5','6','7','8') To add labels on bar sections read the _...

5 years 前 | 0

| 已接受

已回答
Directivity function (polar pattern) of acoustic dipole in closed form?
%if true theta = 0:360 polar(sin(theta).^2*pi/180)% sin^2(theta)

5 years 前 | 1

| 已接受

已回答
Function keeps getting errors, how to fix?
function RH = RelHum(Tdb, Twb) syms n % define the symbolic n ftoc = @(n) ((n-32)*(5/9)); svp = exp(1)^((16.78*ftoc(Tdb) ...

5 years 前 | 1

| 已接受

已回答
Changing variables within loop equations
L = 1:21; % use a vector for iteration /counter for i = 1:1:L(8) % access them via L ... % your code end for i = L(9):1:...

5 years 前 | 0

| 已接受

已回答
how can i make this animation faster in MATLAB?
hmax = 25; % max height n = 100; % make this value smaller h = linspace(0,hmax,n); t = linspace(0,360,n); k = 0; pt = 1/600...

5 years 前 | 0

| 已接受

已回答
Transfer function, function, Fcn, G
%f true num = [1.077e4] den = [3.439e-7 1 0] Enter the vectors _num and den_ coefficients in the transfer function blo...

5 years 前 | 0

| 已接受

已回答
Plotting e^-t graph
t = 0:0.1:10; y = exp(-t); plot(t,y) define t and use exp function to calculate and plot the equation

5 years 前 | 2

| 已接受

已回答
How to plot multiple unit tangent vector along a 3D curve using quiver3
t = linspace(0, 2, 80); x1 = t; y1 = t.^2; z1 = t.^3; TangentUni = 1./sqrt(1+4*t.^2+9*t.^4), 2*t./sqrt(1+4*t.^2+9*t.^4), 3*t...

5 years 前 | 0

| 已接受

已回答
How to use fprintf to show collated values for two arrays.
for i = 1:length(X); fprintf('%d,%d\n',X(i),Y(i)); end

5 years 前 | 1

| 已接受

已回答
Generate signal using rectpulse
%if true sign1 = rectpuls(t,A) plot(t,sign1) Use the *rectpuls* function to plot

5 years 前 | 0

| 已接受

已回答
Please help this semilogy error message
N = 100 ip = rand(1,N)>0.5; % generating 0,1 with equal probability s = 2*ip-1; % 0 -> -1; 1 -> 0 >> BPSK modulation nRx_max...

5 years 前 | 0

| 已接受

已回答
Thick border for a plot
box on ax = gca ax.LineWidth = 6

5 years 前 | 1

| 已接受

已回答
How to plot vector with origin not at 0
%if true plot(V(1,:),V(2,:)) *plotv* is not same as *plot*

5 years 前 | 0

| 已接受

已回答
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

加载更多