Réponse apportée
Newton Raphson method for a system of non-linear equations?
Here's a simple example for you to follow: % Functions f = @(x,y) x^2 + y - 5.94; % i.e. the equation is x^2+y=5.94 g = @(x,...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
No feasible solution in optimisation in linprog
I don't know if this will fix your problem, but I think the first number in the second row of A1 should be 8 not 2.

environ 3 ans il y a | 0

Réponse apportée
Simple relaxation method Matlab
For the simple relaxation technique to work the A matrix needs to be diagonally dominant. Your A is not diagonally dominant - s...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Solve a system of 3 second order equations
Write your equations as 6 first order equations like so: where I've assumed you have pre-defined omegaout and thetaout as fun...

environ 3 ans il y a | 0

Réponse apportée
Unable to solve nonlinear equation using fsolve as the message shows No solution found
fminsearch makes a reasonable attempt: F1 = @(a,b) -9.135789053E+00-log(a)+166.2509975*a+5.84074229*b+... -166.2509975*a^2...

environ 3 ans il y a | 2

Réponse apportée
How to solve and plot this set of differential equations?
If rho starts at 0, then drho/dtheta will be zero and rho will not change from zero according to your first ode. If rho and drh...

environ 3 ans il y a | 0

Réponse apportée
How can I add two differential equations to the system in a given time interval?
Like this? (though I'm not sure I've interpreted which constants apply during which interval correctly!) Tspan = 0:30; C0 =...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
How do I plot Rosette-like diagram in this case?
Something like this? data=[10 10 30 100; 20 50 70 150; 30 45 60 120]; theta0 = deg2rad(data(:,2)); thetaf = deg2r...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Iteration of multiple nonlinear functions
Here's a quick and dirty way. I'll leave you to modify the following to record all the temperatures at every step. %Given valu...

environ 3 ans il y a | 0

Réponse apportée
converting table values to RPM
B{:,7}./(2*pi)*60

environ 3 ans il y a | 0

| A accepté

Réponse apportée
using num2str for subplot titles
Try title(['Q1S', num2str(k)]) i.e. enclose the two terms within square brackets.

environ 3 ans il y a | 0

| A accepté

Réponse apportée
control and simulation of petroleum distillation column
The following works, but probably doesn't contain all the right data or equations! % CALCULATE MATERIAL BALANCES FOR THE DISTIL...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Error with plot command
You haven't specified function atten_func_dist, so we can't run your code to test it. You specify fre as a constant, then us...

environ 3 ans il y a | 2

| A accepté

Réponse apportée
How to combine multiple curve fits in one plot
Use hold on after plotting the first figure

environ 3 ans il y a | 0

Réponse apportée
How to represent [airfoil] coordinates as a polynomial
How about using a spline fit? After loading your data and calling the first column x and the second column y try xfit = linspa...

environ 3 ans il y a | 0

Réponse apportée
1D melting problem with Neumann's analytical solution
eps is a built-in constant so better not to use it as a variable. Your png files show it is xi not epsilon. Try the following ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Overlay plots of different angles of incidence.
Remove the word figure and add hold on after the plot grid on [Fr,In] = meshgrid(Frequency,Incident); plot3(Fr,In,Reflectivit...

environ 3 ans il y a | 0

Réponse apportée
How can write in MATLAB the following expression?
Try ket0 = [1; 0; 0] ket1 = [0; 1; 0]

environ 3 ans il y a | 0

| A accepté

Réponse apportée
I don't understand why does it give error?
Put the functions at the end. Tidy up one or two minor errors to get: %########### BF-PSO.m file ############# %####### Butter...

environ 3 ans il y a | 0

Réponse apportée
How to count steps represented by the acceleration data given in text file?
Like this (you can plot the other two - look up help on subplot): M = csvread('walking.txt'); x = M(:,1); y = M(:,2); z = M(:,...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Bisection method add iteration table into my code
Something like this? my_fun = @(x) exp(x) - 3*x; low = 0; high = 1; tolerance = .00001; [x, x0] = bisection(my_fun, low, hi...

environ 3 ans il y a | 0

Réponse apportée
I'm trying to solve this code for internal ballistic using ode45.This is my first time using ode
This works (note that Matlab doesn't accept implied multiplication), but doesn't look sensible - what about deriv(2)? y_initial...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Error with brackets symsum
Do you mean something more like this? N = 100; % Total number of particles one = 1; alpha = 1; K = 7; % 7 states n0 = 4*o...

environ 3 ans il y a | 0

Réponse apportée
How to plot the figure in LT?
Use the mod function help mod

environ 3 ans il y a | 0

Réponse apportée
How to deal with rounding error in this example?
How about i = 1:20001; A = -2000 + (i-1)*0.2;

environ 3 ans il y a | 1

Réponse apportée
Get back variables out of function inside a for loop
Here's one way J = [2.5 27 56]; WZ = [12.2 23.2 33]; M1 = 22; I1 = 2600; for ii = 1:numel(WZ) slope(ii) = (J(ii)-M1)...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Plot dispersion curves using Bloch theorem
Like this? OmegaR = 1; mR = 0.125; Omega = 0:0.01:2.5; mu = acos(1 - Omega.^2.*(1+mR./(1-Omega.^2/OmegaR^2))/2); plot(i...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
how to do sensitivity analysis of three variables using MATLAB
Depends what your measure of sensitivity is. One possibility is to do a Monte-Carlo simulation and use the standard error on th...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
MATLAB doesn't plot my function
Try fplot(test1)

environ 3 ans il y a | 0

| A accepté

Réponse apportée
I am trying to plot the each value of C at different theta values, but I found an error. Error: Invalid expression. When calling a function or indexing a variable, use parenth
Do you want something more along the following lines? c=[0.5,0.75,1,1.1]; theta=-pi:0.01:pi; %a=zeros(1,629); for k=1:numel(...

environ 3 ans il y a | 0

Charger plus