已回答
resize a matrix (1x30) to (1x25)
Hi, you could use interp1 g = rand(1,30); newx = linspace(1,30,25); newg = interp1(g,newx); plot(g,'b-+')...

10 years 前 | 0

| 已接受

已回答
Assigning value to vector in based on conditional
Hi, your code *didn't* reassign new value to all elements. only to the first one. it's just a "display impression". r = ...

10 years 前 | 0

| 已接受

已回答
How to get exact position (red point)?
If you know the "time zone" where you have this minimum, just use min on this interval. <</matlabcentral/answers/uploaded...

10 years 前 | 0

已回答
Guide GUI deleted associated *.m file
it seems to me that you had created an object which is badly configured in the gui or which existed but you deleted it in the gu...

10 years 前 | 0

已回答
Guide GUI deleted associated *.m file
Hi, Just guessing. Open your gui with guide In guide toolbar. Tools -> GUI options is "Generate FIG-file only" s...

10 years 前 | 0

已回答
problems with reading a text file in matlab
You asked to read only the 4 first line InputText = textscan(fid,'%s',4,'delimiter','\n'); change it to InputTe...

10 years 前 | 0

| 已接受

已回答
subplot to specific figure
Hi, you can do set(0,'CurrentFigure',hFig) % you say to Matlab to make hFig thecurrent figure h1=subplot(2,2,1); .....

10 years 前 | 0

| 已接受

已回答
calculate the return between selected time points only
Hi, in your code, at the first iteration, you're trying to put a value in the 52th position of TF, which only have 20 element...

10 years 前 | 0

| 已接受

已回答
variable being saved as nonsence
Did you change of Matlab version ? I just did it with R2014a testmatrix = rand(50,400); save('test.txt','testmatr...

10 years 前 | 0

| 已接受

已回答
Input points from matlab to simulink
if x and y are vectors available in the workspace, (with a time vector corresponding), you can simply use a FromWorkspace block ...

10 years 前 | 0

| 已接受

已回答
How to store a data by getting from for loop in matlab ?
it's basic concatenation b=[]; for i=1:n % some calculation a = % your new row vector b=[b;a]; ...

10 years 前 | 0

已回答
Stateflow verification of models
Hi, You're actually asking for several toolboxes 1) The Model Advisor allows you to chek some design rules, that's all, so...

10 years 前 | 0

已回答
Help with for loop for a function
just add a counter M=[]; i=0; for t=0.01:0.01:10; i=i+1; M(i)=dtmf_attack(t); end dis...

10 years 前 | 0

已回答
Identify pre-sign changes
I'm not sure to get your problem. something like % here changes of sign appear at positions : 3,4,5 and 8 x1 = [1 1 -...

10 years 前 | 0

| 已接受

已回答
How to use uicontrol and callback for a user-defined input flow?
In the callback of popup1, you just want to modify the string in popup2. I guess you need something like : function popu...

10 years 前 | 0

| 已接受

已回答
How do i solve f(x,k)=sin(x)-kx on matlab?
what are x ? k ? variables ? parameters ? Anyway, see the doc of <http://fr.mathworks.com/help/matlab/ref/fzero.html fze...

10 years 前 | 1

已回答
Simulation time" and Sampling time
With Simulink, you are modeling some dynamics systems, meaning that your problem is time depending (For a physical modeling, you...

10 years 前 | 0

| 已接受

已回答
how to reduce the resolution of a matrix?
There was the same problem <http://au.mathworks.com/matlabcentral/answers/161739-how-to-change-4x4-matrix-to-2x2-matrix here> ...

10 years 前 | 0

已回答
i am getting answer as an empty matrix..,why.?
For what I understand. you have a cell list and a 'matching' array s_names = {'nimisha' 'pooja' 'leela' 'jk'} s_marks...

10 years 前 | 0

| 已接受

已回答
Printing simulink file including all the blocks
same answer as <http://au.mathworks.com/matlabcentral/answers/163777-how-to-save-simulink-blocks-in-pdf-format#answer_159819 thi...

10 years 前 | 0

| 已接受

已回答
How to save simulink blocks in pdf format
Why don't you just use the print option in simulink ? open your model, then file -> print then for the printer, use PDF...

10 years 前 | 0

| 已接受

已回答
pass a variable value from simulink to gui while running simulation
you can send your signal in an interpreted matlab function (or a S-function). In this function (an external .m that you wrote...

10 years 前 | 0

| 已接受

已回答
To workspace block does not read 0 correctly
This is a classic problem of numerical precision. several ways to treat it : - before sending your data in the workspace, ...

10 years 前 | 0

已回答
Plot a cell as surf
is B a cell or an array ? for an array (same for a cell), it depends on what is your data and which part you want to see. ...

10 years 前 | 0

| 已接受

已回答
How do I make surf accurately reflect my data?
you can play with shading A=zeros(5); A(3,3)=1; surf(A); pause(1) view(2); pause(1) shading interp

10 years 前 | 1

已回答
how to resolve a "input argument is undefined error"?
Hi, just replace x = fminunc(@(x)objfun,x0,options) with x = fminunc(@objfun,x0,options)

10 years 前 | 0

已回答
Function's product non linear equation in Simulink
Hi, If your signals are 1-dimensionnal data, use the basic product bloc such as : <</matlabcentral/answers/uploaded_files/...

10 years 前 | 0

已回答
Plot Surface of Excel 100X10 table
to draw a surface : <http://fr.mathworks.com/help/matlab/ref/surf.html surf> to read the data from excel : <http://fr.mathwor...

10 years 前 | 0

已回答
timer function and handles... again...
Hi, It seems to me that the problem is inside the data _handles_. I don't know your function _WPRread_, but, when you say ...

10 years 前 | 1

已回答
Turn non-resizeable figure into resizeable figure?
Hi, In your callback function, don't use gcf, but the handle of your figure ( _figure1_ by default) function pushbutton1...

10 years 前 | 0

加载更多