已回答
How to display two non-consecutive column vectors
Use b = m(:,[1,3])

8 years 前 | 20

| 已接受

已回答
How do I animate a point/particle move with certain velocity in a circular path?
Vinaykanth, you just need to replace the angle |a| by something like |om*t|, where |om| represents the angular velocity. cr...

8 years 前 | 0

已回答
if and if else command is the conditional statement is correct while writing it is range?
Anas, if (T >= 300) && (T <= 900) c1=1.6; c2=1.7; elseif (T > 900) && (T <= 1500) C1=1.8; c2=1.9; else ...

8 years 前 | 1

| 已接受

已回答
I want to see how long it takes to run a model
Fernando, I assume you are talking about Simulink models. There is a functionality called profiler that might help you. See the ...

8 years 前 | 1

| 已接受

已回答
Error using corrplot function
Stephan, |corrplot| requires the Econometrics Toolbox. To see/learn if you have access, check out <https://www.mathworks.com/mat...

8 years 前 | 1

| 已接受

已回答
How can I correctly substitute symbolic variables with decimal numbers like 2.543342? The subs function can't do it properly...
Are you referring to the |C(i)|? How about C(i) = vpa(subs(C(i),D(i)))

8 years 前 | 1

已回答
How to set default value of a slider in GUI?
D B, please attach the entire code (see paper clip). A couple of comments: * There is at least one round, closing bracket mis...

8 years 前 | 1

已回答
error using zeros,integers problem
Why not simply round the numbers, e.g. A = zeros(1 + round(x), 1 + round(y));

8 years 前 | 1

| 已接受

已回答
Examples for model predictive control missing?
Anthony, the example requires the <http://www.mathworks.com/products/mpc/ Model Predictive Control Toolbox>. I just checked and ...

8 years 前 | 0

| 已接受

已回答
Undefined function or variable 'fminsearchbnd'.
Mohammed, did you add the folder you downloaded to the MATLAB search path? In the MATLAB editor go to the |Home| tab in the t...

8 years 前 | 0

已回答
Hello I have a question about matrix
Andres, use for example B = A(any(isnan(A),2),:) C = A(~any(isnan(A),2),:)

8 years 前 | 1

| 已接受

已回答
how do i get the same look as when i started in matlab
In the |Home| toolstrip go to the |Layout| dropdown and select |Default|.

8 years 前 | 1

已回答
How do i delete an exact cell from a cell-matrix?
Christoph, simply use round brackets instead a = {1,2,3}; a(2) = []

8 years 前 | 1

| 已接受

已回答
implicite differenciation to find slope of curve at apoint
Sita, how about syms x y(x) f(x,y) f = x^2+y^2-1 == 0; df = diff(f,x)

8 years 前 | 0

已回答
How to create an inputdlg with a portion of the default text already selected?
David, do you mean something like prompt = {'Enter matrix size:','Enter colormap name:'}; dlg_title = 'Input'; num_lines...

8 years 前 | 0

已回答
Cell array, string concatenation
Danny, I would simply use an |if-else| for that, combined with indexing function [str] = shortCat(in1, in2) s1 = size(in...

8 years 前 | 1

| 已接受

已回答
sort a one dimensional array ascend and descend
Hi Leo, you can always use sort([1,3,2],'ascend') and even sort([1,3,2]) As for your question: there might be scen...

8 years 前 | 0

已回答
Subplot in loop just plotting the first y value?
Marcus, add a hold on after the |plot| command.

8 years 前 | 0

已回答
Merge tables with duplicates
Hi Jonas, why not rename the columns of one of the tables, or even both? E.g. |CO21| and |CO22|. See this <https://www.mathworks...

8 years 前 | 0

已回答
Method ode45 applied to set of n 1st order ODE
Hi Nicola, use the below to get started. Essentially you want to define the differential equations symbolically and then convert...

8 years 前 | 0

已回答
Error "()-indexing must appear last in an index expression" in symbolic Matlab Toolbox
Paco, check out the <http://de.mathworks.com/matlabcentral/fileexchange/49796-euler-lagrange-tool-package Euler-Lagrange tool> o...

8 years 前 | 0

已回答
Taylor Series Summation Too Large
You need add up the |y(i)|. In other words, use k = k + y(i);

8 years 前 | 1

| 已接受

已回答
a a a a a
Kenneth, check out and run this: g = 9.81; L = linspace(1,10,14); theta_0 = 30; for t = 0:0.1:60 %time...

8 years 前 | 0

已回答
While Loop for Percent Error Not Ending
Madi, how about x = input('Enter a scalar value for x: '); n = 0; e = 3; k = 0; while e>2 dk = (-1)^n*x^...

8 years 前 | 1

| 已接受

已回答
PID controller design: How to plot control signal?
Matthias, for this simple configuration with |C| and |P| in the feed-forward path and unity feedback you can do the following: ...

8 years 前 | 0

已回答
solving differential equation for diffrent intial condition
Samee, check out this <https://www.mathworks.com/matlabcentral/answers/118837-how-to-add-trajectory-into-a-phase-plane#answer_12...

8 years 前 | 0

| 已接受

已回答
flight simulation using 3d animation
Ahmed, based on your screen shot it looks like you have not assigned unique names to the objects in your VR. As an example, one ...

8 years 前 | 0

| 已接受

已回答
Using ODE, several errors with a spring system and function
Julia, use function myODE() e = 0.0:.2:1.0; % no brackets, the colons are used to define the vector t = [1 20];...

8 years 前 | 0

已回答
ode45 with a function that change with time
Nashira, one approach is to use two different ode functions. Use the first one to integrate over the time interval |[0,tp]| and ...

8 years 前 | 0

已回答
ode45 is not outputting solutions for each increment specified by my “time-span” vector
zek3r, use [tsol,ysol] % returns vectors/matrices instead of [outputs] % returns structure as the output ar...

8 years 前 | 0

| 已接受

加载更多