Community Profile

Ahmed Fasih


40 total contributions since 2009

Contact

Contributions in
View by

Answered
how to tabulate this results using fprintf?
See cprintf package on Mathworks File Exchange: <http://www.mathworks.com/matlabcentral/fileexchange/24093-cprintf-display-forma...

2 years ago | 0

Answered
Have you seen this blog on MATLAB?
Right, and the best carpenter will be one who only uses a saw, the best doctor is the one who only needs a scalpel, and the best...

3 years ago | 0

Responded


Re: Suppress mex output
Ping. Any progress on this question in the last 5 years?

5 years ago | 2345 views

Responded


Re: scale and truncate
x = randn(100,1); xscaled = interp1([min(x) max(x)], [0 1], x); xtruncated1 = x .* (x>=0 & x<=1) + 1*(x>1); xtruncated2 = min(ma...

6 years ago | 12567 views

Responded


Re: write linebreaks into text file
Do instead of just text, use sprintf(text): fprintf(fid, '%s', sprintf(text)); Let us know if you don't understand why '\n' in...

6 years ago | 4666 views

Responded


Re: Group strings in cellarray
So you know how to use ^ to match starting characters, but you can also use $ to match ending ones: make_index = @(c) cellfun(@...

6 years ago | 2362 views

Responded


Re: Reading '[ ]' as one variable
If you're in Mac/Unix or have Cygwin in Windows, you can do the following shell script, cat data.txt | sed 's/\[\s*\]/\[\]/g' >...

6 years ago | 1468 views

Responded


Re: Integer optimization
A Google reveals [1]. I am surprised that that's all I could find in Matlab, though of course other systems have more functiona...

6 years ago | 4276 views

Responded


Re: Extract numbers that are not repeated
I was confused by the sizes of X and Y, but I'm assuming that both X and Y are just vectors. help setdiff output = setdiff(X(:...

6 years ago | 1984 views

Responded


Re: Figure larger than screen resolution
Matlab's native incompetence at figure output is alleviated by the fantastic export_fig utility [1]. Seems to do the trick. I...

6 years ago | 4661 views

Responded


Re: Question:
See the "Flow and Loop Control" video (14:06 long) at http://www.mathworks.com/academia/student_center/tutorials/mltutorial_laun...

6 years ago | 818 views

Responded


Re: Line coordinate problem
u = v = ans = answer =

6 years ago | 1859 views

Responded


Re: How to remove four or more four consecutive zeros from data
Here's the first thing that popped into my mind. 1) Download run length decoding/encoding (rle) from [1] 2) Then do the followi...

6 years ago | 2591 views

Responded


Re: Plot 2D Graph with multiple labels
The following minimal example shows the use of logical indexing [1] here. x = linspace(0, 1, 20)'; y = x.^2; z = rand(size(x))*...

6 years ago | 3163 views

Responded


Re: Semilogx limit
help xlim

6 years ago | 3996 views

Responded


Re: Function plot with conditions
Any number of ways are available. 1. If you want a just a decent estimate of the value at which f(x) = 0.95, first, look at th...

6 years ago | 4644 views

Responded


Re: Manipulating variables with multiple values
I don't understand your application, but this should be easy to do with logical indexing [1]. [1] http://www.mathworks.com/help...

6 years ago | 1410 views

Responded


Re: Question about "int" and "quad"
Hahahahahahaha, this was a hilarious post, thank you. Your int approach is totally not doing what you think. Try this: test =...

6 years ago | 1325 views

Responded


Re: Choosing the suitable optimization solver
What does the following statement of yours mean? See [1]. [1] http://www.catb.org/~esr/faqs/smart-questions.html

6 years ago | 2594 views

Responded


Re: AWGN channel problem
Are you asking how to add two vectors in Matlab? I doubt it, but this is what I'd try: [yt, t] = unipolar(binary_sequence, fd, ...

6 years ago | 3186 views

Responded


Re: Use strings with urlwrite
This isn't as easy as in Perl or Python, but pretty easy: "help sprintf" "help fprintf" Maybe even "help sscanf".

6 years ago | 1621 views

Responded


Re: mat file endianness
I don't know the answer to your question but Scipy has open-source code to load and save MAT files (including v5) and may help y...

6 years ago | 2576 views

Responded


Re: volume visualization
Your question doesn't make any sense to me as asked, but the entire list of Matlab 3D volume visualization functions is given in...

6 years ago | 2019 views

Responded


Re: Time stretching/expanding signal sal22
You don't want interpolation then, you want REPMAT. If you have a 1 second signal and you want to repeat it 60 times, repmat(y, ...

6 years ago | 1779 views

Responded


Re: Multiple 2D contour plots at different depths
If you have your 2D data in a 3D matrix (with time as the third dimension), I *think* "doc contourslice" does what you want. Loo...

6 years ago | 3916 views

Responded


Re: Weighting Fit Parameters and Data.
I think I sort of understand what you want, but I don't think you really want that: lsqnonlin returns the fit that minimizes a c...

6 years ago | 1129 views

Responded


Re: How to vectorize fprintf?
Perhaps someone more knowledgeable than me can help more, but unfortunately, the only way I've come across to vectorize fprintf ...

6 years ago | 1755 views

Responded


Re: Finding the maximum value of a matrix
Welcome to Matlab. Try the following. [maxval maxloc] = max(A(:)); 1) A(:) converts a multidimensional array (in this case, a ...

6 years ago | 104428 views

Responded


Re: Matrix sampling
Try the following: idx = sub2ind(size(RandomNums), seeds1, seeds2); RandomNumsBack = RandomNums(idx) Alternatively, seedslin ...

6 years ago | 1273 views

Responded


Re: Function plot with conditions
help trapz

6 years ago | 4644 views

Load more