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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 1

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 1

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 1

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 1

| A accepté

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

plus de 11 ans il y a | 1

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 1

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

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 2

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 1

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

Charger plus