답변 있음
Applying a For Loop to a matrix
Alex, use for ii = 1:100 PhaseAngle(ii) = atand(AngularVelocity(ii)/K2(ii+1)); end I recommend using |ii| as the...

거의 12년 전 | 2

답변 있음
How do I concatenate char and double classes?
Brad, you could use a table. See this <http://www.mathworks.com/matlabcentral/answers/125983-i-want-to-build-a-database-with-col...

거의 12년 전 | 1

답변 있음
ODE 45 integration control
Harry, in ... tspan = linspace(0,1,11); options = odeset('AbsTol',1e-8); [t,X] = ode45(@ODE,tspan,IC,options); ...

거의 12년 전 | 0

답변 있음
I did divide array with 2D into small boxes 2D also,the problem is how to get each box into sequential blocks.
Sundus, you could use cell arrays data = eye(32); b = mat2cell(data,8*ones(1,4),8*ones(1,4)); Access the in...

거의 12년 전 | 0

답변 있음
Simplifying numbers in symbolic function
David, have you tried |vpa(expr)|? syms x t x = 2^(1/2)*3^(1/2)*pi*(5^(1/2)/4 - 1/4)*(1/120000 + i/6000000)*t; vpa(x,10)...

거의 12년 전 | 3

| 수락됨

답변 있음
build YYYYMMDD instead of YYYYMD, for YY and DD derived from one-digit outputs from datevec()
Marco, how about dateString = datestr(now,'yyyymmdd');

거의 12년 전 | 0

답변 있음
I want to solve this equation: 0.16+24*a/(1+4.23*((1-a)/(1-2*a))^0.5)^2=0 How can i do this?
Alireza, you could use syms a sol = solve(0.16+24*a/(1+4.23*((1-a)/(1-2*a))^0.5)^2==0)

거의 12년 전 | 1

| 수락됨

답변 있음
Truncating rows from a matrix
Mohammad, not knowing exactly how your data is organized you could follow this path: data = eye(12); % as an exampl...

거의 12년 전 | 1

| 수락됨

답변 있음
License Manager error - 103,what is this ???
Narain, does this <http://www.mathworks.com/matlabcentral/answers/91874#answer_101225 answer> help?

거의 12년 전 | 0

답변 있음
construct anonymous function that returns the argmax of two symbolic variables
Leo, use symMax = @(x) [max(x) find(x==max(x))] symMax([3,4])

거의 12년 전 | 0

| 수락됨

답변 있음
How to apply If else condition properly for ode45 function file?
Sunit, use something like function myODE(omega) IC = [1 -1]; options = odeset('AbsTol',1e-10,'RelTol',1e-10); [t,X]...

거의 12년 전 | 0

답변 있음
Plot 3D implicit function
Moj, there are different routes you can take. One would be symbolic syms A B C D E F x y z sol = solve(A*x^2+B*y^2+C*z^2+...

거의 12년 전 | 0

답변 있음
How to extract all the values from a while loop into a vector
AC, use something like function c = nice(n) ii = 1; c(ii) = n; while c(ii) ~= 1 ii = ii + 1; if rem(c(ii-...

거의 12년 전 | 0

| 수락됨

답변 있음
how to use matlab to convert some value into dB and vise versa
Amina, use K = 10^(A/10)

거의 12년 전 | 1

답변 있음
Setting stop time (auto)
Samious, see this <http://www.mathworks.de/matlabcentral/answers/126577-stop-simulation-in-matlab-fctn-block#answer_134068 answe...

거의 12년 전 | 0

답변 있음
Help with graph legend.
Giuseppe, use legend(strcat('y=',num2str(c(1)),'x^2+',num2str(c(2)),'x+',num2str(c(3)))) or (without built-in function) ...

거의 12년 전 | 0

| 수락됨

답변 있음
about student version duration
Hook, the MATLAB student version is a perpetual license. Which means you can use it indefinitely, as long as you are a student, ...

거의 12년 전 | 0

| 수락됨

답변 있음
How do I write matlab code for solving the following equation ?
Pawan, you could do syms x y = 0:1:10; for n = 1:numel(y) yn(n) = vpasolve(y(n)-x+sin(x)./sqrt(1+sin(x))==0); e...

거의 12년 전 | 0

답변 있음
how to solve following differential equation.
Uday, use one of the ode solvers: function myODE() IC = [0 0 1]; [t,X] = ode45(@ODEf,[0 10],IC); f = X(:,1); plot(t,...

거의 12년 전 | 0

답변 있음
How to divide an array of matrix into two halves using mean distance
Josephine, the matrix is a 125-by-215 (row-by-column) size(R1) ans = 125 215 therefore, you can't evenly split it...

거의 12년 전 | 0

| 수락됨

답변 있음
how to draw a trajectory
Mostafa, try something like function my_phase() IC = rand(10,2); hold on for ii = 1:length(IC(:,1)) [~,X] = ode45...

거의 12년 전 | 1

| 수락됨

답변 있음
Stop simulation in Matlab Fctn block
Use the <http://www.mathworks.de/de/help/simulink/slref/stopsimulation.html |Stop Simulation|> block. When the input for the blo...

거의 12년 전 | 0

| 수락됨

답변 있음
how to make a variable as equal input over 30 sections
Segun, do you mean z = linspace(0,0.5,30)

거의 12년 전 | 0

답변 있음
How do I import a number of excel files at once?
Use xlsread(myfilename,'A:E') or any other range of data columns.

거의 12년 전 | 0

| 수락됨

답변 있음
storing indices of some entries in a matrix
Ryan, use [r c] = find(data==5) |r| and |c| are the row and column indices of all data entries equal to 5.

거의 12년 전 | 1

답변 있음
Writing data from multiple scopes in Simulink to an excel file?
James, simply append the second data vector to the matrix A = [tout,x,y]; save file.xls A -ascii where |x| and |y| are...

거의 12년 전 | 0

| 수락됨

답변 있음
Diff equation for finite element method
Sam, use a bvp solver function pdetest() solinit = bvpinit(linspace(0,2,5),[0 0]); sol = bvp4c(@mypde,@mybc,solinit...

거의 12년 전 | 0

답변 있음
How to compute a numerical integration which still need a symbolic limit as a definition?
Octavina, try syms a f = @(x) a.*x; g = @(a) a.^3; intgf = int(g*int(f,a,1),0,1)

거의 12년 전 | 0

답변 있음
How can I change the color and font on the second y axis of a subplot?
SSB, one way would be to use the plot tools. See icon in the lower right corner in the screen shot: <</matlabcentral/answers/...

거의 12년 전 | 0

답변 있음
Is it possible to solve an ODE with boundary condition using a matlab solver?
Daniel, what the various |ode| solvers are for ordinary differential equations, is |bvp4c| (and |bvp5c|) for boundary value prob...

거의 12년 전 | 1

| 수락됨

더 보기