Answered
Change value at axis ?
surf(X,Y,Z,C) allows you to specify the x and y range of your data as the first two arguments (there is a version without t...

11 years ago | 0

| accepted

Answered
how I use ginput and get a y and z?
Here is an example of the kind of thing you want. I haven't checked the exact syntax in Matlab itself so there may be errors, b...

11 years ago | 0

Answered
Figure does not show on the plot
doc hold I would strongly recommend using explcit axes handles, but simply hold on will cause the next plot to add ...

11 years ago | 0

Answered
Index exceeds matrix dimensions error.
You should just be able to replace that last line with C(d1)=d2; You have already trimmed d2 to the size of d1 in the pr...

11 years ago | 0

| accepted

Answered
Plotting a Text File
Normally I would suggest the following...(or similar) C = textscan( fid, '%s', 'delimiter', '\n' ); C2 = cellfun( @(x) s...

11 years ago | 0

| accepted

Answered
share some value between callbacks
What do you mean by "i tried handles structures and read every thing about it and read everything about sharing data and value b...

11 years ago | 0

Answered
How can I adapt a Gui Matlab, if I use an other monitor?
Change the figure and component units to 'normalized'.

11 years ago | 0

Answered
How can I stop Matlab from using dedicated GPU in laptop?
doc gpuDevice You should be able to get a list of GPU devices with g = gpuDevice; Then select a particular device f...

11 years ago | 0

Answered
Setting position of smaller plot within a larger plot to be a data point of the first larger plot
The axes has a position too, relative to the figure, so you can just map your location in axes coordinates onto an e.g. pixel co...

11 years ago | 0

Answered
Assigning a Gif to a push button in a gui
If you create your GUI using GUIDE (which I assume you are if you have an 'axes2') your pushbutton will automatically come with ...

11 years ago | 1

Answered
MatLab Coder: MatLab to C - Output argument not assigned on some execution paths
I haven't really used Matlab Coder much myself though others at my work have to convert my code to C++. At a glance it looks ...

11 years ago | 0

Answered
im trying to do that on matlab..can anyone help please... thnx
doc fft doc cos doc sum You need to ask more specific questions really. What part do you not understand? How to cre...

11 years ago | 1

Answered
Passing variables in GUI
In your first function you should have something more like this: function KW_Callback(hObject, eventdata, handles) h...

11 years ago | 0

Answered
how to save Struct to txt file
doc fprintf You will have to put the code together yourself to use fprintf as there is no builtin function that can magical...

11 years ago | 0

Answered
feval for beginner, evaluating a function at a specific fvalue
f should be a function handle or the name of an actual function, not a string containing a raw function. Just convert your func...

11 years ago | 0

Answered
Is there any way to set time limit on a function?
You can use tic toc. doc tic doc toc Just run with a while loop, extracting the toc value into a variable and testing...

11 years ago | 1

Answered
Why buttondownfcn of pushbutton not work in a classdef file ??!!!
Yes, I just did a test and ButtonDownFcn does appear not to work. This is independent of being in a class. It is the same on c...

11 years ago | 0

Answered
Find values of a specific page of a 3d matrix at specific positions
pageIdx = find( B(:,:,pageNo) == 2 & A == zoneNo ); idx = pageIdx + 9 * ( pageNo - 1 ); should work I think. First ...

11 years ago | 1

| accepted

Answered
using the find function to find intersection of two lines
find( A == 18 + min( abs( A - 18 ) ) ) is a one-liner to do what you want. Personally I would probably do it as multiple l...

11 years ago | 1

Answered
how to select an axis using mouse click?
Axes have a ButtonDownFcn property. Just define a callback in each of your axes that allows you to identify which was ...

11 years ago | 0

Answered
How to insert missing data in?
times = [98.5 98.6 99.0]; readings = [123 345 567]; expectedTimes = 98.5:0.1:99.0; newReadings = NaN( size( expec...

11 years ago | 1

Answered
cell row to variable
If you mean you want to create a field on a structure with the name of the ith row of column 1 then: Var.( A{i,1} ) = B{i,1...

11 years ago | 0

Answered
How can i reduce the size of an array?
a = 0:200; then either a(1:50) = []; a(152:201) = []; or a( [1:50 152:201] ) = [] or simply: a = ...

11 years ago | 2

| accepted

Answered
How to manage multiple objects of multiple types at one place?
http://in.mathworks.com/help/pdf_doc/matlab/matlab_oop.pdf is the Matlab OOP documentation I refer to regularly (though less ...

11 years ago | 0

| accepted

Answered
Simple minimization algorithm in a while loop?
zo = 5; tol = 0.1; diff = 100; % Doesn't matter so long as it is outside of tolerance ...

11 years ago | 0

| accepted

Answered
Comparing the same items in two massive files
I originally assumed you meant "common to both" on the same line in each file. Comparing every line with every other is a little...

11 years ago | 0

| accepted

Answered
Creating Undo button for image processing
Firstly I really wouldn't recommend using global variables. But in the interests of a short answer to the point of the questi...

11 years ago | 1

| accepted

Answered
How to prevent overwriting in loop
You can move a lot of that outside of your loop as a first step as follows ( *never define constants in a loop* ): N = 5; ...

11 years ago | 0

| accepted

Answered
IF.....OR with conditions
isnan(A) will produce a logical vector as its result containing 1s (true values) where there is a NaN and zeros elsewhere. ...

11 years ago | 0

| accepted

Answered
discrete deriviative has wrong sign
At a guess I would say it is because circshift shifts in the opposite direction to what you would expect. Certainly that catche...

11 years ago | 0

Load more