Answered
how can i get in place of %d is i values for each iteration of e
Ganesh - use <https://www.mathworks.com/help/matlab/ref/sprintf.html sprintf> to create your string for the input command fo...

8 years ago | 0

| accepted

Answered
several for loop plots
Maryam - on each iteration of your *for* loops you seem to be calling figure() at least twice. This will create a new fig...

8 years ago | 0

Answered
Why is "hold on" not working?
Julia - are the multiple helices plotted with plot3(x,y,z, 'red') and plot3(x2,y2,z2, 'blue') If so, then they wi...

8 years ago | 0

| accepted

Answered
How do I select data from an interval in a matrix?
jakob - since _aanname_ appears in column five, then you can find the indices (rows) of all of the elements of your data that in...

8 years ago | 1

Answered
Problem for drawing on an image Matlab GUI
Rémy - try assigning the *buttondownfcn* to your handle to the image that you wish to draw upon. For example, in your *OpenButto...

8 years ago | 0

Answered
Start storing the recorded sound with pressing the button in real time
hoda - since *handles.samples* is an array of all collected samples (since starting the audio recorder), then when you press the...

8 years ago | 0

Answered
Extracting the data from a column vector according to mod
alphedhuez - you could use <https://www.mathworks.com/help/matlab/ref/arrayfun.html arrayfun> to return a cell array of each of ...

8 years ago | 0

Answered
Hello all, does anyone know how to have a GUI reset to back its initial set-up/ look after a file has already been loaded and executed? Like give a clean slate when you want to load another file in.
Kyle - I think that you would have to programatically reset the state of the GUI in the pushbutton callback that loads the new f...

8 years ago | 0

| accepted

Answered
How to increment the specific command
Akshay - can't you just use a *for* loop like for k=4:0.1:5 % do something end In the above we iterate from 4 to 5...

8 years ago | 0

Answered
Help with dragging lines in GUI using draggable.m
HpW - ok, so you have written a function called *update_drag_line_values* that you pass in to the *draggable* function (from the...

8 years ago | 0

| accepted

Answered
Hi, I have an observation about GUI in Matlab R2013a to show a graph of series data. This is the syntax I used, but just show the x and y label, not the graph. Am I missing something? Please Help, Thank you so much. Regard Haidir
Haidir - you are passing a string into your call to the *plot* function plot(gca,'DataGrafik'); Please look carefully at ...

8 years ago | 1

| accepted

Answered
Object movement, 2D environment
Dat - one solution may be to use <https://www.mathworks.com/help/matlab/ref/rectangle.html rectangle>. You would draw the rectan...

8 years ago | 0

Answered
Why a script doesn't work by itself and just included in another script?
glbmtc - you haven't posted the error but I suspect the problem is that you haven't defined *sat* and so you are erroring on the...

8 years ago | 0

| accepted

Answered
GUI 'uitable' with option to add rows using push button for string
Emir - without knowing the errors, we can only guess at the problem given the code that you have posted. I do suspect there is a...

8 years ago | 0

Answered
How to use uipushtool to click and drag plots in figure?
Miles - ok, when I push the button, I see a slightly different error Error using interactive_move>dragger (line 80) Not en...

8 years ago | 1

| accepted

Answered
Moving window FFT, Index exceeds array bounds error
William - does the error occur for the first iteration of the *for* loop (so when i is 1) or for some other iteration? What are ...

8 years ago | 0

| accepted

Answered
Problem creating an array whose values are floats
Tyler - try <https://www.mathworks.com/help/matlab/ref/cast.html casting> your numbers to floats before doing the division. For ...

8 years ago | 0

Answered
Speed-up the process of plotting real-time data (GUI)
Sara - every time you plot some data, you are creating a new graphics object. In your case, you will be creating 10000 graphics ...

8 years ago | 3

| accepted

Answered
Defining Objective Function in Genetic Algorithm
Neeraj - your fitness function would be simply function y = fun(x) y = x * [A-B]; end where *x* is an array of variab...

8 years ago | 1

Answered
Where is the problem with my code. it never ends !!
geometry - your function appears to be recursive function [an]=fc(f,T) syms t n n=-20:1:20; an=(1/T)*int(f*exp(-1i...

8 years ago | 0

Answered
I am recieving the error message below for a for loop I wrote. I believe it because I am attemting to store a vector as a scaler but am not sure. New to MatLab.
Chris - I suspect that one of your filenames does not have a period in it...and so the "empty" case is causing it to fail. For e...

8 years ago | 0

Answered
how to take integer value in mysql to matlab ??
Dewi - if *mydata(1,1)* is an integer, then convert it to a string with <https://www.mathworks.com/help/matlab/ref/num2str.html ...

8 years ago | 0

| accepted

Answered
Matlab script to load a .mat file based on entry in dialog box
A - see <https://www.mathworks.com/help/matlab/ref/load.html load> which describes how to load a mat file given the filename.

8 years ago | 0

Answered
How to create a loop for going through lines??
Madison - see <https://www.mathworks.com/help/matlab/ref/importdata.html importdata> and in particular the example <https://www....

8 years ago | 0

Answered
I have error in the following code, the error is (Error in Example_random (line 3) if Initialization ), could you help me to fix the problem. Thank you.
Ameer - you haven't posted the error message so it is will be hard to guess what the problem is. Since line 3 is if Initial...

8 years ago | 1

Answered
Importing multiple image files (DSC0###) in a loop?
Tessa - you could try using <https://www.mathworks.com/help/matlab/ref/sprintf.html sprintf> to create your file names for k...

8 years ago | 0

Answered
Matrix Dimensions do not agree?
Michael - but *sr* is sr = -0.26:0.001:0.26; which is 1x521 which is the size of sin(C.*atan((B.*(sr+.045)-E.*(B.*(sr...

8 years ago | 1

| accepted

Answered
How to run a sliding window over matrix
Norman - I think that you just want to set the step size in your *for* loop. Something like for i = 1 : 100: size(dataSet,2...

8 years ago | 0

| accepted

Answered
What is the difference between .' and ' when transposing a matrix?
Tianyi - according to <https://www.mathworks.com/help/matlab/matlab_prog/matlab-operators-and-special-characters.html MATLAB ope...

8 years ago | 1

Answered
Index exceeds matrix dimensions
sheng - so initially, *H_tank1* is a scalar or 1x1 as initialized with H_tank1(1)=13.5; If that is the case, then your co...

8 years ago | 0

| accepted

Load more