已回答
Saving values of a variable in while loop
errorVal(n,:)=sum(error(:));

4 years 前 | 0

已回答
Two y axis with the same data set
dk = 1000; dB = linspace(0.002,dk,7)*1e-6; % in micrometer Sg = linspace(0.001,20,7); hold all M = rand(7); t = ti...

4 years 前 | 0

| 已接受

已回答
How to check for size of input vector
A = [1 , 5]; % compare the size of vector entered by user is 1 X 5 B = [5 , 1]; % compare the size of v...

4 years 前 | 0

已回答
Hello, while i am running a linear equation it is showing that Row dimension of Aeq is inconsistent with length of beq. I am sharing the problem below
clear all x0=[0 0]; A=[1 1;3 1]; b=[50;90]; lb=[0 0]; ub=[1 1] Aeq =[] Beq = [] [x,fval,exitflag,output]=fmincon(@second...

4 years 前 | 0

已回答
why is my plot only showing 1 diagonal line
clear close all t=0; V = 0; dt = 0.1; S = 3; CD = 0.1; T = 10000; m = 500; % plot(t,V) hold all while t<=10 i...

4 years 前 | 0

已回答
Obtain rho and pval values from a loop of data measurements
[rho(i,:),pval(i,:)] = corr(x, y, 'type', 'Pearson');

4 years 前 | 0

| 已接受

已回答
Plotting of different nonlinear equations in different ranges segment wise in a single graph
A = 0:0.1:2; b = 0.3; c = 0.7; y0 = 0; % y = 1:10; for i = 1: numel(A) x = A(i); if (A(i)<=c) & (A(i)<b) ...

4 years 前 | 0

| 已接受

已回答
REgarding plotting of graph in matlab
ylim([15 25])

4 years 前 | 1

| 已接受

已回答
I am using block matlab function but i got this error. ''Size mismatch (size [4 x 4] ~= size [1 x :?]). The size to the left is the size of the left-hand side of the assignme'
Give input to function variable, _w_ as scalar value instead of vector. E.g. w = 2; and not w = [2 3 4]

4 years 前 | 0

已回答
The following Error during exporting a reconstruction or a model. How to resolve this
tmp_anno = strcat( tmp_anno,' <p>' ,model.modelAnnotation(i), '</p>'); % ^ ^ Change to ()...

4 years 前 | 0

已回答
In this coding when i am giving m2=0 value, why no graph is coming?
When m2 is zero, the ode45 returns NaN values. That's why you don't see the graph

4 years 前 | 1

已回答
'Index exceeds the number of array elements ' why this error is showing?
I = 0:0.1:20; y = [0 0]; %% Solve using ode45 [tsol,ysol] = ode45(@my_ode_without_tld,[0 10],[0;1]); %% plotting plot(tsol,...

4 years 前 | 1

已回答
MATRIX MANUPULATION IF CONDTION NOT WORKING
for i = 1:4 if M(i,2)<9 & M(i,2) >4 M(i,4)=0; end end Close the parenthesis and run it.

4 years 前 | 1

| 已接受

已回答
Error'incorrect dimensions for matrix multiplication'
phis=3; phib=8; zeta=-.95:0.5:10; Eg=[-2.9583 5.2519 -6.5456 5.2455 -0.4883 -7.0614 -6.5562] xi=[1 1 1 1 1 1]; for n=1:1:6 ...

4 years 前 | 0

已回答
Help plotting a graph
% Given Ma=0.44 deltaH=17940; W_cp=0.97; P_a=12.93252; m_dot=26; T_t4=2150; T_a=506.21; gamma=1.4; R=53.35; Cp=0.239...

4 years 前 | 1

| 已接受

已回答
Unable to perform assignment because the size of the left side is 98-by-50 and the size of the right side is 98-by-32.
XTrain{idx} = extract(afe,xPadded);% cell array Use curly brackets just like _XTrainC_

4 years 前 | 0

已回答
Replace -99 with NaN
Data = load('precip.txt'); % use load function Data(Data == -99) = NaN Use load function instead of readtable and try with co...

4 years 前 | 0

已回答
identity matrix nth order
n = [1:1:20]; for k = 1:length(n) M{k}=eye(n(k)).*0.02; X = sprintf('Identity matrix of order %0d',k); disp(X) ...

4 years 前 | 0

已回答
Find indices with for loop
WearPinionLD = rand(37,7); Ft = rand(37,1); for i=1:37 index{i} =find(WearPinionLD(i,:)>=Ft(i)); end index.'

4 years 前 | 0

| 已接受

已回答
How to perform integration inside for loop? [matrix dimension must agree issue]
clc clear all close all h=6.582*10^-16; k=8.617*10^-5; T=300; beta=7.021*10^-4; gamma=1108; C1=5.5; C2=4; A1=3.231...

4 years 前 | 0

| 已接受

已回答
convert variable to table header
names = {'May-2014','Jun-2014','Jul-2014','Aug-2014'} T1 = rand(10,1); T2 = T1; T3 = T2; T4 = T3; T = table(T1,T2,T3,T4,'Va...

4 years 前 | 0

已回答
How to unify legend in plot command?
ax = gca; ax.TickLength = [0.02 0.06]; set(gca,'XAxisLocation','top','YAxisLocation','left','ydir','reverse','XScale','log'...

4 years 前 | 1

| 已接受

已回答
I need to add two transfer function of the same order but instead of adding, matlab multiplies them
Fs = 5; dt = 1/Fs; N = 50; t = dt*(0:N-1); A = [cos(dt) sin(dt) 0;-sin(dt) cos(dt) 0;0 0 1]; B = [1-cos(dt);sin(dt);1]; ...

4 years 前 | 0

| 已接受

已回答
How to write a loop to genrate vector that stores NPVs using differnet discount factors (1% to 5% with 1% increment)?
Initial = 200; % initial investment D = [ 1 155.37 2 5.2 3 78.21 4 4.05 5 21.99 6 17.29 7 64.69 8 222.42 9 60.89 10 ...

4 years 前 | 0

| 已接受

已回答
plotting after a for loop doesn't work
close clear all clc; CM=1; CD=2; D=1; k=2*pi/153.9; h=60; H=(0:1:25);I = 1; for zeta_a=(H/2) y(I) = real(asin(CM/...

4 years 前 | 1

| 已接受

已回答
Substituting a value to a syms function in a matrix?
A = subs(A,E11e,4.3287e+08)

4 years 前 | 0

| 已接受

已回答
How to plot inseparable variables.
npoints = 50; d = linspace(0,0.04,npoints); x = zeros(1,npoints); equation = @(x,d) 2.5*x-(2.4*10^-8*x)/((x^2+d^2)^2.5); gue...

4 years 前 | 0

| 已接受

已回答
How to Solve with subs
clear;clc; syms T yt t=1.2; y0=0; KA=100; %steady response U_t=(y0-KA)*exp(-t/T) %transient response y_t=80; %given that y...

4 years 前 | 0

| 已接受

已回答
I am getting this error- Unable to perform assignment because the left and right sides have a different number of elements.Can someone help in this regard?
clc; clear all; close all; order=2; size =2; fs=8192; t=[0:1/fs:size] N=fs*size f1=35/2; f2=99/2; voice=cos(2*pi*f...

4 years 前 | 1

| 已接受

加载更多