Answered

Export results from several excel files into one excel file

Partikel_RL(xy,:)=Elementanzahl_RL(xy,:); % second for loop is not needed end

Export results from several excel files into one excel file

Partikel_RL(xy,:)=Elementanzahl_RL(xy,:); % second for loop is not needed end

4 meses ago | 0

Answered

Legend wont display lines properly in figure window

lgd = legend('Bundle','30% Opening','50% Opening', ... '65% Opening','85% Opening','100% Opening'); Use without a { } ...

Legend wont display lines properly in figure window

lgd = legend('Bundle','30% Opening','50% Opening', ... '65% Opening','85% Opening','100% Opening'); Use without a { } ...

4 meses ago | 0

Answered

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

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

4 meses ago | 0

Answered

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

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

4 meses ago | 0

Answered

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

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

4 meses ago | 0

| accepted

Answered

Plot power spectrum from FFT

power = abs(y).^2/(fs*n); % power of the DFT plot(f,power) Divide with _fs_ sampling frequency and plot it

Plot power spectrum from FFT

power = abs(y).^2/(fs*n); % power of the DFT plot(f,power) Divide with _fs_ sampling frequency and plot it

4 meses ago | 0

Answered

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))); %...

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))); %...

4 meses ago | 0

| accepted

Answered

Zeros error when entering matrix data

roomLength=zeros(1,(numberRooms(i))); roomWidth=zeros(1,(numberRooms(i))); Give the size of _numberRooms_

Zeros error when entering matrix data

roomLength=zeros(1,(numberRooms(i))); roomWidth=zeros(1,(numberRooms(i))); Give the size of _numberRooms_

4 meses ago | 0

| accepted

Answered

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

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

4 meses ago | 0

Answered

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'); ...

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'); ...

4 meses ago | 0

| accepted

Answered

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

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

4 meses ago | 0

| accepted

Answered

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

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

4 meses ago | 1

| accepted

Answered

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

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

4 meses ago | 0

| accepted

Answered

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

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

4 meses ago | 0

| accepted

Answered

Array after nmz function to create a bar graph

array=[quiescence; walking; eating; climbin; mating] % use []

Array after nmz function to create a bar graph

array=[quiescence; walking; eating; climbin; mating] % use []

4 meses ago | 0

| accepted

Answered

a run function gives an error due to size

resultt(bi,bj) = birfazson(1,birfazson(2,:) == 1); Ok. Check by removing transpose at the end

a run function gives an error due to size

resultt(bi,bj) = birfazson(1,birfazson(2,:) == 1); Ok. Check by removing transpose at the end

4 meses ago | 0

Answered

What is this line of code doing?

Checking the value of *blob(i,j-1))* in _blob_ matrix and replacing it with this value *blob(i-1,j)*.

What is this line of code doing?

Checking the value of *blob(i,j-1))* in _blob_ matrix and replacing it with this value *blob(i-1,j)*.

4 meses ago | 0

Answered

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

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

4 meses ago | 0

Answered

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

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

4 meses ago | 0

| accepted

Answered

Plotting error "Vectors must be the same length"

t(n+1)=t(n)+DeltaT; Change this line to above

Plotting error "Vectors must be the same length"

t(n+1)=t(n)+DeltaT; Change this line to above

4 meses ago | 0

| accepted

Answered

Matrix calculation(replacing a new value instead of matrix element)

a1=7; a2=12; a3=4; w1=min([a1,a2,a3]); format shortG f1=double(a1-w1) f2=double(a2-w1) f3=double(a3-w1) %%%%%%%%%%%%%%%%...

Matrix calculation(replacing a new value instead of matrix element)

a1=7; a2=12; a3=4; w1=min([a1,a2,a3]); format shortG f1=double(a1-w1) f2=double(a2-w1) f3=double(a3-w1) %%%%%%%%%%%%%%%%...

4 meses ago | 1

Answered

Probability calculation for Bernoulli trials.

function P = bn_atleast(p,N,k) rename the first line of bn_atleast to above

Probability calculation for Bernoulli trials.

