Réponse apportée
How Are Calculations Done for Variable That's Inclusive of Itself?
You won't gain anything with temp = x; x = temp + 1; over x = x + 1; If you have a lot of loops and the code ...

environ 8 ans il y a | 0

Réponse apportée
Why doesn't getenv work on MAC OS X?
One article I read indicates you need to call export hello To actually set hello as an environment variable. Otherwise,...

environ 8 ans il y a | 0

Réponse apportée
Can one run a matlab script from the command line and pass arguments to it **without making it into a function**?
A script has access to its caller's workspace. You need not pass anything, they'll just be there. This also means all variab...

environ 8 ans il y a | 0

Réponse apportée
How to position a GUI window the same place and size where it was closed?
In the GUI's close or delete function: % Documentation seems to indicate you *have* to call addpref before setpref % the...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to use GUI handles in external function?
|function nuskaitymas(hObject,eventdata,handles)| Is the callback for your _tcpip_ object. The |hObject| argument is therefo...

environ 8 ans il y a | 0

Réponse apportée
Prompt user before clearing axis when using the "clear axes" context menu
Another half-answer (pick your poison) I came up with is to overload _cla_. This clearly has its own dangers, but could be some...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Text Jump on right click
This happens on my Win10 system if my cursor is not properly centered on the desired text (mouse cursor changes from the pointer...

environ 8 ans il y a | 0

Réponse apportée
Basic questions on MDCS
PCT = Single system (rarely do you get more than 2 CPUs in a system, so roughly 40-60 cores or workers max). Actually, I recall...

environ 8 ans il y a | 1

Réponse apportée
How do I add a marker at one specific point on a plot?
With 7k views in a month, I'm surprised this hasn't been updated. Starting in R2016b, there is a |MarkerIndices| property. I...

environ 8 ans il y a | 10

Réponse apportée
Prompt user before clearing axis when using the "clear axes" context menu
plot([1:4]) hEditPlot = findall(gcf,'tag','Standard.EditPlot') plotedit(gcbf,'toggle') hEditPlot.ClickedCallback = @m...

environ 8 ans il y a | 0

Réponse apportée
How would you call this function?
I didn't analyze for a more efficient solution, but move xdt=linspace(0,xdt,n);%Increments X and Y so graph can animate ...

environ 8 ans il y a | 0

Réponse apportée
Marker transparency for scatterm
h = scatterm(num(:,2), num(:,1), 200, num(:,6), 'filled', 's'); h.Children.MarkerFaceAlpha = .5;

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to tell if another set method call is coming up?
I can't test it on this machine to confirm, but you should be able to define |set| for your class (as opposed to |set.a| and |se...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Plot always appears as a straight line
First, I suspect you missed parenthesis is your exp denominator. The magic of using constants. Second, most functions look lik...

environ 8 ans il y a | 0

Réponse apportée
Prompt user before clearing axis when using the "clear axes" context menu
a = axes(figure); plot(a,magic(8)); set(a.Children,'HandleVisibility','off'); Or you can selectively set individual c...

environ 8 ans il y a | 0

Réponse apportée
app designer Slider object properties does not contain a 'SliderStep' property
There is no need for a SliderStep property anymore. The old slider had arrows for "small step" and click inside but not on the ...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
I can't seem to change figure font name
It looks like the 'NextPlot' (normally manipulated with _hold on_ and _hold off_) behavior includes things like FontName for the...

environ 8 ans il y a | 2

Réponse apportée
How to specify dotted line for histfit?
Oddly, it doesn't look like you can specify it at runtime. You'll have to save the handle, and apply LineStyle afterward. ...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to pick specified matching part of the string
Regular expressions for the win. out = regexp(in,'\d*E\d*','match','once'); The 'once' means one time per cell element, ...

environ 8 ans il y a | 2

| A accepté

Réponse apportée
Delay reading/writing files after fwrite returns
See the comment chain for gory details, but here's the bottom line: I think the best option for testing the actual read/write...

environ 8 ans il y a | 0

Réponse apportée
e.Workbooks.open(FILE_NAME);
For simple stuff, use properties(e) and methods(e) as Guillaume has indicated, with the extra knowledge that Microsoft Office pr...

environ 8 ans il y a | 0

Réponse apportée
serial com RS422, sending hexadeximal coomands
'63' and '0801' in MATLAB are character arrays. The binary of '63' is not the same as the binary of 0x63. Try: fwrite(s,u...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
datetime without leading zero
datetime(datenum('92704','HHMMSS'),'ConvertFrom','datenum') Seems to work. Same concept as the cyclist's answer, except th...

environ 8 ans il y a | 1

Réponse apportée
Problems With readtable. Convert string data in datetime with milissecond precision.
You aren't accounting for your header row: Time,GVPos,VlvLimCmd,SpeedCtrlSP,Speed,PIDOut "Time" is clearly not in the da...

environ 8 ans il y a | 1

Réponse apportée
R2016a default size of title and xlabel many large
R2014b introduced the "title-font-size-multiplier" (as well as label) for axes. See more here: <https://www.mathworks.com/he...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
How to display images in 2 color map side-by-side?
R2014b introduced handling for colormaps at the axes level (rather than the figure level). See the release notes for complete d...

plus de 8 ans il y a | 0

Réponse apportée
I want to turn axis for my both axes. But the following code work only for axes 2. Can anyone tell why is it so?
axis off Operates on the "current axes" (that returned by the gca function). Nowhere in your code do you set (change) the ...

plus de 8 ans il y a | 0

Réponse apportée
handle mouse in figure with matlab
Set the ButtonDownFcn of the plotted object to the algorithm you want to apply. The last line of the algorithm can be to set th...

plus de 8 ans il y a | 0

Réponse apportée
Why will this script not plot data in the figure? Is there a setting I'm missing? Every time I run the script, all I get is a completely blank (white) graph in the figure.
The default behavior of plot does not include a marker. This means all you can see is the interpolated line connecting each PAI...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Function does a thing for an amount of time, then another thing.
In both of your functions, you're telling the user "Thanks for the inputs, but I'm gonna use 0." MATLAB's Code Analyzer is pr...

plus de 8 ans il y a | 0

Charger plus