Answered
Match the series in the graph
a = 0.3217; x = linspace(-a*sqrt(2)+0.01,a*sqrt(2)-0.01,1000); y = 1./(x.^2/2 + a^2).^1.5; s = zeros(1,numel(x)); for n =...

4 years ago | 0

| accepted

Answered
Internal heat source as a function of x,y and time in pde toolbox
User's Guide, page 5-541, shows you how to define your time-dependent heat source: https://de.mathworks.com/help/pdf_doc/pde/pd...

4 years ago | 0

Answered
Store my for loop in single vector
CMR = inv((k/100).*C1R+(1-(k/100)).*C0R); instead of CMR = inv((x/100).*C1R+(1-(x/100)).*C0R);

4 years ago | 0

| accepted

Answered
Problem fitting with lsqcurvefit
M = [26 93 27 67.9 28 54.5 29 20.5 29.1 20.6 29.2 17.6 29.3 15.7 29.4 13 29.5 12 29...

4 years ago | 1

| accepted

Answered
what will be the multiplication of all c values in loop (in given example), i.e. c1*c2*c3*c4*c5?
a = [1 2 3 4 5]; b = [0 1 0 6 4]; c = eye(2); for i = 1:5 c = c*[1 2+a(i); 1*b(i) 5]; end c

4 years ago | 0

| accepted

Answered
How to plot multiple curves on the same screen for different values of "b" with bvp4c solver?
The solution will be Y1 = b, Y2 = Y3 = 0 Is it that what you want ?

4 years ago | 0

Answered
How to plot this implicit function? (It's one parameter also changes)
So you want several implicit plots in different colors for different values of phi ? Use "fimplicit" in a loop using "hold on"...

4 years ago | 0

Answered
Matlab help throws "Too many input arguments" when clicking on help tab
https://de.mathworks.com/matlabcentral/answers/1791920-how-do-i-fix-the-help-button-when-it-gives-an-error-reading-too-many-inpu...

4 years ago | 0

Answered
I am writing a program for lateral- direction motion of an airvraft using Runga Kutta 4th order method.
%%this is my program: %write the computer programme in Matlab to solve equations of motion of %lateral-directional motion of a...

4 years ago | 0

Answered
extracting rows with the highest value
A = [1 3 4 6 2 5 8 1]; [~,imax] = max(A(:)); [irow,~] = ind2sub(size(A),imax(1)) A(irow,:)

4 years ago | 0

| accepted

Answered
Minimum and Maximum after maximum value
The first element of v which is a maximum is taken. If the last element of v is the maximum, m will be empty. v = [1 5 7 3 2 6...

4 years ago | 0

| accepted

Answered
How to draw contour plot of given function?
x0 = -0.1:0.001:0.1; y0 = -0.1:0.001:0.1; omega = 30; w0 = 0.02; m = 2; [X0,Y0] = meshgrid(x0,y0); f = @(x0,y0)sinh(omega*...

4 years ago | 0

| accepted

Answered
Why am I getting "incompatible array size error" when I am using only scalars in a nested integration problem
i1= @(r,tau) integral(@(x) fc(r,x,tau),0,inf,'ArrayValued',true); i2= @(r,tau) integral(@(x) 1-CC(r,x,tau),0,inf,'ArrayValued',...

4 years ago | 0

| accepted

Answered
Can someone check my code ?
That's exactly what your code does in my opinion. Or give an example where it does not perform as you described it should. Fou...

4 years ago | 0

| accepted

Answered
Minimizing an equation to 0
A = [4 3; 6 2; 7 -3]; B = [1 -3; 2 2; 5 -pi]; C = [12 -0.5; 7 -3; 0 1]; fun = @(p)reshape(A-(p(1)*B+p(2)*C),[],1); sol = lsq...

4 years ago | 0

Answered
Checking multiple values in an equation in MATLAB
format long x = 1271; [y,z] = result(x) function [y,z] = result(x) if x <= 30 disp('Problem not solvable') y =...

4 years ago | 0

Answered
Stability boundaries - intersection with real and Imaginary axis
You can determine the roots analytically because the polynomials have order <= 4. Here is a numerical solution for imag(Z) = 0....

4 years ago | 1

| accepted

Answered
Why ''int'' and ''integral'' return different answers
Your function has singularities at x = 0 and x = 1. Integral doesn't manage to estimate the area under the curve (which goes t...

4 years ago | 0

Answered
Need help understanding where to use the . when writing equations.
Read https://de.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html to understand. Dots are set for element...

4 years ago | 0

| accepted

Answered
Solving for two variable.
I = [7.53*10^(-5) 3.17*10^(-4) 1.07*10^(-3) 3.75*10^(-3) 1.35*10^(-2) 4.45*10^(-2) 1.75*10^(-1) 5.86*10^(-1)]; U = [0.50 0.55 0...

4 years ago | 0

Answered
Newton's Method missing value
If n is the number of Newton steps, you must start with n = 0 instead of n = 1 in "Newtons_method". I counted the number of New...

4 years ago | 0

Answered
Solving system of two (non)-linear eqautions multiple times using a for loop
%% constants rho = 1.3; D = 0.126; %% choose W = 2600; RPM = 6000; Omega = RPM*((2*pi)/60); i = 1500:1000:4500; %Solutio...

4 years ago | 0

Answered
Don't get what is happening in matlab sin() function. need to know difference between sin(2*50*pi*t) and sin(2*1*pi*t)
t1 = 0:0.001:1; x = sin(2*50*pi*t1); t2 = 0:0.1:1; y = sin(2*1*pi*t2); subplot(2,1,1) plot(t1,x) subplot(2,1,2) plot(t2,y...

4 years ago | 3

| accepted

Answered
Get array of elements based on occurrences of another vector
y=[0;1;2;3;4]; x=[1;1;2;2;2]; z{1} = y(x==1); z{2} = y(x==2); z{1} z{2}

4 years ago | 1

| accepted

Answered
Divergent solution using ode45
We don't know the reason - technically, your code is correct. Although I would change it as shown below. What makes you think t...

4 years ago | 1

Answered
Interpolation for 2 dependent output data
Why is there an 181x2 double matrix for each input value ? If there are only two doubles for each input, first use interp1 for...

4 years ago | 0

Answered
I have a csv file (2 variables) saved to my computer and all I want to do is import it to matlab and plot it - how do I do this (sorry I am a beginner)?
One of these methods should work, I guess: https://de.mathworks.com/matlabcentral/answers/72545-how-to-import-csv-file-in-matla...

4 years ago | 0

Answered
plotting graph for Equation with constraints
Use (y.^2)+(x.^2)=1 ((x.*y).^2)+(-P).^2=1 to write x,y as functions of P. Then insert these expressions in T = P.*x+1.5*x....

4 years ago | 0

Answered
adding or subtracting depending on the number
rng ("default") amount = 0.5; variable = 5; number = 1; r = rand; if r >= amount variable = variable - number; else ...

4 years ago | 0

Answered
plotting graph for Equation with constraints
Use (y.^2)+(x.^2)=1 ((x.*y).^2)+(-P).^2=1 to write x,y as functions of P. Then insert these expressions in T = P.*x+1.5*x....

4 years ago | 0

Load more