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

oltre 15 anni fa | 1

Domanda


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

oltre 15 anni fa | 1 risposta | 1

1

risposta

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 2

| accettato

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

oltre 15 anni fa | 6

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 2

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 1

| accettato

Carica altro