Respondida
Hi I have a basic doubt about the integrator block in simulink
Sreerag, the integral of sine is a negative cosine plus an integration constant. Integrating a sine between 0 and pi results in ...

alrededor de 12 años hace | 1

| aceptada

Respondida
i had matrix s of size 4*12540, i want to take power of this matrix raise to 4*12540,how should i do it?
Amina, I am not sure I can follow. In general, if you need to take the nth power simply use n = 3; s3 = s.^n; or s...

alrededor de 12 años hace | 1

| aceptada

Respondida
Find the negative entries in a array.
E, use [row col] = find(a<0)

alrededor de 12 años hace | 2

Respondida
Where or How can I access past editions of the Matlab Digest?
MathWorks only publishes the current MATLAB Digest. All technical articles that have appeared in Digests are live in the <http:...

alrededor de 12 años hace | 0

| aceptada

Respondida
Excluding specific elements from matrix index
Jonah, how about A(2,end-2:end) = 2 or, simply, A(2,2:4) = 2

alrededor de 12 años hace | 1

| aceptada

Respondida
Solve system of equations when symbolic vector is referencing its own elements?
Michael, use syms a1 a2 a3 a4 a5 a6 a7 a = [a1 a2 a3 a4 a5 a6 a7]'; eq = [ 2610.0 - 0.0001*a5 - 1.0e-6*a7 - 0.01*a3, ...

alrededor de 12 años hace | 0

| aceptada

Respondida
How to record excution time of a subfunction during runtime?
Daniel, use <http://www.mathworks.de/de/help/matlab/ref/tic.html |tic|> and |toc|. tic [your subroutine call or commands] ...

alrededor de 12 años hace | 1

| aceptada

Respondida
Using An Equation As An Input Argument For A Function
Mike, check out the code below: function fun_test() f = @(x) x^8 - 1.5; xl = 0; xu = 1; sol = fun_solve(f, x...

alrededor de 12 años hace | 2

Respondida
Can you put a function inside a for loop?
Sure, e.g., a = [5 4 3 2]; for ii = 1:numel(a) b(ii) = times(a(ii),ii); end You can have any other function inst...

alrededor de 12 años hace | 0

Respondida
how to use a uitable to add two numbers
Sivakumaran, does this do the trick? f = figure('Position',[200 200 350 150]); a = 2; b = 4; dat = [a b a+b]; cna...

alrededor de 12 años hace | 0

| aceptada

Respondida
Calculation the coordinate of a point
Mick, x2 = x1 + d*cos(al); y2 = y1 + d*sin(al); where |d| is the distance and |al| is the angle in rad measured between...

alrededor de 12 años hace | 1

| aceptada

Respondida
Vectors must be the same lengths
Daan, turn the script into a function and you should be good. As the first line in your code, add function myEuler() % or s...

alrededor de 12 años hace | 0

Respondida
Adding 3 numbers out of 5
Sarah, you could use data = [A B C D E]; datasum = sum(combnk(data,3),2);

alrededor de 12 años hace | 0

| aceptada

Respondida
How to change mathematical symbols of division (/ to ./) and multiplication(* to .*) in a very long formula obtained by symbolic tool.
Mahak, copy-paste the formula into a script/function editor and use CTRL+F to replace the strings.

alrededor de 12 años hace | 0

| aceptada

Respondida
Could you please tell me algorithm how to chose numbers in a matrix which is sastified a condition?
Luc, use a = [1 2 3;3 4 6;8 9 13]; [row col] = find(a>= 2 & a<=5); which will give you the row and colum indic...

alrededor de 12 años hace | 0

| aceptada

Respondida
sprintf changes in each iteration
Md, do you mean something like for iFile=1:10 sprintf('A_%d_20%4d',iFile,1403-iFile+1) end To load a .mat file in...

alrededor de 12 años hace | 0

| aceptada

Respondida
how to give three inputs to a scope block in simulink ?
Kishore, simply use a multiplexer (Mux) block (in > Commonly Used Blocks) to combine the signals into one vector signal. The vec...

alrededor de 12 años hace | 0

Respondida
How to extract certain rows of a matrix?
Mnr, you could use rows = find(all(data==0,2))

alrededor de 12 años hace | 0

| aceptada

Respondida
Finding varible in equation from vectors.
Giuseppe, use c = y - m.*x

alrededor de 12 años hace | 0

| aceptada

Respondida
How to Start simulating matlab code using raspberry pi
Nitesh, I recommend watching this <http://www.mathworks.com/videos/raspberry-pi-programming-using-simulink-81996.html?form_seq=c...

alrededor de 12 años hace | 0

Respondida
how do i change a scientific figures?
YJ, how about this: X = '0.0000012345'; Y = '0.0987654321'; strValues = sprintf('(%4.1e,%4.1e)',str2num(X),str2num(Y)); ...

alrededor de 12 años hace | 0

| aceptada

Respondida
How to delete leading zeros in a row vector in MATLAB?
If it's a vector of chars, this should do: data = regexprep(data,'^0*','')

alrededor de 12 años hace | 5

| aceptada

Respondida
Circshift not working for values of zero.
Use x_2 = circshift(x',-1,1)'

alrededor de 12 años hace | 1

| aceptada

Respondida
Can someone tell me where is the problem? Matlab doesnt want to show me the real and the imag part of equation
Stefan, the problem is that the real and imaginary parts depend on the values of the variables, of course. Let me illustrate wit...

alrededor de 12 años hace | 1

Respondida
how to construct the matrix of size 10x1000
Asram, by 10x1000 do you mean 10 columns, 1000 rows? mymat = ones(1000,1)*(1:10) or rather 10 rows, 1000 columns, where t...

alrededor de 12 años hace | 1

Respondida
Creating two vectors from one.
Giuseppe, use xr = x(1:end-1,1).*x(2:end,2) xr = -16 6 4 and equivalent for the other calculation.

alrededor de 12 años hace | 1

| aceptada

Respondida
How to cancel the shadow of the blocks in .mdl files? (Matlab 2013a)
Mike, select File > Simulink Preferences > Editor Defaults > Use classic diagram theme (in the Simulink model window).

alrededor de 12 años hace | 0

Respondida
Undefined function 'qquadrature' for input arguments of type 'double'
Note, that |qquadrature()| is not a built-in MATLAB function. What does MATLAB return for which qquadrature If it is ...

alrededor de 12 años hace | 0

Respondida
Plots for second order control system in the same graph
Carlos, check out function myDE() prompt = {'xmin:','xmax:'}; name = 'Input x-range'; numlines = 1; xlimits ...

alrededor de 12 años hace | 0

Cargar más