Answered
How do I solve lhs=rhs by iteration?
Geology is regrettably not an area of my expertise, so I am not familiar with what you are doing. It might be best to appro...

9 years ago | 0

Answered
How can I solve This system of ODEs?
You can create a function usable in the numeric ODE solvers by adding: [odes_vf, vfsubs] = odeToVectorField(odes); odes...

9 years ago | 1

Answered
Read txt-file with different sizes of columns
I would use *|cell2mat|* on the cell array you have, _with_ the *|NaN|* values. You can select the individual columns as you ne...

9 years ago | 1

| accepted

Answered
inverse laplace of s certain function
It works for me in *|R2017b|*: syms s t F = exp(-3*s)^2/(s-4); f = ilaplace(F,s,t) f = heaviside(t - 6)*e...

9 years ago | 0

| accepted

Answered
why the figure i plotted doesnt show any lines? but when i choose show the dots, the dots are in the perfect location
Try this: X=Xmin:Xmax; for k1 = 1:length(X) if L>0 a=L.^K; b=X(k1).^(K-1); c=ex...

9 years ago | 0

| accepted

Answered
How can i calculate power and energy signal of function
The ‘energy’ is the value of the function, and ‘power’ is the function squared.

9 years ago | 0

Answered
How can I use fzero to find the value of function input argument which results in an output I want?
The *|fzero|* function will not get you there because your function has no real roots, and *|fzero|* only finds real roots. ...

9 years ago | 1

Answered
how to plot a function?
You need to vectorise the division (use *|(./)|* instead of *|(/)|*: d = ((Se*me*(Sp-(Sc*v)))./(Sc*Sp*(mc+me)))*eff; ...

9 years ago | 0

| accepted

Answered
ode45 with multiple value for a single variable in a function file
I would use a loop: task3afunction = @(t,y,w) [y(2); (10*sin(w*t))/3 - (75*y(1))/3 ]; tspan = [0 20]; initia...

9 years ago | 1

| accepted

Answered
How do I apply operations to a symbolic array?
Use the *|isAlways|* function: syms C A = sym([1 2 0; 4 0 6]); L = isAlways(A > 0) L = 2×3 logical ...

9 years ago | 3

| accepted

Answered
no line on plot3 graph
You do not need *|meshgrid|* with *|plot3|*. This works: z = (0:0.1:50); x = exp(-0.03*z).* sin(z); y = exp(-0....

9 years ago | 1

| accepted

Answered
Plot disappearing when overlapping with axis
_Guessing_ here, since we do not have your code. However I simulated this, and I assure you the plot is there. The width of th...

9 years ago | 0

Answered
Conditional in values of a matrix
Your original description of the problem contains an error. In order to get *‘Vector B’*, you need to divide *|‘abs(A(i,3))...

9 years ago | 1

Answered
Error using DynamicSystem/lsim
*_‘My U and T are both same as 1x501 sym and 1x501 double.’_* They should both be *|double|*. Neither should be *|sym|*. ...

9 years ago | 1

| accepted

Answered
plugging back a solution to obtain new soultion
Yes. Use a loop. *_Example_ —* x = 2; for k1 = 1:5 y = x^2 x = y; end

9 years ago | 1

| accepted

Answered
How to find area under specific portion of graph?
If *|‘A’|* is your matrix, use the second column (since the first column has the same value in all rows) and the *|trapz|* funct...

9 years ago | 0

Answered
Getting multiple roots of a function with infinite roots
*_‘Do I have to have initial guesses for each solution?’_* For numeric solvers such as *|fzero|*, yes. They only look for ...

9 years ago | 0

Answered
Lowest value that fulfills a condition
Use numeric integration rather that the Symbolic Math Toolbox. With your Symbolic Math Toolbox code, when I ran it on my la...

9 years ago | 0

| accepted

Answered
Need help with datenum function
Note that the first row is the string *‘date’*. The *|datenum|* function will fail on that, so start with the second row instea...

9 years ago | 0

| accepted

Answered
Plotting two vectors side by side.
Use the *|linspace|* function: A = rand(1, 601); % Create Data B = rand(1, 1200); ...

9 years ago | 0

| accepted

Answered
Complex Numbers in Matlab
Try this: z = input('Enter complex number ') n = input('Enter degree of root ') P = -1; P(n+1) = z; r = roots(...

9 years ago | 0

| accepted

Answered
How to solve a linear system of equation A
If you want to find the nullspace of *|‘A’|*, use the *|null|* function: A=[2 3; 4 6]; N = null(A) N = -0....

9 years ago | 0

Answered
For loop not running...?
The *|‘j’|* loop runs. The *|‘k’|* loop does not run because in the *|‘i’|* loop you define *|‘n’|* as: n(i) = sind(th(i)...

9 years ago | 0

Answered
Solving non-linear SECOND ORDER ODE BY MATLAB
All the information you need is in <https://www.mathworks.com/help/matlab/numerical-integration-and-differential-equations.html ...

9 years ago | 0

| accepted

Answered
Solve a linear system of equation A
You will find the <https://www.mathworks.com/help/matlab/ref/mldivide.html *|mldivide,\|*> (link) function useful.

9 years ago | 0

| accepted

Answered
my plot shows nothing! any suggestion would be appreciated. I know i can use bode() and tf, but i wanna do it in this way. thanks
Save your variables to vectors by subscripting them: w = 200*pi:2000*pi; for k1 = 1:length(w) %transfe...

9 years ago | 0

| accepted

Answered
Speed vs. Time Plot from position vector
For the numerical derivative, I would use the *|gradient|* function, since your data are regularly-sampled. If you must use the...

9 years ago | 0

| accepted

Answered
How can i graphic this function?
Use the *|cylinder|* function, and experiment: [X,Y,Z] = cylinder(1-(1:-0.05:0.01).^3, 25); figure(1) surf(X, Y,...

9 years ago | 0

Load more