Answered
Can Matlab do L1 minimization?
It will do its best to minimise the residual errors. If a real solution exists, it will converge on that. Yes, it's 'approxima...

13 years ago | 0

Answered
Summing output of for loop.
I gather you have the following situation, or something similar. nloops = 100; sumE = zeros(n,m); for i = 1:nloops ...

13 years ago | 2

Answered
Save an iterated 3D pixel sum as a vector? (Successful help -> I'll paypal the value of a beer!)
Just gonna chuck in my 2c worth... h = heightLower(CaseStudy,1):heightUpper(CaseStudy,1); w = widthLower(CaseStudy,1):wi...

13 years ago | 0

Answered
Array matching
child = A; child(A ~= B) = 0;

13 years ago | 4

Answered
sum hourly precipiation data into individual storm events
You can use basic MatLab stuff for this too. Convolution will detect stretches of no rainfall. dry = conv(rainfall, ones...

13 years ago | 0

Answered
How to do a network program?
This is an answer I gave a while ago for someone wanting to interface with MySQL. Might help you get past a couple of hurdles. ...

13 years ago | 0

Answered
How to determine connectivity with binary numbers?
Yeah. A = [1 2 2 2 2; 2 2 1 2 2; 2 2 2 2 1; 1 1 2 2 2; 2 2 2 2 2]; B = ~logical( A - 1 ); Now do your tests with B, l...

13 years ago | 1

Answered
right shift of integer variable
MatLab is pretty infuriating sometimes. For example, if you cast a float as an int, it 'helpfully' _rounds_ the value instead...

13 years ago | 0

Answered
measuring a triangle
You want the side lengths? Is it easy to determine whether a pixel is in the triangle or not? _ie_ is it isolated? You coul...

13 years ago | 0

Answered
Help! Matrix minimal path?
The REAL way to do this is to implement Dijkstra's Algorithm: <http://en.wikipedia.org/wiki/Dijkstra's_algorithm> Or to use d...

13 years ago | 0

Answered
Matrix Max Sum
If I understand your question correctly, you must pick a value from each row/column such that you never use a row or column more...

13 years ago | 0

Answered
Convert to date, hour, and minute
Yep, First, concatenate the first and third columns to use the normal date conversion, then add the second column. Put the r...

13 years ago | 0

Answered
Problem with imresize function.
The upscale and subsequent downscale of 8 > 192 > 8 should be fine, but I don't know how you expect resizing from 5 > 1 > 5 is g...

13 years ago | 0

Answered
Basic Matlab Fractal Function (Recursion Loop Help)
So the whole point of using recursion for a fractal is that you call a single function which draws your fractal. Repeated recur...

13 years ago | 0

Answered
Interface microphones using matlab
Sorry mate, it looks like you are expecting the two-channel mic jack on your sound card to have three inputs. Go and buy your...

13 years ago | 0

| accepted

Answered
Matrix Error
Well, |u| is a 1x450 vector, and |x| is a 1x3 vector. You can't add those together. What is that line of code supposed to _m...

13 years ago | 0

Answered
Economical use of memory
As long as you don't CHANGE the variables that you pass into your function, they are passed by reference. Consider this test ...

13 years ago | 0

Answered
Why do you come to "MATLAB Answers"?
Escapism...

13 years ago | 1

Answered
How to remove noise?
As Walter says, everything is text. Are you planning to use character recognition on this? In your case, I'm going to assume...

13 years ago | 0

Answered
matrix
m(row, :) = []; Where |row| is the row index, or vector of row indices.

13 years ago | 0

Answered
how to plot in red colour on image
You mean you want to change the pixel at x,y to red? img(y,x,:) = [255 0 0]

13 years ago | 0

Answered
GUI in Busy Status - Block interactions in the Figure
Maybe you could look at doc uiwait Dunno how to stop clicks on the menu/toolbar. But you could just hide them =) s...

13 years ago | 0

Answered
Trigger camera at evenly spaced times
I had a look at the camera's manual here: <http://www.thorlabs.us/Thorcat/15900/15982-D02/index.html> It apparently comes wit...

13 years ago | 0

Answered
plotting a vertical line in matlab?
As the error says, you don't have a variable called |x| and so you can't ask for the 668th element. You might mean this: ...

13 years ago | 1

Answered
Computing vectors using a square n by n matrix. Seems easy but is tricking me.
There really are no shortcuts in learning how to think in computer-speak. Your real learning happens when you sit down and try ...

13 years ago | 1

Answered
Trying to write a program to implement Euler's Algorithm????
Have you considered doing a _google_ for the Euclidean Algorithm? <http://lmgtfy.com/?q=euclidean+algorithm> Try the very ...

13 years ago | 0

Answered
Writing a program for generating random numbers involving a circle and a square, help please??
You are generating your x- and y-values between -1 and 1, which means you're automatically sampling randomly within the square. ...

13 years ago | 1

Answered
RMS amplitude
I gave an answer today that required an RMS calculation. <http://www.mathworks.com.au/matlabcentral/answers/35658-how-can-i-c...

13 years ago | 1

| accepted

Answered
help using fgetl function???
Mate, you're doing something odd. For starters, you're opening the file in 'write' mode but you are clearly wanting to read f...

13 years ago | 0

Answered
Using slider to update a variable displayed in a text box
In your slider-change callback, you need to add code that will cause the edit box to update. function onSliderChanged ...

13 years ago | 0

| accepted

Load more