답변 있음
How to prepare a matrix with variables that contain a range of values?
syms c s x % Tsigma Tsigma = [c^2 s^2 2*c*s; s^2 c^2 -2*c*s; -c*s c*s c*2-s^2]; Tsigma = subs(Tsigma,[s, c],[sin(x), cos(x)...

대략 3년 전 | 0

답변 있음
Cubic funtion for interpolating
https://de.mathworks.com/help/matlab/ref/polyfit.html https://de.mathworks.com/help/matlab/ref/polyval.html

대략 3년 전 | 1

| 수락됨

답변 있음
Plot multiple probability distribution function side by side
% My code is not giving me what I want. pd1 = makedist('Normal') pd2 = makedist('Normal',2,1) x = -10:.1:10; pdf_x = pdf(pd1...

대략 3년 전 | 0

| 수락됨

답변 있음
How to solve a linear system A * X = B when B and X are matrices instead as vectors?
linsolve can handle this. From documentation (Input Arguments): "...If B is a matrix, then each column in the matrix represents...

대략 3년 전 | 0

답변 있음
I need to plot "e" by function of all values of "dm" i but can't do it please help
F=2000 ; dm=[12: 5: 37]; f=0.2 ; l=2 ; Q= ((F.*dm)/2)*((l+(pi*f.*dm)/((pi.*dm)-(f*l)))) ; e= (F*l)./(2*pi.*Q); % ^ ...

대략 3년 전 | 0

| 수락됨

답변 있음
How to calculate the area of only white part in the image
Same as in your question yesterday: regionprops will solve both problems in 1 line of code.

대략 3년 전 | 1

답변 있음
Error happen when doing optimization by using "surrogateopt"
f1 is a 2x1 vector - the objective of an optimization has to be a scalar. Thats the error. You need a criterion that expresses t...

대략 3년 전 | 0

| 수락됨

답변 있음
How to concatenate a (REAL) string vector?
A=["abcd","efghijk"; "lm", "opkq"] B = A(:,1) + A(:,2) The more general solution (independent from number of rows or columns o...

대략 3년 전 | 0

| 수락됨

답변 있음
How to insert a cell with string into a table as variable
The solution is inside the error message: B is a cell array of strings specify names in a string array or cell array of cha...

대략 3년 전 | 0

| 수락됨

답변 있음
how to include a 'probability' when coding.
Use this every time you want to reward by random reward = rand(1) <= 0.6 reward = rand(1) <= 0.6 reward = rand(1) <= 0.6 rew...

대략 3년 전 | 2

| 수락됨

답변 있음
Which is the most efficient way to solve a ODE that has a parameter that changes in every period?
Are gamma and beta parameters that result from the gamma / beta functions? Or just scalar parameters? I suggest using other name...

대략 3년 전 | 0

| 수락됨

답변 있음
How to get certain matrix columns.
A = [1 2 3 4 5 6 7 8 9 10 11 12; 13 14 15 16 17 18 19 20 21 22 23 24] A1 = reshape(A',2,[]) b = A1(:,1:3:end) b = b(:)'

대략 3년 전 | 1

| 수락됨

답변 있음
The end operator must be used within an array index expression.
See the original question - i fixed the error. frame = read(v,[600:600:end]); will not work in this case.

대략 3년 전 | 1

| 수락됨

답변 있음
how to remove trailing zeros after rounding a matrix?
format short A = 1.23 format shortG A = 1.23

대략 3년 전 | 0

답변 있음
How to extract a frame every 10 s from the video ?
https://de.mathworks.com/help/matlab/ref/videoreader.read.html#busxibt-2 In your case the interval to take the first frame afte...

대략 3년 전 | 1

| 수락됨

답변 있음
matrix multiple rows with the same value
repmat([20:145:600],2,1)

대략 3년 전 | 1

| 수락됨

답변 있음
not enough input argument error
timespan=[0 15]; y0 = [0 1 0 1 0 1]; [t,y] = ode45(@repressilator,timespan,y0); figure() plot(t,y) xlabel('Time') ylabel(...

대략 3년 전 | 0

| 수락됨

답변 있음
Help: How to add a label (cell 1 x 20) to each bar (total 20 bars) in a bar plot where the bar plot has a 1x 2 dimension?
Try: labels=reshape({'A', 'B', 'C', 'D','E', 'F', 'G', 'D','A', 'B', 'C', 'D','A', 'B',... 'C', 'D','A', 'B', 'C', 'D'}',1...

대략 3년 전 | 0

| 수락됨

답변 있음
How to calculate the center of white part?
Look at the regionprops examples.

대략 3년 전 | 1

답변 있음
Linear Interpolation code and plotting
interp1([1 6],[log(1) log(6)], 2)

대략 3년 전 | 0

답변 있음
Error of sym>convertChar
syms a b c x f = str2sym('a*x^2 + b*x + c') subs(f,x,5) subs(f,[x a b c],[5 1 2 3])

대략 3년 전 | 1

| 수락됨

답변 있음
Optimising parameters in ODE with fminsearch or fmincon and ode15s
I had to make some guesses, check how to adapt the code: a = fminsearch(@myObj,[300 0]); function obj = myObj(a) % only one...

대략 3년 전 | 0

답변 있음
How to solve a cubic equation using Genetic Algorithms?
start here: https://de.mathworks.com/help/gads/ga.html?searchHighlight=ga&s_tid=srchtitle#mw_a07ddf7d-face-4243-a656-f1528b592d...

대략 3년 전 | 0

| 수락됨

답변 있음
Solving an ODE second order
change to the initial conditions as you need: % symbolic variables syms a b y(x) % Define derivatives Dyx = diff(y,x,1) D2y...

대략 3년 전 | 0

| 수락됨

답변 있음
tan(x) graph
I guess you know that your picture is not a tan function... fplot(@tan,[0 7],'LineWidth',2)

대략 3년 전 | 0

| 수락됨

답변 있음
Detection of parts of circles (shape detection)
I dont think that this is correct: "...sometimes the lense is fully in the picture and sometimes not, which makes circle detecti...

대략 3년 전 | 0

답변 있음
Solving equation with symbolic vector variable
use the dot-notation a = [1 2 3 4]; x = sym('x', [1 4]); eqn = a + 4.*x == x; sol_x = vpasolve(eqn, x) sol_x.x1 sol_x.x2 ...

대략 3년 전 | 1

| 수락됨

답변 있음
Splitting time into hours : minutes : seconds from a fractional value.
I guess 15.76 means hours in decimal numbers: [h,m,s] = hms(hours(15.76)) d = duration(h,m,s) gives: h = 15 m = ...

대략 3년 전 | 0

| 수락됨

답변 있음
Why linsolve cannot solve this very simple equation?
To solve this, the rank should be 3. Row 1 and 3 are not linear independent. A = [4,2,2; 5,1,3; 6,0,4] B = [60; 70; 80]; r1...

대략 3년 전 | 0

| 수락됨

답변 있음
Why find cannot handle this very simple task?
You are dealing with doubles, they are not precisly 0.077 - use round: X = -0.1:.001:.25; find(round(X,3) == .077)

대략 3년 전 | 0

더 보기