已回答
how do i plot control polygon?
%true plot3(Gx,Gy,Gz); hold on; plot3(Gx1,Gy1,Gz1) Use plot3 command

5 years 前 | 0

| 已接受

已回答
My plot won't show any graph
clear %%Given : T= 5; del_t=3; t=linspace(0,T,del_T); E=5; v=0.3; Sya=25; Sy=15; d=0.4; vis=0; gamma=0; %Assume...

5 years 前 | 0

| 已接受

已回答
Undefined operator '/' for input arguments of type 'cell'.
%rue width = 20; % width = num2cell(width); Comment the num2cell line and try again

5 years 前 | 1

已回答
Update the Legend dataN value in GUI
%rue legend(sprintf('\zeta = %d',zeta)); Use sprintf in legend in pushbutton callback function

5 years 前 | 1

已回答
i want to plot an log function
%true r = 0.01:0.001:1; y = (r.^3).*log(1./r); %element wise plot(r,y);grid on

5 years 前 | 1

已回答
SUBPLOT : UPPER & LOWER PLOT
%true for i = 1: 6 subplot(6,2,i) y = cos(i*x); plot(x,y) title(sprintf('y = cos(%dx)', i)); end

5 years 前 | 0

| 已接受

已回答
Sum of elements in 2D matrix greater tha 150
for a = 1:254 for b = 1:318 if (R_10M(a,b) > 150) value(a,b) = R_10M(a,b); % use row and column indic...

5 years 前 | 0

| 已接受

已回答
How to plot multiple lines groups in 3D graph as in picture ?
Use _plot3_ function https://in.mathworks.com/help/matlab/ref/plot3.html

5 years 前 | 1

| 已接受

已回答
Array indices must be positive integers or logical values.
%true a=exp(-1); o=0.009931621960609; x2=-2.5:0.1:9.5; y2=0.5*exp(-a*(x2-(0.5*o^2*a))).*(1+erf((x2-o^2*a)/sqrt(2)*o));...

5 years 前 | 1

| 已接受

已回答
How can I create sine wave with varying amplitude between certain range?
%if amp = 1:2:5; data = amp.*abs(sin(2*pi*F*t)) Use _abs_ to plot only the fixed amplitude range

5 years 前 | 0

| 已接受

已回答
How to create and plot a Gaussing function?
%true sigma=0.7; nx=9; ny=9; [x,y]=meshgrid(-nx:0.5:nx,-ny:0.5:ny); G=(0.5./(pi.*(sigma.^2))).*exp(-0.5.*((y.^2+x.^2)./(...

5 years 前 | 0

| 已接受

已回答
I can combine for loop outputs
k = 0; for i = 1:m for j = 1:n if A(i,j) > limit k = k+1; end end end disp(k)

5 years 前 | 0

| 已接受

已回答
Plotting in app designer doesn´t shows anything
%if true beta = ((1-((m*lf)/(2*l*lr*Kr))*v.^2)./(1-(m/(2*l^2))*((lf*Kf-lr*Kr)./(Kr*Kf))*v.^2))*(lr/l)*d Do element wise...

5 years 前 | 0

| 已接受

已回答
GUI Work with plotting time v temp
You can change the for loop structure to below and plot time vs emp for k = 1:numel(dens) if dens(k) == 1.940 vi ...

5 years 前 | 1

已回答
How to plot amplitude of phasor from complex number?
semilogx(10*log10(w), abs(Vc(w))); use abs if you want resultant of real and complex values or semilogx(10*log10(w), rea...

5 years 前 | 0

| 已接受

已回答
Storing the maximum value in each iteration
%rue v0 = 0:2:50; for i = 1:length(v0) ... X(i) = max(Ccstr(:,3)) end plot(v0,X) Use the for loop index a...

5 years 前 | 0

| 已接受

已回答
How to run this code with some values of k?
%true syms t k F= @(t,k) 3*dirac(t-3*k*pi)+2*dirac(t-3*k*pi-pi)+dirac(t-3*k*pi-2*pi) f = abs(fourier(F,t,k)); a = angle(fo...

5 years 前 | 0

| 已接受

已回答
Need help graphing this
x = 0:0.01:4*pi; plot(x,cos(x));hold on; plot(x,5+cos(x)); ylim([-2 7])

5 years 前 | 0

| 已接受

已回答
Array indices must be positive integers or logical values
clc; clear; clc; h= linspace(0.00001,0.12,12) rtanque=.1 rsalida=.005 g=9.806; for i = 1:length(h) Vol=(pi.*rtanque.^2...

5 years 前 | 0

已回答
Error using + Matrix dimensions must agree.
%t = dt*(0:200); %data window COMMENT THIS LINE IN YOUR PROGRAM fi=50; %Frequency test ww=wgn(201,1,-40); size(transpose(ww...

5 years 前 | 0

| 已接受

已回答
how to normalize output for plotting
o=A./sum(A) %S=sum(normalizedvector,'all') %l=sum(normalizedvector(f)) %l=normalizedvector(f); polarplot(theta,o,'*'); Norm...

5 years 前 | 1

| 已接受

已回答
ERROR Subscript indices must either be real positive integers or logicals.
for j=2:j_max+1 x=v((j-1:j+N0-2)*dt); Use a positive non zero integer subscripts. In your case it is zero

5 years 前 | 0

| 已接受

已回答
Index loop into matrix
triCoord= zeros(10,9); ntri = 10 qTop = zeros(ntri,3); for n=1:ntri qTop(n,:) = [mean(triCoord(n,[1 4 7])),mean(triCoord(n...

5 years 前 | 0

| 已接受

已回答
How can I plot graphs of the following variables?
%Program to solve the Euler equations clear all; clc; %Time Step h = 0.01; %Key Parameters mb = 100; %Mass of Quarter ...

5 years 前 | 0

| 已接受

已回答
Index exceeds the number of array elements (0).
%true prompt= 'Enter theta1 value'; A = input(prompt); prompt = 'Enter phi1 value'; B = input(prompt); prompt= 'Enter ...

5 years 前 | 0

| 已接受

已回答
How can I save only the values that work?
w = [40+wstep:wstep:50]; k2 = [1:1:100000]; for i = 1:length(m2) X =@(w,k2) abs(((k2-m2(i).*w.^2).*F0)./((k1+k2-m...

5 years 前 | 0

| 已接受

已解决


Find max
Find the maximum value of a given vector or matrix.

5 years 前

已解决


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

5 years 前

已解决


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

5 years 前

已解决


Create a vector
Create a vector from 0 to n by intervals of 2.

5 years 前

加载更多