Réponse apportée
Matlab 2007
I think the problem is that you are calling a function from the base workspace then expecting the variables created in the funct...

environ 15 ans il y a | 1

Question


Use of a user defined pointer to mxArray.
This has always bugged me about working with MEX-functions. Here is how I always end up working with the return argument from a...

environ 15 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Changing the boundary rows and columns.
A = [1,1,1,1; 1,1,1,1; 1,1,1,1]; A([1,end],:) = 0; % Changes the first and last row. A(:,[1,end]) = 0; % Changes the fir...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Matlab 7.1 in Windows Vista: Error starting desktop when open Matlab
I am running 7.0.1 on WinVista no problem. I do use an Intel cpu, but I can't imagine that would matter. Do you need to updat...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
error using text()
Works here: clear all,close all,clc R_squared = .5; x_pos=0.0031; y_pos=0.0507; str_=['R^2 (%) = ' num2st...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
How to find the loaction of an element in an array
T=[0 1 2 3]'; Q=[100 200 300 400]'; Q_T = Q(T==2) % Or, Q(find(T==2)), but not as efficient... Be aware that if you...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
Plot updated only after opening the PropertyEditor and mousebutton on object
p = getoptions(h); p.Responses.Style.Markers = 'o'; p.Responses.Style.LineWidth = 3; setoptions(h,p); Assuming th...

environ 15 ans il y a | 0

Réponse apportée
Dynamic fieldnames
Your code is a little confusing because it doesn't appear that you are assigning anything to the structure. Here is code that d...

environ 15 ans il y a | 2

| A accepté

Réponse apportée
Drawing a segment of a circle
Here is another function to do it. It returns the handle to the patch object so that the color can be set or whatever. fun...

environ 15 ans il y a | 6

Réponse apportée
Different For Loop Comparison
Of course the values are not the same! C is a char but E is a double. Also, you say you reshaped C but you didn't do it in the...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
value of the pixel
That would depend somewhat on the datatype, and how exact you want to be in calling something black. Do you want a tolerance? ...

environ 15 ans il y a | 0

Réponse apportée
Preallocation of data
Is this just the same question you have asked twice before? If not, you need to include more code. For example, pre-allocation...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
regarding plot function
If the axes in g2 is the only axes you have open, you could use: plot(findall(0,'type','axes'),x,y) This goes in the callbac...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Calculating Mean inside a loop
Use <http://www.mathworks.com/help/techdoc/ref/histc.html HISTC> for binning problems. See both the one and two output function...

environ 15 ans il y a | 0

Réponse apportée
Axis tick labels changed upon export to EPS
I only use this for exporting figures. <http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig Export_fig>

environ 15 ans il y a | 0

Réponse apportée
I cannot run an .m file containing script directly in command line
You don't say what happens when you try to run the script, but I suspect that the script is not in your new default directory fo...

environ 15 ans il y a | 0

Réponse apportée
How do I solve this equation for x given a value of z and y?
Re-write the equation as: f = @(x)(10.^(-15).*x.^(3).*exp((x.^2).^(-1)/4).*y.^(-1)).^(1/5)-z Then let <http://www.mathworks....

environ 15 ans il y a | 0

| A accepté

Réponse apportée
trouble to run a file directly from current directory
You have been naming M-files with the same name as built-in functions. Now you see the reasons why this is not recommended. To...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
str2double:getting rid of the decimal points
format long g A={'2248866001' '2249926001' '2249924001' '2249925001' '2249906001'}; str2double(A) ...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
dates with yy
datenum('08/28/01')

environ 15 ans il y a | 0

| A accepté

Réponse apportée
What evaluates to "true" in matlab?
For the first part of your question, IF statements on vectors evaluate to true only if all of the elements in the vector would e...

environ 15 ans il y a | 2

Réponse apportée
Suggestion for rewrite of the for loop and while loop
The major improvement will come from Pre-allocating memory for Video instead of growing the data in the loop. Calculate the fin...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
GUI calendar
In the code you must have put in a hard value for the date. Instead, use the DATE function. str = date; figure('numbert'...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
plotting anonymous functions with multiple variables
This is confusing to me. If I plot your vectors: plot(cfm,h20) It doesn't look cubic, though you could fit a cubic polynomi...

environ 15 ans il y a | 0

Réponse apportée
How to define a structure fieldname from a cell contains a string value?
Instead of using EVAL, use dynamic fieldnames.... select = [{'NAME'}, {'VALUE'}; {'alpha'}, 0.4; ...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
3D Box Plotting
I don't know what you mean by "the ascent." But you could look around at the properties of the surface object and see if settin...

environ 15 ans il y a | 0

Réponse apportée
Two Questions: Timer and Sound
Here is an example, adapt it to your needs. function [] = timer_examp() S.fh = figure('units','pixels',... ...

environ 15 ans il y a | 0

Réponse apportée
Suggestions for my code
When doing element-by-element computations, use .* .^ and ./ clear [x t]=meshgrid(0:5*10^(-5):200*10^(-5), 0:10:400);...

environ 15 ans il y a | 0

Réponse apportée
using Tisean with matlab
Did you download the <http://www.mpipks-dresden.mpg.de/~tisean/archive_3.0.0.html source code>? It doesn't help those who would...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Some Syntax Error
You are running code which was written in a newer version of MATLAB. Your version does not recognize the tilde being used this ...

environ 15 ans il y a | 1

| A accepté

Charger plus