Respondida
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...

alrededor de 15 años hace | 1

Pregunta


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...

alrededor de 15 años hace | 1 respuesta | 1

1

respuesta

Respondida
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...

alrededor de 15 años hace | 0

| aceptada

Respondida
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...

alrededor de 15 años hace | 0

| aceptada

Respondida
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...

alrededor de 15 años hace | 1

| aceptada

Respondida
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...

alrededor de 15 años hace | 1

| aceptada

Respondida
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...

alrededor de 15 años hace | 0

Respondida
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...

alrededor de 15 años hace | 2

| aceptada

Respondida
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...

alrededor de 15 años hace | 6

Respondida
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...

alrededor de 15 años hace | 0

| aceptada

Respondida
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? ...

alrededor de 15 años hace | 0

Respondida
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...

alrededor de 15 años hace | 1

| aceptada

Respondida
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...

alrededor de 15 años hace | 0

| aceptada

Respondida
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...

alrededor de 15 años hace | 0

Respondida
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>

alrededor de 15 años hace | 0

Respondida
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...

alrededor de 15 años hace | 0

Respondida
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....

alrededor de 15 años hace | 0

| aceptada

Respondida
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...

alrededor de 15 años hace | 0

| aceptada

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

alrededor de 15 años hace | 1

| aceptada

Respondida
dates with yy
datenum('08/28/01')

alrededor de 15 años hace | 0

| aceptada

Respondida
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...

alrededor de 15 años hace | 2

Respondida
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...

alrededor de 15 años hace | 0

| aceptada

Respondida
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'...

alrededor de 15 años hace | 0

| aceptada

Respondida
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...

alrededor de 15 años hace | 0

Respondida
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; ...

alrededor de 15 años hace | 1

| aceptada

Respondida
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...

alrededor de 15 años hace | 0

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

alrededor de 15 años hace | 0

Respondida
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);...

alrededor de 15 años hace | 0

Respondida
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...

alrededor de 15 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 15 años hace | 1

| aceptada

Cargar más