답변 있음
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...

14년 초과 전 | 0

답변 있음
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 ...

14년 초과 전 | 2

답변 있음
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...

14년 초과 전 | 0

답변 있음
Array matching
child = A; child(A ~= B) = 0;

14년 초과 전 | 4

답변 있음
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...

14년 초과 전 | 0

답변 있음
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. ...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 1

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

| 수락됨

답변 있음
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...

14년 초과 전 | 0

답변 있음
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 ...

14년 초과 전 | 0

답변 있음
Why do you come to "MATLAB Answers"?
Escapism...

14년 초과 전 | 1

답변 있음
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...

14년 초과 전 | 0

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

14년 초과 전 | 0

답변 있음
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]

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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...

14년 초과 전 | 0

답변 있음
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: ...

14년 초과 전 | 1

답변 있음
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 ...

14년 초과 전 | 1

답변 있음
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 ...

14년 초과 전 | 0

답변 있음
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. ...

14년 초과 전 | 1

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

14년 초과 전 | 1

| 수락됨

답변 있음
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...

14년 초과 전 | 0

답변 있음
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 ...

14년 초과 전 | 0

| 수락됨

더 보기