Respondida
Coupled differential equation to solve fluids
syms x(t) y(t) x0_t x1_t x2_t y0_t y1_t y2_t r0 r1 r2 f1 = x0_t == (-3+0.2*sin(0.2*t)); f2 = x1_t == (3+0.1*sin(0.1*t)); f3 =...

más de 6 años hace | 1

| aceptada

Respondida
Solve overspecified equation system
If you have symbolic toolbox, use: % This part builds a system to solve with fsolve syms u1 u2 up2 l1 l2 xa ya xpa ypa ap0 x ...

más de 6 años hace | 0

| aceptada

Respondida
Iterate between fixed numbers in an array and store into a matrix.
I suggest to reshape the array to have 250 rows. The most Matlab functions like mean, max, min, sum... work on the columns of an...

más de 6 años hace | 0

Respondida
Delay differential equation of glucose insulin model
Another try, after reading a little bit about dde's: [t,y] = delayed; % plot results subplot(3,1,1) plot(t,y(1,:),'LineWid...

más de 6 años hace | 0

Respondida
What is the version of Computer Vision Toolbox with Matlab R2019b?
MATLAB Version: 9.7.0.1216025 (R2019b) Update 1 MATLAB License Number: ********** Operating System: Microsoft Windows 10 Home ...

más de 6 años hace | 1

Respondida
Using Ode45 to solve differential equation with time dependent variable
% call the nested function [t,dTempdt] = my_assignment; % plot the results plot(t,dTempdt) function [t,dTempdt] = my_assig...

más de 6 años hace | 0

| aceptada

Respondida
DOUBLE cannot convert the input expression into a double array.
During the first run of your loop U=0.0, which can be converted to double in line 144 and stored in SF(1). But in the second run...

más de 6 años hace | 0

Respondida
How to get double array from string
>> A = str2num('[1,2,3:6,9,12:15]') A = 1 2 3 4 5 6 9 12 13 14 15

más de 6 años hace | 0

| aceptada

Respondida
subplot of trigonometric function
A = @(x) sin(x); subplot(3,1,1) fplot(A,[1 50]) B = @(x) cos(x); subplot(3,1,2) fplot(B,[1 50]) C = @(x) tan(x); subplot(...

más de 6 años hace | 0

Respondida
Trouble with Nested Function - So I am trying to have 'equation1' return the outputs [G, H, K, C] but it doesn't recognize them... why? Any help is appreciated
% Variables to play with L1 = 1; L2 = 3; L3 = 4; L4 = 2.6 theta1 = 15; theta2 = 47.5; omega = 66; % Call your function...

más de 6 años hace | 0

Respondida
making a graph in matlab
doc subplot small example: A = randi(50,10,2); subplot(3,1,1) scatter(A(:,1),A(:,2),'*r') B = randn(20,60); subplot(3,1,...

más de 6 años hace | 0

Respondida
como crear un .gif
https://de.mathworks.com/matlabcentral/fileexchange/28766-animated-gif-creator

más de 6 años hace | 0

Respondida
Error when solving symbolic equation in nested for loop
The first time your loop runs free of errors, but then your code is selfkilling, because you cast the symbolic variable b to be ...

más de 6 años hace | 0

| aceptada

Respondida
Error using horzcat Dimensions of matrices being concatenated are not consistent.
Do the following (i did for an example image on my computer): im = imread('*:\***\***\****.PNG'); im=double(im); m=mean(mean(...

más de 6 años hace | 0

Respondida
How to use GlobalSearch to find global minimum
Try the following: ver Its output should look somehow like this: >> ver ----------------------------------------------------...

más de 6 años hace | 0

| aceptada

Respondida
do anyone know how to put all iteration of a for loop into a matrix?
clear all clc a=0; b=8; n=2; run=input('Input your number of iteration:'); i=(1:run); integral_matrix = zeros(numel(i),1);...

más de 6 años hace | 1

| aceptada

Respondida
Optimization with MATLAB solver's
Since we do not know what kind of problem you try to solve, all we can give is a general advice. If you follow the links you sho...

más de 6 años hace | 0

Respondida
Solving 2 ODE's with ode45
tfinal = 100; tspan = [0 tfinal]; winitial = [1 300]; [t,y] = ode45(@sub1,tspan,winitial) plot(t,y,'LineWidth',2) %%%...

más de 6 años hace | 0

| aceptada

Respondida
Explicit root of symbolic equations
syms d1 d2 d3 d4 d5 d6 h11 h12 h13 h14 h21 h22 h23 h24 h41 h42... h45 h46 h51 h52 h55 h56 h61 h62 h65 h66 eq1 = h11*d1+h12...

más de 6 años hace | 0

| aceptada

Respondida
could anyone help me how to remove the zeros that comes after the number present after the decimal
Use format shortG: A = 12.3400 2.3400 >> format shortG >> A A = 12.34 2.34

más de 6 años hace | 1

Respondida
Sum of near infinite series?
Think about your row. You can rewrite it - always two elements are the same as n^2/(n^2-1). With this knowledge read about <h...

más de 6 años hace | 0

Respondida
Max and Min of matlab function
f = @(r) (150.*(((1 + r).^36)-1) - 4500.*(r.*(1 + r).^36)); t = fplot(f,[0.0001 0.02]); high = max(t.YData) low = min(t.YDa...

más de 6 años hace | 0

| aceptada

Respondida
Babylonian algorithm - square root of a number
What is the problem - works for me: y = sqrtB([16 4 9]); function y=sqrtB(x) % It returns a row vector containing the...

más de 6 años hace | 1

| aceptada

Respondida
how do I create Matraix with same elements for several rows
turbines = [25,35,45,55,65]; how_often = 10; No_of_turbines = repmat(turbines,how_often,1) to get it ten times: No_of_turbin...

más de 6 años hace | 0

| aceptada

Respondida
Save lines from a text file
It is a bad idea to store the lines all in different variables - this point has been discussed here for many times... Use a tabl...

más de 6 años hace | 1

| aceptada

Respondida
Failure in initial objective function evaluation. LSQNONLIN cannot continue.
The problem is that your DATA file is not complete - the sheet that should contain the data for N ist empty - therefore N is als...

más de 6 años hace | 0

| aceptada

Respondida
how can i give output of a python file as input to a matlab matrix
Look here: https://de.mathworks.com/matlabcentral/answers/486354-read-a-matrix-from-a-text-file#answer_397428

más de 6 años hace | 0

Respondida
reading large text files into matrix
As already stated in the other question you asked with the same content, a possible way is: A = readcell('output1.txt'); B = s...

más de 6 años hace | 0

Respondida
read a matrix from a text file
A = readcell('output1.txt'); B = str2num(char(replace(split(string([A{:,1}]),']'),... {'00', '10', '01', '11', '['},{'0 0'...

más de 6 años hace | 0

Respondida
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 3-by-3.
You could check: https://de.mathworks.com/matlabcentral/fileexchange/69896-linalgsubstitute I used this function to build the ...

más de 6 años hace | 0

Cargar más