function P = bn_atleast(p,N,k) rename the first line of bn_atleast to above

4 meses ago | 0

Answered

converting date and time string to datetime object

k = 1; while k<=length(Ionotable.x_Time) x = (Ionotable.x_Time(k)) %x_Time is the column where the date and tie values...

converting date and time string to datetime object

k = 1; while k<=length(Ionotable.x_Time) x = (Ionotable.x_Time(k)) %x_Time is the column where the date and tie values...

4 meses ago | 0

| accepted

Answered

Having errors in a multivariable for loop.

temp_int=24; temp_ext=10; U=5; hi=4; h=1:5; temp_diff=(U/hi)*(temp_int-temp_ext); I = 0:0.1:2.5; x = 0:0.1:2.5; n=...

Having errors in a multivariable for loop.

temp_int=24; temp_ext=10; U=5; hi=4; h=1:5; temp_diff=(U/hi)*(temp_int-temp_ext); I = 0:0.1:2.5; x = 0:0.1:2.5; n=...

4 meses ago | 1

| accepted

Answered

Multiple sine periods with a specific fundamental frequency

%%Time specifications: f = 100; %fundamental frequenxy Fs = 20*f; % samples per se...

Multiple sine periods with a specific fundamental frequency

%%Time specifications: f = 100; %fundamental frequenxy Fs = 20*f; % samples per se...

4 meses ago | 0

Answered

need to use this analytical solution to plot the absolute percent error in the concentration A at each time step for Euler's method

nsteps = 12; t = zeros (nsteps,1); A = zeros (nsteps,1); B = zeros(nsteps, 1); P = zeros(nsteps,1); A(1) = 1; B(1) = 3; C...

need to use this analytical solution to plot the absolute percent error in the concentration A at each time step for Euler's method

nsteps = 12; t = zeros (nsteps,1); A = zeros (nsteps,1); B = zeros(nsteps, 1); P = zeros(nsteps,1); A(1) = 1; B(1) = 3; C...

4 meses ago | 0

Answered

Finite Difference Centre Time Centre Space

%Set up plots to solve linear advection equation using a CTCS scheme u = 2.0; %Set constant velocity value nx=51; %Number of G...

Finite Difference Centre Time Centre Space

%Set up plots to solve linear advection equation using a CTCS scheme u = 2.0; %Set constant velocity value nx=51; %Number of G...

4 meses ago | 0

Answered

I keep getting an error. Help

tspan = [0:0.05: 8]; y = [0.4; 0]; [t , y]= ode45(@odefun, tspan, y); plot (t, y(:, 1)); xlabel ('t'); ylabel ('y(1'); tit...

I keep getting an error. Help

tspan = [0:0.05: 8]; y = [0.4; 0]; [t , y]= ode45(@odefun, tspan, y); plot (t, y(:, 1)); xlabel ('t'); ylabel ('y(1'); tit...

4 meses ago | 0

Answered

How to give a piecewise function as input

clear all clc syms t s y(t) Y dy(t)=diff(y(t)); d2y(t)=diff(y(t),2); F = [-1 1 16]; %input('Input the coefficients [a,b,c]:...

How to give a piecewise function as input

clear all clc syms t s y(t) Y dy(t)=diff(y(t)); d2y(t)=diff(y(t),2); F = [-1 1 16]; %input('Input the coefficients [a,b,c]:...

4 meses ago | 0

Answered

my plot for current vs speed of an energy efficient vs standard efficiency induction machine is not showing any values

clear s=0.0005:0.0005:1; %Slip [pu] f = 50; p = 4; ns=120*f/p; n=(1-s)*ns; R1=1.1; X1 = 0.2; Xm = 1e-3; R2 = 3.4; X2...

my plot for current vs speed of an energy efficient vs standard efficiency induction machine is not showing any values

clear s=0.0005:0.0005:1; %Slip [pu] f = 50; p = 4; ns=120*f/p; n=(1-s)*ns; R1=1.1; X1 = 0.2; Xm = 1e-3; R2 = 3.4; X2...

4 meses ago | 0