Risposto
Reshaping a matrix with different column sizes to a vector
Maryam, how about A = M'; A(A==0) = []

oltre 11 anni fa | 0

Risposto
Is it possible to define a 'sym' as the derivative of another 'sym' ? If not, Is there a workaround for that in my script (differential equations)?
Edward, it is doable using the functionality of the Symbolic Math toolbox. A bit tricky though. One approach is to define the La...

oltre 11 anni fa | 1

Risposto
How can I create a matrix out of a matrix?
Rengin, you could use, e.g. B = [(1:size(A,1))' A]; B(~any(B(:,2:end),2),:) = []

oltre 11 anni fa | 0

Risposto
Hello, I put a value to the variable >> i=1 i = 1 After that, I tried the following thing also. But it returns nothing. why does this happen so? >> k=char(i) k =  >> Please help me. And please describe the reason for this problem and s
Joshy, you are trying to convert an integer to its corresponding ASCII character. If you check out an ASCII table you'll notice ...

oltre 11 anni fa | 1

Risposto
Is the 'findpeaks' function available only in 2014b ?
Harish, |findpeaks| is part of the Signal Processing Toolbox, which you might not have licensed/installed. To check if you do en...

oltre 11 anni fa | 0

| accettato

Risposto
How do I set a parameter in a symbolic expression?
Stefan, use syms a(b) a = 3*b; a2 = subs(a,b,2)

oltre 11 anni fa | 0

Risposto
I cannot install Matlab
Hello André, please contact our <http://www.mathworks.com/support/contact_us/?s_tid=sp_ban_cs Install Support>. On the Install S...

oltre 11 anni fa | 0

Risposto
How can i solve this problem 'sawtooth' for input arguments of type 'double'?
Marti, the code looks fine. What happens if you execute a clear and then run your code again? Is this code part of a scr...

oltre 11 anni fa | 0

Risposto
Are there gauges for Matlab?
Ralf, there are. Check out the new app designer on <http://www.mathworks.com/matlabcentral/fileexchange/48142-app-designer File ...

oltre 11 anni fa | 0

| accettato

Risposto
Is there a detailed description of the "Line Tracking"-Model for Lego Mindstorms with Simulink?
Julius, have you checked out the NXT manual <http://de.mathworks.com/programs/resource-portals/project-based-learning/index.html...

oltre 11 anni fa | 0

| accettato

Risposto
fzero function troubles/errors
Bradley, use sol = fzero(@(x) exp(x+1)-cos(5*x),10) sol = -26.075219024797857

oltre 11 anni fa | 0

| accettato

Risposto
How can I plot this exponential decaying sinusoid
Nabin, how about % value of a and b: % ethyl alcohol 0.246 0.806 % water 0.250 1.000 % Oil 0.643 1.213 F = 1; x ...

oltre 11 anni fa | 0

| accettato

Risposto
exponential decay function y = exp*(-Tau.time)
Hi Nabin, to help with readability I have slightly re-formatted the code and re-named some variables: tau1 = 1; tau2 = 2; ...

oltre 11 anni fa | 3

| accettato

Risposto
why don't these two transfer function models produce same open loop results?
John, the only thing I can think of is the step time in the Simulink Step block. It's set by default to 1. Open the Step block, ...

oltre 11 anni fa | 0

Risposto
How to simplify two symbolic equations and ensure selected variables are not contained in the equation?
FallGuy, use instead syms x0 h0 [x0 h0] = solve('(a/2)*(0-x0)^2-h0=0', '(a/2)*(L-x0)^2-h0-h=0',x0,h0) x0 = -(- a*L^2 +...

oltre 11 anni fa | 0

Risposto
Does Matlab R2014b include Simulink?
Hello Peter, MATLAB and Simulink are two separate products. Your command window message suggests that you do not have Simulink l...

oltre 11 anni fa | 0

Risposto
get same column of matrix automatically.
Heo, how about simply A = [A zeros(1,10-numel(A))] for example.

oltre 11 anni fa | 0

Risposto
I don't get the lego mindstorms ev3 to install
Michelle, the EV3 support package is only available for Windows and Linux, see <http://www.mathworks.com/hardware-support/lego-m...

oltre 11 anni fa | 0

Risposto
How can i get the same solution as mupad with symbolic math?
Hyunsuk, what is the correct result? When I run your code I get solx_n = vpa(solx) solx_n = -0.830571156789375139371...

oltre 11 anni fa | 0

| accettato

Risposto
how to gain minimum value
Hamid you could use r_min = r(min(find(r*200>246==1))) r_min = 1.3000

oltre 11 anni fa | 1

| accettato

Risposto
Creating a code based on a figure?
Stavo, one thing you can do is run your code and then edit the plot manually by choosing "Show Plot Tools...", the symbol in the...

oltre 11 anni fa | 1

Risposto
This statement is not inside any function. (It follows the END that terminates the definition of the function "trap_wfp610".)
Kevin, it's hard to tell what exactly you would like to do and what is going wrong. One thing you could do is do both computatio...

oltre 11 anni fa | 0

| accettato

Risposto
totally incorrect calculation of matlab
Jaein, use instead [x,y] = meshgrid(0:1:20); quiver(x,y,x.^3-3*x.*y,y.^3-3*x.^2.*y) % note the dot-notation

oltre 11 anni fa | 0

| accettato

Risposto
How to get result after loop.
Zahid, you could use instead result_Value(:,i) = [minValb; minValc; minVald] result_z(:,i) = [z1;z2;z3] which sav...

oltre 11 anni fa | 0

| accettato

Risposto
Solving equations that are first parametrically solved
Farzad, you want to use the |subs| command syms a b R C = a^2 + 2 * b + 1/R; C_num = subs(C,{a,b,R},{1,2,3}) C_num = ...

oltre 11 anni fa | 1

| accettato

Risposto
How do you solve a nonlinear ODE with Matlab using the finite difference approach?
Yianni, unless you want/have to re-invent the wheel use one of MATLAB's integrators, e.g., |ode45| function test_ode() m ...

oltre 11 anni fa | 0

Risposto
I need to plot B = (cos(X))^m; for m=1-20 and X at viewing angles 10degrees, 20 degrees, and 45 degrees. I am new to matlab and can't get the code right.
You mean X = [10 20 45]'; m = [1:20]; B = bsxfun(@power, cosd(X), m)

oltre 11 anni fa | 0

| accettato

Risposto
about use function ode45
Mary, use function my_ode() [T,Z] = ode45(@func,[0 2],1); % use correct name of ODE function plot(T,Z) end functi...

oltre 11 anni fa | 0

Risposto
Introducing an if statement into time varying sin wave
Kelly, use something like Co = 5000/60; Cc = 72; % number of cardiac cycles per minute Tc = 60/Cc; % ...

oltre 11 anni fa | 0

Risposto
How do I enter this Transfer Function into Simulink?
Mark, you can either multiply out numerator and denominator and then use one "Transfer Fcn" block from the "Continuous" library ...

oltre 11 anni fa | 0

| accettato

Carica altro