Beantwortet
Having trouble writing a multiple gravitational physics simulation code, as every planet effects one another.
a(q,:)=(sum(F(q:(q+o-1),:)))./mass(q); %Calculate acceleration of each planet v(q,:)=v(q,:)+a(q,:)*ts; %calula...

etwa 4 Jahre vor | 0

Beantwortet
Trouble graphing this non-linear function
x = 1:100; y = ((factorial(x)).^(1./x))./x; % use element wise division fplot(y,[0 100]) % no space between function and par...

etwa 4 Jahre vor | 0

Beantwortet
I am trying to a series generated from complex function but it gives to me an error.
clear; clc; syms k Delta=0; chi=0; theta=0; alpha=5; phi=0; bn=exp(-0.5*alpha^2)*(alpha^k)/sqrt(gamma(k+1)); bn1=exp(-0...

etwa 4 Jahre vor | 0

Beantwortet
using for loops to calculate compound interest with yearly contributions
N=17804; P=1000; C=1000; r=(10/100); I = 1; while P<=N y(I)=(P*(1+r)); % use an index for desired amount, P=y(I)...

etwa 4 Jahre vor | 0

Beantwortet
Semilogx function giving a linear scale
S = [1e-2 1e-1 1 10 100 1000 1e4]; % Remdesivir concentration, in uM Km = 0.5; % Equilibrium constant, in uM Vmax = 0.82; % ma...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Need help with syntax and how to use sigma in matlab
clear close all Z1=500 Z2=50 Z3=500 u=1 tau1=(2*Z2)/(Z1+Z2) tau2=(2*Z1)/(Z1+Z2) tau3=(2*Z3)/(Z3+Z2) p1=(Z2-Z1)/(Z2+Z1...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Unable to perform assignment because the size of the left side is 1-by-2 and the size of the right side is 2-by-2. (Line 32)
pp=@(t,x)[.23*x(1)-.0133*x(1)*x(2); -.4*x(2)+.0004*x(1)*x(2)] [t,y]=rk4sys(pp,[0,65],[550,20],0.3) figure(1) plot(t,y(:,1),...

etwa 4 Jahre vor | 1

Beantwortet
How to skip a data set in the legend of a plot?
clear; clc; clf; close all; x1 = [0.015 0.020 0.050 0.100 0.200 0.300 0.400 0.500]; y1 = [5.518E-11 7.215E-11 1.832E-10 ...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
how to put for loop value into a vector
k = 0.168:0.168:1.68 ; for x=1:length(k) if k(x)>=0.03 && k(x)<=0.06 h(x)=1.437*k(x)^(-0.279); elseif k(x)>=0.07 && k(x)<=0...

etwa 4 Jahre vor | 0

Beantwortet
fplot invalid parameter error
m=100; k1=1500; k2=2500; k3=700; wb=4.4; Y=0.05; w1=sqrt(k1/m); w2=sqrt(k2/m); w3=sqrt(k3/m); r1=wb/w1; r2=wb/w2; r...

etwa 4 Jahre vor | 1

Beantwortet
Error with the command Geoplot
lat=cell2mat(A.Latitud);% if Latitud is the header name of column. Please check this. There Was extra parenthesis in my pr...

etwa 4 Jahre vor | 0

Beantwortet
Multiplying f(x) with f(-x)
cof = [1 15 7 2] syms x F(x) F = (cof(1)*x.^3+cof(2)*x.^2+cof(3)*x+cof(4)) FF = subs(F,x,-x) Fx = F.*FF % resulting produc...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Discontinuous display in Simulink Scope
Select the plot type as Auto in scope block. This plots the graph as continuous signals instead of discrete ones which you have...

etwa 4 Jahre vor | 0

Beantwortet
Why is my if counter not working
s= 0 x = linspace(-1,1, 50) n = linspace(1,10,50) L = 2 total = 0 s= zeros(size(n)) for i = 1:length(n) s(i) = (8/(p...

etwa 4 Jahre vor | 0

Beantwortet
I need to plot a graph of P, Rdia and Vo, please help me how to get graph. (for every 10 increment of pressure, there is 1 ohm increment of Rdia , and display the output vo)
Rdia = 3673; % dia resistance value in ohm ; Rtemp = 3618; % Temperature resistance value in ohm; R1 = 3600; % fixed resistanc...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Legend wont display lines properly in figure window
lgd = legend('Bundle','30% Opening','50% Opening', ... '65% Opening','85% Opening','100% Opening'); Use without a { } ...

etwa 4 Jahre vor | 0

Beantwortet
gamma function error in calculation
syms x a Y=sym(zeros(1)); Y(1)=0; a=1/2 for i=1:4 if i==5 A=1; B = 0; Y(i+1)=simplify((gamm...

etwa 4 Jahre vor | 0

Beantwortet
Function works with one input but not the other
F(2,:) = Thrust ./ MFR ; F(1,:) = (y .* A_choke) ./ MFR; Check the size of output matrix

etwa 4 Jahre vor | 0

Beantwortet
Index exceeds array dimensions. Index value 150002 exceeds valid range [1-150001] for array 'v'.
for n = 1:length(t)-1; Error shows clearly that vector _v_ has 1 additional element. Change the loop as above since v(n+1) ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
I want to contour plot the data as shown in attached figure from my equation. I am not able to get the gaussian type behavior. What's wrong with my code?
h_t=linspace(100,500,100); r=linspace(-100,100,500); [H,R]=meshgrid(h_t,r); Rho_m=Ib.*(Rho./(H)).^2.*exp(-(2*R.^2./(H))); %...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Zeros error when entering matrix data
roomLength=zeros(1,(numberRooms(i))); roomWidth=zeros(1,(numberRooms(i))); Give the size of _numberRooms_

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
find the coefficients a, b, and c of the quadratic polynomial. that passes through the three points (x, y)
syms a b c x = [1 4 5]; y = [4 73 120]; eqn = y == a*x.^2+b*x+c sol = solve(eqn,[a b c])

etwa 4 Jahre vor | 0

Beantwortet
i have 300 sheets in one worksheet in excel. i wan to import this to matlab. I want to create loop where it reads all sheets and plot graph on a same graph.
hold all for I = 1:length(num) A(:,I) = xlsread('C:\Users\varun\OneDrive\Desktop\New folder\asd.xlsx',num2str(I),'A7:A26'); ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Plot summation series | For Loop | Creep Strain
clear all;clc %% Linear Creep Example s=100; % constant tensile stress, (MPa) t=linspace(0,10000,11); % duration of applied ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
finite difference method scheme
clc clear all %%%%%%%%%%%%%%% Inputs r_in=1; % Inside Radius of polar coordinates, r_in, say 1 m r_out = 2; % Outside Radin...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Changing the variable used in a loop
tube_inner_R = 0.003 tube_L=[12.14 6.46 9.84 8.17]; % put them in vector for inst = 1:4 tube_V(inst)=pi*tu...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
what is wrong with my calculation?
syms rs xs rp xp [xs,xp]=solve(rs*rp^2./(rs^2+(xs+xp)^2)==rp, xp*rs^2+xs^2*xp+xs*xp^2==0,[xs, xp])

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Array after nmz function to create a bar graph
array=[quiescence; walking; eating; climbin; mating] % use []

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Ask user for 3 equations and solve ODE
% solve u'(t) = F(t,u(t)) where u = [u1(t), u2(t), u3(t)]' % using forward euler method % Initial conditions and setup neqn...

etwa 4 Jahre vor | 0

Beantwortet
Graph are not following the if statement
Modify this part of code and check for k = 1:length(nDp) if nDp(k) > 100 nDp(k) = 100; else nDp(k) = (Lc*Vt(k))/...

etwa 4 Jahre vor | 0

| akzeptiert

Mehr laden