Hi,
I want to apply a function to each element of a cell array -- so I have cellfun for that. However, the function takes two extra arguments (a string and a vector), which I want to keep constant for all the elements of the cell array; i.e. I'd like to do something like:
cellfun(@myfun, cellarray, const1, const2)
meaning
for i=1:nu...
I issue following command in the interactive matlab console:
>> foo = [1 inf];
>> dbstop if naninf
>> foo
I now get weird behaviour: matlab seems to to break into two different files, but doesn't actually stop execution. This is pretty slow because the editor switches between those two files repeatedly, Ctrl+C doesn't do anything. Out...
Hi!
I'm writing a version of Python's doctest test-runner, for MATLAB (it partly works...). For this to work, I need to run the code in people's examples in their m-file help. I want variables to carry over from one line to the next, e.g.
% >> I = 5 + 33; % expect no output
% >> I
%
% I =
%
% 38
%
To run the tests, I have a l...
Hello,
[Edit: The whole thing has a very simple solution: the matrix used the single datatype instead of the default double]
I have just noticed a somewhat peculiar (I think) behaviour in matlab and wonder what's causing it. I have a 10000x500 matrix M with values ranging from
min(min(M)) = -226.9723 to
max(max(M)) = 92.8173
and...
I have 2 images that look nearly identical. The histogram for one (256 bins) has intensities distributed pretty evenly throughout. The other has intensities at the lowest and highest bin. Why would this be? Then wouldnt it appear binary (thats not the case)?
...
I have a Matlab script that requires a function in a DLL, and calls addpath to put it's location on the path. This works fine, but when I try to invoke the same script on the command line with matlab -r "scriptname" it errors out saying that method is undefined. Is there something different happening when I'm starting from the command li...
In Matlabs recent versions, the specgram function is being replaced by spectrogram, and the documentation states:
Note. To obtain the same results for the removed specgram function, specify a 'Hann' window of length 256.
Unfortunately, that doesn't seem to work for me, if I use spectrogram(signal,hann(256)), the result is different...
Hallo,friends
we have the following problem
syms t u0 u1
u0=sin(t);
R1= diff(u0,'t',2)+u0-u0^3;
u1=dsolve('D2u1+u1=R1','t')
gives the ans
u1=R1+c1*sin(t)+c2*cos(t).
But it does not use the value of R1.
How can we do this.Please,tell me.
Thanks in advance
...
I have image which size was 600 * 600 and it was displayed on 800 * 800 pixel screen.
The x,y coordinate in which the user look on screen was recorded in an array:
x =[250,300,390,750,760];
y =[120,550,250,130,420];
In other program, I want to plot the x,y coordinate on the 600 * 600 image. The problem is that some of the x,y plot we...
In MATLAB when I run the command [V,D] = eig(a) for a symmetric matrix the largest eigenvalue (and its associated vector) is located in last column. However, when I run it with a non-symmetric matrix however the largest eigenvalue is in the first column. I am trying to calculate eigenvector centrality which requires that I take the compu...
In Matlab, at what point is having a sparse array better than a normal array if I still have a lot of calculations to do on it, and about 25% of the array are non-zeros?
...
How do find out what bit a file is? I have a tiff and convert it to class double to work with the values in the command line. When I do that though the histogram (256 bins) looks like it is binary when that isn't the case for the original file. Why is that? How do I correct that? Another odd thing is the image that I get isnt binary, you...
please i need a matlab algorithms for a potentiostat
thanks
...
Hey all. Im trying to sort out how to get MATLAB running as best as possible. I have a pretty decent new machine.
12GB RAM
Core i7 3.2Ghz Cpu
and lots of free space.
and a strong graphics card.
However when I run the benchmark test of MATLAB (command bench) it lists the computer as being near the worst, around a Windows XP single cor...
Hey,
I have some troubles with memory management in Matlab. Finally it leads to not enough free memory and an error.I tried to pinpoint the problem and found one interesting "feature": Somehow I loose free Memory in Matlab.
I do the following:
1) Start Matlab
2) typing "memory" I get: Maximum possible array: 1293 mb, Memory available ...
Hallo friends,
I want to figure out the following problem:
Suppose,we have expression like,
syms t k A0
r1=(-1+k-3/4*k*A0^2)*sin(t)+1/4*k*A0^2*sin(3*t)+A0*sin(5*t);
we want to remove the coefficients of sin(t) and solve it for A0 & finally put this value to the rest of the expression.How can we do it without cut and paste.
...
Hi,
I would like to know if there is a good way for indexing multidimensional objects (i.e. images). More precisely, I have a large collection of images on which I calculate n-dimensional feature vectors. There is a distance metric (i.e. L2-norm) defined over those feature vectors d(u,v). Given a key (an n-dimensional) k, the index shou...
I am fairly new to matlab but for my job I need to import an ENORMOUS data set and organize it in a certain way. I have written a code that will do this, but very ineffieciently (it is only my third major piece of code and it takes several hours). Matlab is telling me that I can preallocate my variables (about fifty times in fact) but ...
Hi. I am new to Matlab and programming in general, but I am curious about what I have noticed in a particular script I have made. I have a 'Switch' in a fairly complicated for loop that runs many times. When testing it on a file that uses only cases 0-4, I noticed that if I delete the switch cases 5-8 (no other changes) my time goes f...
Hi,
since Ada doesn't possess any good libraries for scientific computing, I was wondering if anyone has been able to use Matlab mathematical functions such as eig (for calculations of eigenvalues and eigenvectors) within Ada.
I see that some interfaces exist for simulink and Ada. But I'm not a user of Simulink. I would like just to...