回答済み
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 ...

12年以上 前 | 1

| 採用済み

回答済み
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...

12年以上 前 | 1

| 採用済み

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

12年以上 前 | 2

回答済み
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:...

12年以上 前 | 0

| 採用済み

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

12年以上 前 | 1

| 採用済み

回答済み
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, ...

12年以上 前 | 0

| 採用済み

回答済み
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] ...

12年以上 前 | 1

| 採用済み

回答済み
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...

12年以上 前 | 2

回答済み
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...

12年以上 前 | 0

回答済み
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...

12年以上 前 | 0

| 採用済み

回答済み
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...

12年以上 前 | 1

| 採用済み

回答済み
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...

12年以上 前 | 0

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

12年以上 前 | 0

| 採用済み

回答済み
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.

12年以上 前 | 0

| 採用済み

回答済み
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...

12年以上 前 | 0

| 採用済み

回答済み
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...

12年以上 前 | 0

| 採用済み

回答済み
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...

12年以上 前 | 0

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

12年以上 前 | 0

| 採用済み

回答済み
Finding varible in equation from vectors.
Giuseppe, use c = y - m.*x

12年以上 前 | 0

| 採用済み

回答済み
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...

12年以上 前 | 0

回答済み
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)); ...

12年以上 前 | 0

| 採用済み

回答済み
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*','')

12年以上 前 | 5

| 採用済み

回答済み
Circshift not working for values of zero.
Use x_2 = circshift(x',-1,1)'

12年以上 前 | 1

| 採用済み

回答済み
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...

12年以上 前 | 1

回答済み
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...

12年以上 前 | 1

回答済み
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.

12年以上 前 | 1

| 採用済み

回答済み
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).

12年以上 前 | 0

回答済み
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 ...

12年以上 前 | 0

回答済み
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 ...

12年以上 前 | 0

さらに読み込む