Answered
Use data in an array for 'Plot' command
%if true plot([shape(j,4,i) length(shape(j,4,i)) shape(j,4,i)(1)],[shape(j,5,i)(length(shape(j,5,i))) shape(j,5,i)(1)],'k'...

1 month ago | 0

Answered
How to plot(x,y) if x = f(y) is given
%if true C_0 = 12 ; T_l = 903 ; m = -2.5 ; sigma_star = 0.0666; k = 0.0208 ; x = 0:20; y = - m*C_0*(2*sigma_star.*x...

1 month ago | 0

Answered
Matlab plot problem line 13
%if true plot(y, double(subs(dydt(y, E, r,K))));

1 month ago | 1

| accepted

Answered
I dont know where i was wrong
number = str2num(a(i:i+4)); % missing parenthesis Missing parenthesis

1 month ago | 0

Answered
matlab words no help needed
%if true f = 2 V = 1; A= 1; L = 1; LL = V/f B = 2*pi/LL t = 0; W = 2*pi*f x = 0:0.0001:L; z1 = A*sin(B*x-W*t) z2 = A*si...

1 month ago | 0

Answered
Parentheses error with a function call
%if true x = load('mnist.mat', 'testX'); k=5; numIter=6; function [mu, cll, ill] = gmm(x, k,numIter) Assign _x_ dir...

1 month ago | 0

| accepted

Answered
Why I am getting the error "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters."
%if true for i = 1:NF err_frame(:,i) = err((i-1) * (1- % ^ ' is used for transpose OLR) + 1*(i-1) * frame_l...

1 month ago | 0

| accepted

Answered
Why does not semilogy works?
%if true figure(1); %hold on nnmax= size(data.file,1); for kk=1:1:nnmax semilogy(data.x(:,1:kk), data.y(:,1:kk)); ...

1 month ago | 0

Answered
How to make Subscript indices real positive integers or logicals?
clc; clear; x = linspace(-1,1,100); %-1:.01:1; y = linspace(-1,1,100); %-1:.01:1; z = linspace(-1,1,100); %-1:.01:1; f=z.*...

1 month ago | 0

Answered
How to run if and exist ?
final_residuals = [] for year= 1962:2016 for id=10000:93436 sub_regress = subsetPCA(subsetP...

1 month ago | 0

| accepted

Answered
ajdk ahdjkfha haldjf (ignore)
w = .5; %% 2w=1 x = -.5:0.1:.5; %% X (-w,w) N = [5, 9, 20]; %% N [5,9,20] delta = 2*w./N % Matrix for ...

1 month ago | 0

Answered
Plotting results of fft2 with frequencies in the x and y axes
%if true surf(yq,yp,rYQ);

1 month ago | 0

Answered
histogram of angles in a loop
%if true matrix(i,:)= [i;j;angle]; Did you use increment this way to store matrix

2 months ago | 0

Answered
How to change X axis in the form of percentage
%f true x = 77:146; xp = (x./max(x))*100 plot(xp,yp)% yp is your initial y values

2 months ago | 0

Answered
Magnitude and phase spectrum of sine wave using FFT
%f tru subplot(2,1,2); plot(w(1:plot_FFT_len), 20*log10(abs(fftd./Plength)).*(1:plot_FFT_len));

2 months ago | 0

Answered
Plotting a projectile (it doesn't plot anything)
%if true plot(Hsx, 'b-', 'LineWidth', 3); grid on; grid minor _Vsy_ is scalar with one value. That's why plot ...

2 months ago | 0

Answered
double type+ surf error
Check if _b_ matrix has any *NaN* values. Due to presence of text elements

2 months ago | 0

Answered
Plotting the Bar chart in Matlab
%if true x = [1 2 3]; figure, bar(x,[3 6 9;2 5 8;1 4 7]) Do you mean this ?

2 months ago | 0

Answered
How to clear a particular figure and replace it with other
%f true clf hold all fplot(f,'g') xlim([-1,3]) ylim([-2,2]) f1 = figure plot(0,0,'bo'); clf(f1,'reset') plot(0,1,...

2 months ago | 1

| accepted

Answered
Logical Indexing with Condition Involving Functions
%if true idx = find(A(a) == 1) Use it with _find_ function for element indices

2 months ago | 1

Answered
Can you have lines between circles on a scatter plot?
%if true a = [50:199]; b = [75:224]; i = [1:150]; scatter( i, [a;b] );hold on; for k = 1:length(a) line([i(k) i(k)],[...

2 months ago | 0

Answered
I am getting this Error using makeState (line 56). Your fitness function must return a scalar value.
%if true MWh = k'.*X(1:N).'/c(4); From the error, the function must return a scalar which is possible with above chang...

2 months ago | 0

| accepted

Answered
Fourier series using matlab
Use _x_ in place of _n_ as it appears in other equations too.

2 months ago | 0

Answered
plotting a straight line with slope and a single point
%if true %%%Y-Values Stress_fail_GF=[1.2 2.1]; Stress_fail_AF=2.8; Stress_fail_Matrix=0.1; %%%X-Value Strain_fail_GF=[0....

2 months ago | 0

Answered
Generate sequence of sine waves with changing amplitude
%f true f = 2.36e3; w = 2*pi*f; %sampling frequency fs = 50000; dt = 1/fs; %Amplitude of pickup signal at each of 11 d...

2 months ago | 0

| accepted

Answered
Cantilever Beam Deflection problem
% drawing beam shape x = [0 1 1 0]; y = [3 3 4.5 4.5]; patch(x,y,'b','FaceColor','blue','FaceAlpha',.1,'EdgeColor','none');a...

2 months ago | 0

Answered
ode 45 doesnt work
y0 = [-1 ;8]; tspan = [0 ;3]; [t,y] = ode45(@(t,y) ((2*y.^2.*t + 4)./((3-t.^2.*y)*2)),tspan,y0); % use element wise operator...

2 months ago | 0

Answered
Not seeing second plot data
%if true theta = 0:0.02:1; y = sin(theta); figure(1) plot(theta, y, theta, theta) grid pct = 100 - (100 * (theta - y)....

2 months ago | 0

| accepted

Answered
How do I plot an interval with this?
%if true function S = dval(x, a, v) n = length(a); s = a(n); for i = n-1:-1:1 s = s.*(v-x(i))+a(i); % got errors h...

2 months ago | 1

Answered
Colorbar With Wrong Graphs
%if true figure(1) plot(...) ax1 = gca cm_P = colormap(ax1,summer(length(psi))); p = colorbar; ... figure(2) plot...

2 months ago | 0

Load more