Answered

Hello dear, can anybody helping me, how can I calculate this matrix in Matlab, i want to find this Unknown value, Ma and Va?

A = [1 5; 0 1] b = [46; 16] sol = A\b

Hello dear, can anybody helping me, how can I calculate this matrix in Matlab, i want to find this Unknown value, Ma and Va?

A = [1 5; 0 1] b = [46; 16] sol = A\b

18 hours ago | 0

Answered

Matrix subtraction every two adjacent column

% sample data A = randi(10,5,3) % second col minus first and so on B = A(:,2:end) - A(:,1:end-1) % first col minus secon...

Matrix subtraction every two adjacent column

% sample data A = randi(10,5,3) % second col minus first and so on B = A(:,2:end) - A(:,1:end-1) % first col minus secon...

15 days ago | 0

Answered

Extracting subplots from a matrix

use a loop: % randomized data to illustrate: M = randn(16,80); for k = 1:size(M,1) subplot(4,4,k) plot(M(k,:)) e...

Extracting subplots from a matrix

use a loop: % randomized data to illustrate: M = randn(16,80); for k = 1:size(M,1) subplot(4,4,k) plot(M(k,:)) e...

25 days ago | 1

| accepted

Answered

How to solve Multiple DOF Mass Spring Damper system and find/plot acceleration, velocity & displacement vs time

