Answered
Check for missing argument or incorrect argument data type in call to function 'log'.
Für mich funktioniert es, wenn ich numerische Werte für die Variablen definiere: TP = 500; RP = 200; PP = 201; EPS = 100; A...

3 years ago | 0

Answered
How do i plot this equation in the time domain
see what this does: t = 0:0.01:2*pi; also read about function handles in Matlab: fun = @(t) 5 * (1 + K * m) .* cos(2*pi.*t) ...

3 years ago | 0

Answered
How do I use trading toolbox to get IB option chain?
Using the help of @Scott Tuttle i wrote a function to download the option chain. It can be downloaded at FEX.

3 years ago | 0

| accepted

Submitted


Download Option Chain from Interactive Brokers TWS
Download the option chain from an active TWS session for a specified symbol and date or month and save the results in a table.

3 years ago | 2 downloads |

Answered
runge-Kutta problem command ode45
tspan = [0 5]; y0 = 100; Q = 30; b = 0.2; [t,y] = ode45(@(t,y)Q-b*t*y, tspan, y0); plot (t,y,'-o')

3 years ago | 0

Answered
results are Fractional and long
double(Eint_AB1)

3 years ago | 1

| accepted

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...

3 years 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...

3 years 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...

3 years 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...

3 years 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)+(...

3 years 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...

3 years 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...

3 years 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...

3 years 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...

3 years 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 ...

3 years 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.

3 years 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>

3 years 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^...

3 years ago | 1

| accepted

Answered
char to vector conversion. using matrix of chars (16x128)
str2double or str2num should work for this.

3 years ago | 0

Answered
Keep getting 'ans' output in Matlab function
Call it this way: [outResult, logoutResult] = file1(scalar, genvec)

3 years 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...

3 years 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...

3 years 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_...

3 years 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 ...

3 years 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....

3 years 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 ...

3 years 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...

3 years 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...

3 years ago | 0

Load more