Beantwortet
Torque of a turbine using Euler's equation
clc; clear all; % T = pQ(r1V1cosa1 - r2V2cosa2) % Alpha is the angle between turbine linear % velocity and absolute p = 1.9...

mehr als 3 Jahre vor | 0

Beantwortet
linspace is causing an error
n2 = [1.2 1.75 2.2]; D = linspace(0,1,100); for k = 1:length(D) T(:,k)= (9.68.*n2.^2)./(11.6964.*n2.^2)+(1-n2.^2).*(5.8564-n2...

mehr als 3 Jahre vor | 1

Beantwortet
How to setting one horizontal axis for 2 subplot?
subplot(3, 1, 1:2); plot(rand(10, 1), 'b.-', 'LineWidth', 2); xticks(1:10) grid on; xticklabels({}) subplot(3, 1, 3); plot...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I solve this please? Write a function called 'corners' that takes a matrix as an input argument and returns four outputs
C = randi([2 10],4) % give this as input in >> command window [top_left, top_right, bottom_left, bottom_right] = corners(C) ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to create a plot for multiple CSV files in a loop?
textscan(fid,'Delimiter',',','Headerlines',12)

mehr als 3 Jahre vor | 0

Beantwortet
I do not understand why this script {8/2<5*3+1>9} with logical operators gives NO (0)?
Matlab evaluates the expression from left to right, If you start with numbers from left to right in your expression, it will fir...

mehr als 3 Jahre vor | 2

Beantwortet
How to input new value as old value using while loop to compute relative error?
r_e = abs((p-p_old)/(p));

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Insert a figure in a report on Web Apps
add(rpt,figure(f1)) Pass the function handle for figure with smallcase

mehr als 3 Jahre vor | 0

Beantwortet
How can I plot the fourier series of a rectangular pulse by calculating the coefficients?
close all; clear; clc; N = 2; f = @(x) rectangularPulse(-1,1,x); x = -2:0.001:2; %2*p is the period p = pi; % the main fun...

mehr als 3 Jahre vor | 0

Beantwortet
Solving an equation with multiple values
f1 = ((2*69*0.3)./(pi*a))*0.5;

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Loop for end before it should
f = 1 g = 2 for i = 1:(length(nb)) %length(nb) represent the number of items selected in the first listbox myExcel = actxserv...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Can Someone help me solve what is wrong with this code
%syms CP Comment this line and try as CP is symbolic. Then you get know whether it's maximum or minimum

mehr als 3 Jahre vor | 0

Beantwortet
How to replace values of a variable in a table (in a cell) with nan?
mycell{5, 1}(1,1).myvariable = nan;

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how we write summation with loop
xl=0; xr=1; %domain[xl,xr] ...

mehr als 3 Jahre vor | 0

Beantwortet
Draw vertical lines which have constant interval
P=[1:432] original_form = load('original_time.mat') time = datetime(original_form.t,'ConvertFrom','datenum') plot(time,P); ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Help with a bifurcation diagram plot
lambda = linspace(0,125,100) xt = linspace(-0.1,5,100)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Index exceeds the number of array elements. Index must not exceed 20. Error in lumped_vortex_parabolic_camber (line 54) dx = xcollocation(i) - xvortex(k);
for i = 1 : 1 : Npanel % change In the first case you used this. But look at the 2nd for loop why you changed to 2*Npanel....

mehr als 3 Jahre vor | 0

Beantwortet
Moving Decimal Places to the right
format long % format long option sprintf('%6f',1.412701202025964e+09)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
fprintf with warning of a lone trailing backslash
folderName = strcat(rootFolder,filesep,timeSteps(m+2).name); fprintf(['\nProcessing folder %s', folderName]); You need ...

mehr als 3 Jahre vor | 1

Beantwortet
I dont get why I am encountering an error message when running this code.
%v_t=20; %v_i=1; %g=10; %expo1=-2*g*t./v_t; %expo2=-2*g*t./v_i; %function I want to integrate and plot:v_t*(1-exp(expo1)+v_...

mehr als 3 Jahre vor | 0

Beantwortet
code no good :(
clc,clear all %% Load Data - Initilize Variables DP980TD_S2 = xlsread('DP980TD-S2.xlsx'); % Data File % Constants widthO...

mehr als 3 Jahre vor | 0

Beantwortet
How can I get the value by choosing 't' and 'x'? ,How should I set the graph range?
L = 30; n = 10; T0=500; T1s=300; T2s=400; dx=L/n; alpha=0.000085; t_final=4800; dt=300; % use a coarse timestep ...

mehr als 3 Jahre vor | 0

Beantwortet
Using nested FOR() loops to populate a matrix
% MacLaurin Series of e^x format longG % define vector to hold series x values X = 0 : 0.01 : 1; % Create matrix to co...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
how to write a function for quadratic equation?
if (d>=0) & (~(a==0)) use binary operator &

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why is my loop not working? "Index exceeds array bounds"
%%%%%% DEFINITIONS %%%%%%% clear Q_lpm=15; Q(1) =(Q_lpm/1000)/60; %m3/s [INPUT] diameter = 0.01; % m [INPUT] t =0.01; % tim...

mehr als 3 Jahre vor | 0

Beantwortet
interpolate (extrapolate?) the values in between two matrices using existing data
A = [1, 2, 3, 4, 5; 0.3654, 0.3634, 0.3663, 0.3665, 0.3677]; B = [16, 17, 18, 19, 20; 0.4653, 0.4636, 0.4652, 0.4620, 0.4715];...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I'm definitely doing the exponential distribution wrong, am I?
N = 1e4; a=0; b=1; x = (a+(b-a)*rand([N,1])); lambda = 11; % try with different lambda values Y = -log(x)/lambda; figure...

mehr als 3 Jahre vor | 0

Beantwortet
speed up the for and if loop
for i = 1:10:300 % use step increments for j = 1:10:500 for k = 1:1000:17000 if(temp(i,:) > 2) ...

mehr als 3 Jahre vor | 0

Beantwortet
ode45 keeps giving me the error shown below.
a = 0.459; lambda1 = 1.11*10^(-2); %units min^-1 lambda2 = 1.38*10^(-4); %units min^-1 Cp0 = 100; %units nM t = 0:7200; %uni...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
ODE with Newton method
clear all close all n=1001 y0=1; xmin=0; xmax=10; x=linspace(xmin,xmax,n); %grid step=(xmax-xmin)/n; %Step Size yy=zer...

mehr als 3 Jahre vor | 0

Mehr laden