Réponse apportée
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 ...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
Find the negative entries in a array.
E, use [row col] = find(a<0)

environ 12 ans il y a | 2

Réponse apportée
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:...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Excluding specific elements from matrix index
Jonah, how about A(2,end-2:end) = 2 or, simply, A(2,2:4) = 2

environ 12 ans il y a | 1

| A accepté

Réponse apportée
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, ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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] ...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 2

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

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

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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.

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
How to extract certain rows of a matrix?
Mnr, you could use rows = find(all(data==0,2))

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Finding varible in equation from vectors.
Giuseppe, use c = y - m.*x

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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)); ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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*','')

environ 12 ans il y a | 5

| A accepté

Réponse apportée
Circshift not working for values of zero.
Use x_2 = circshift(x',-1,1)'

environ 12 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 1

Réponse apportée
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...

environ 12 ans il y a | 1

Réponse apportée
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.

environ 12 ans il y a | 1

| A accepté

Réponse apportée
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).

environ 12 ans il y a | 0

Réponse apportée
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 ...

environ 12 ans il y a | 0

Réponse apportée
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 ...

environ 12 ans il y a | 0

Charger plus