tspan=[0 10]; % Simulation time z0=[0;0]; % Initial conditions for forced vibration [t,z]=ode45(@forced_vibration,tspa...

How to solve Multiple DOF Mass Spring Damper system and find/plot acceleration, velocity & displacement vs time

tspan=[0 10]; % Simulation time z0=[0;0]; % Initial conditions for forced vibration [t,z]=ode45(@forced_vibration,tspa...

1 month ago | 0

Answered

how to change 3d array to 2 d array

a = ['A'; 'B'; 'C'; 'A'; 'B'; 'C']; b = [1; 1; 1; 2; 2; 2]; c = ['N'; 'J'; 'N'; 'J'; 'N'; 'J']; T = table(a,b,c) T_new = uns...

how to change 3d array to 2 d array

a = ['A'; 'B'; 'C'; 'A'; 'B'; 'C']; b = [1; 1; 1; 2; 2; 2]; c = ['N'; 'J'; 'N'; 'J'; 'N'; 'J']; T = table(a,b,c) T_new = uns...

1 month ago | 1

| accepted

Answered

Can someone explain why I am getting the error "Not enough input arguments (line 2)"?

x0=[1;1]; [x,f]=fmincon(@fun,x0,[],[],[],[],[],[],@mycon) z=peaks; surf(z); function f = fun( x ) f = 4./x(1)+9./x(2)+(...

Can someone explain why I am getting the error "Not enough input arguments (line 2)"?

x0=[1;1]; [x,f]=fmincon(@fun,x0,[],[],[],[],[],[],@mycon) z=peaks; surf(z); function f = fun( x ) f = 4./x(1)+9./x(2)+(...

1 month ago | 0

Answered

Using fzero for intesection and "integral" for area calculation

clear, clc, clear plot format short g=@(x)exp((-x.^2)./2); h=@(x) x.^2-4.*x; f=@(x) g(x) - h(x); x=linspace(-1,5,100); p...

Using fzero for intesection and "integral" for area calculation

clear, clc, clear plot format short g=@(x)exp((-x.^2)./2); h=@(x) x.^2-4.*x; f=@(x) g(x) - h(x); x=linspace(-1,5,100); p...

1 month ago | 0

| accepted

Answered

solving non linear equations

Your code works properly for me. To access the the results - for example for the solution if N in the third iteration use: >> s...

solving non linear equations

Your code works properly for me. To access the the results - for example for the solution if N in the third iteration use: >> s...

1 month ago | 0

Answered

how to conver .csv data class from table to double

If it is only numeric data and a and b are of the same dimensions this should work: c = a{:,:} + b{:,:} for example: a1 = ran...

how to conver .csv data class from table to double

If it is only numeric data and a and b are of the same dimensions this should work: c = a{:,:} + b{:,:} for example: a1 = ran...

1 month ago | 0

| accepted

Answered

How to convert time stamp 11:21:17.155 into seconds in MATLAB??

format longG a = '11:21:17.155'; b = seconds(duration(a,'InputFormat','hh:mm:ss.SSS')) results in: b = 4...

How to convert time stamp 11:21:17.155 into seconds in MATLAB??

format longG a = '11:21:17.155'; b = seconds(duration(a,'InputFormat','hh:mm:ss.SSS')) results in: b = 4...

1 month ago | 1

| accepted

Answered

numeric integral, symbolic function, whats wrong here?

clc clear syms t; rho = exp(sin(t)); theta = 2*exp(sin(t)); phi = 3*exp(sin(t)); rho_dot = diff(rho); theta_dot ...

numeric integral, symbolic function, whats wrong here?

clc clear syms t; rho = exp(sin(t)); theta = 2*exp(sin(t)); phi = 3*exp(sin(t)); rho_dot = diff(rho); theta_dot ...

1 month ago | 0

| accepted

Answered

Supplied objective function must return a scalar value. ERROR in fmincon

J is a 1x6 vector, but should be a scalar. You have to find out why and fix this.

Supplied objective function must return a scalar value. ERROR in fmincon

J is a 1x6 vector, but should be a scalar. You have to find out why and fix this.

1 month ago | 0

Answered

Bvp with unknown parameter

Try this using a good initial guess: <https://de.mathworks.com/help/matlab/math/solve-bvp-with-unknown-parameter.html>

Bvp with unknown parameter

Try this using a good initial guess: <https://de.mathworks.com/help/matlab/math/solve-bvp-with-unknown-parameter.html>

2 months ago | 1

Answered

Matrix symbolic calculation doesn't simplify expressions

try simplify - here is an example with your expression: syms w E = eye(3) * - (2^(1/2)*((2^(1/2)*w*1i)/2 - 2^(1/2)/8))/2 + (2^...

Matrix symbolic calculation doesn't simplify expressions

try simplify - here is an example with your expression: syms w E = eye(3) * - (2^(1/2)*((2^(1/2)*w*1i)/2 - 2^(1/2)/8))/2 + (2^...

2 months ago | 1

| accepted

Answered

char to vector conversion. using matrix of chars (16x128)

str2double or str2num should work for this.

char to vector conversion. using matrix of chars (16x128)

str2double or str2num should work for this.

3 months ago | 0

Answered

Keep getting 'ans' output in Matlab function

Call it this way: [outResult, logoutResult] = file1(scalar, genvec)

Keep getting 'ans' output in Matlab function

Call it this way: [outResult, logoutResult] = file1(scalar, genvec)

3 months ago | 0

| accepted

Answered

matrix manupulation and reading diagonally

This function may help: M = [13,10,5,2;7,14,11,6;3,8,15,12;1,4,9,16] MyResult = readDiag(M) function R = readDiag(M) R = c...

matrix manupulation and reading diagonally

This function may help: M = [13,10,5,2;7,14,11,6;3,8,15,12;1,4,9,16] MyResult = readDiag(M) function R = readDiag(M) R = c...

3 months ago | 0

| accepted

Answered

How to cite only part of a vector in an equation?

One possible way: You could use findgroups in combination with splitapply. For example, a JaneDoe group would be a member of th...

How to cite only part of a vector in an equation?

One possible way: You could use findgroups in combination with splitapply. For example, a JaneDoe group would be a member of th...

3 months ago | 0

Answered

how to train image?

A good starting point maybe here: https://de.mathworks.com/help/deeplearning/getting-started-with-deep-learning-toolbox.html?s_...

how to train image?

A good starting point maybe here: https://de.mathworks.com/help/deeplearning/getting-started-with-deep-learning-toolbox.html?s_...

3 months ago | 0

| accepted

Answered

How can i use toeplitz in cell arrays?

G = cell(1,2); G{1} = ones(2); G{2} = 2*ones(2); c = [G{1} G{2}]; r = [G{1} zeros(2)]; result = toeplitz(c,r) results ...

How can i use toeplitz in cell arrays?

G = cell(1,2); G{1} = ones(2); G{2} = 2*ones(2); c = [G{1} G{2}]; r = [G{1} zeros(2)]; result = toeplitz(c,r) results ...

3 months ago | 0

Answered

Solving equation for a value of x

You can use polyder, that calculates the derivative of a polynomial and then you can calculate the result at x=20 using polyval....

Solving equation for a value of x

You can use polyder, that calculates the derivative of a polynomial and then you can calculate the result at x=20 using polyval....

3 months ago | 0

| accepted

Answered

Index in position 1 is invalid PID Controller

When you run this the first time you first call the inbuilt function tf and then later you create a variable, which is named tf ...

Index in position 1 is invalid PID Controller

When you run this the first time you first call the inbuilt function tf and then later you create a variable, which is named tf ...

3 months ago | 0

Answered

min- imum number of coins required to pay

You have some issues in your if-else structure, but also you have a numerical problem - use uint datatype to avoid this: [NumCo...

min- imum number of coins required to pay

You have some issues in your if-else structure, but also you have a numerical problem - use uint datatype to avoid this: [NumCo...

3 months ago | 1

| accepted

Answered

Problems using NVIDIA GeForce RTX 3090 for Deep Learning

Even if you don't like it, the best and probably most up-to-date answer to this question is: https://de.mathworks.com/matlabcen...

Problems using NVIDIA GeForce RTX 3090 for Deep Learning

Even if you don't like it, the best and probably most up-to-date answer to this question is: https://de.mathworks.com/matlabcen...

3 months ago | 0

Answered

Show every step of lsqnonlin won't work

I think you look for something like this: phi1=1:((2*pi/10.71)):2*pi; r = -0.5 + (0.5 + 0.5) * rand(1,10); xrand ...

Show every step of lsqnonlin won't work

I think you look for something like this: phi1=1:((2*pi/10.71)):2*pi; r = -0.5 + (0.5 + 0.5) * rand(1,10); xrand ...

3 months ago | 0

Answered

4-D uint8 , what does it mean?

There is a 2D for height and width of the video, which shows the resolution, the 3rd D is for example is of size 3 for RGB or of...

4-D uint8 , what does it mean?

There is a 2D for height and width of the video, which shows the resolution, the 3rd D is for example is of size 3 for RGB or of...

3 months ago | 1

| accepted

Answered

Solve nonlinear equation using ODE45 function with different initial conditions

Corrected: %% Main Script L = 1; g = 9.81; h = 0.25; t = [0 5]; A = [0 1;(g/L) 0]; B =[0 1]'; Ics = [pi,0;pi/2 0;pi/5 ...

Solve nonlinear equation using ODE45 function with different initial conditions

Corrected: %% Main Script L = 1; g = 9.81; h = 0.25; t = [0 5]; A = [0 1;(g/L) 0]; B =[0 1]'; Ics = [pi,0;pi/2 0;pi/5 ...

3 months ago | 0

Answered

Getting value of an optimisation variable in an optimisation problem

disp(sol)

Getting value of an optimisation variable in an optimisation problem

disp(sol)

3 months ago | 0

Answered

How can i write a Objective function in vectorized form for GA optimization toolbox when the Objective function has many varialbess?

str1 = ("x(:," + (1:100) + ") .*"); str2 = ("x(:," + (101:200) + ") .*"); str3 = ("x(:," + (201:300) + ") +"); str = vertcat(...

How can i write a Objective function in vectorized form for GA optimization toolbox when the Objective function has many varialbess?

str1 = ("x(:," + (1:100) + ") .*"); str2 = ("x(:," + (101:200) + ") .*"); str3 = ("x(:," + (201:300) + ") +"); str = vertcat(...

3 months ago | 1

| accepted