Beantwortet
Plotting a high order function
plot(x,f2(x),'.k') give the necessary input values to functions created.

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

Beantwortet
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...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 4 Jahre vor | 0

Beantwortet
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...

etwa 4 Jahre vor | 0

Beantwortet
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...

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
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) ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
REgarding plotting of graph in matlab
ylim([15 25])

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
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]

etwa 4 Jahre vor | 0

Beantwortet
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 ()...

etwa 4 Jahre vor | 0

Beantwortet
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

etwa 4 Jahre vor | 1

Beantwortet
'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,...

etwa 4 Jahre vor | 1

Beantwortet
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.

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

etwa 4 Jahre vor | 0

Beantwortet
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...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
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_

etwa 4 Jahre vor | 0

Beantwortet
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...

etwa 4 Jahre vor | 0

Beantwortet
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) ...

etwa 4 Jahre vor | 0

Beantwortet
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.'

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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'...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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]; ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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/...

mehr als 4 Jahre vor | 1

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Mehr laden