답변 있음
How to multiply a vector with each column of a matrix most efficiently?
The first question has been addressed, so I'll just throw out a couple of points about the second question. * The newer the v...

거의 15년 전 | 2

| 수락됨

답변 있음
Throws to get yatzy?
Try this: function [nr_throws] = nr_throws() nr_throws=1; % First throw throw = randi(6,1,5); most_common=mode...

거의 15년 전 | 0

| 수락됨

답변 있음
Ordering answers to calculations with lowest first
results = zeros(16,1); for k = 1:16 results(k) = %do calculation end disp(sort(results)) Is that what you mean? ...

거의 15년 전 | 0

답변 있음
solving system of ODE's
Although I'd generally agree with Jarrod about using |ode45| or similar, from the wording of the question, it sounds like your p...

거의 15년 전 | 0

답변 있음
Datenum failed
Assuming you haven't looked at every string individually, I'd guess the mostly likely cause is a malformed string somewhere in t...

거의 15년 전 | 0

| 수락됨

답변 있음
matlab certification
RoJo is correct. You receive confirmation of any MathWorks training courses you complete, but there is currently no MathWorks...

거의 15년 전 | 3

답변 있음
TUTORIAL: how to ask a question (on Answers) and get a fast answer
Do (if possible): * Give examples. * Provide standalone code. If not possible, give a thorough explanation of what the miss...

거의 15년 전 | 7

답변 있음
i need to read matrix from a png file
*answer* (1) Yes, a |for| loop will do the job. You need a string in each pass through the loop to represent the file name. Yo...

거의 15년 전 | 1

답변 있음
altering matrices
convn(A,B,'same') where |A| is your matrix, and |B| is a mask that determines the weightings of points for averaging. ...

거의 15년 전 | 2

| 수락됨

답변 있음
Find the Error - FZero Function. Constant loop.
You're calling |fminsearch| with the same initial guess every time. So you get the same |NCons| and |NFirm| every time. So you...

거의 15년 전 | 0

답변 있음
Sorting Algorithm
In the spirit of Sean's answer... this works for the given example: [~,idx] = unique(Array1); Array2(idx) *EDIT* (and may ...

거의 15년 전 | 0

답변 있음
Hello , by matlab , compute the product of :
disp(1*0.6366)

거의 15년 전 | 1

답변 있음
Contributors metainfo: reputation and more
Various congratulations are in order. # Walter's 1500th answer # Walter breaking 2500 rep # Matt Fig's 500th answer # Paul...

거의 15년 전 | 1

답변 있음
finding coordinates or locations in matrix?
[row,col] = find(...)

거의 15년 전 | 4

| 수락됨

답변 있음
'fname' variable or function?
This is a common error when someone runs a function as a script. That is, running Rebuild2 via the interface (the Editor "play ...

거의 15년 전 | 0

답변 있음
Get Unique Instance Identifier
Dumb question: why can't you just use the cell index?

거의 15년 전 | 0

답변 있음
Insert zeros in a vector - Random
Perhaps I misunderstand, but you should be able to do simply: spikes(SpikeTimes*10) = 1; Example: x = [1 2 7 14 17] y =...

거의 15년 전 | 0

| 수락됨

답변 있음
PCA matrix indexed by Day
How are the matrices stored? Chances are, this is probably time for an old-fashioned |for|-loop, possibly using 3-D arrays.

거의 15년 전 | 0

답변 있음
Problem of robust fitting using the "robustfit" function
There really is no "right" answer, because it's a matter of how you view the problem. |robustfit| uses the residuals to calcula...

거의 15년 전 | 0

답변 있음
Pearson Calculation using MATLAB
Your |y| values are all the same. Hence y_i - mean(y) = 0 for each i. The formula for covariance is cov(x,y) = sum_i[(x_i-m...

거의 15년 전 | 0

답변 있음
Data Return Using @
|t| is not determining the parameters |mu|, |sig|, and |df|. They are arguments to the function defined by |t|; they are passed...

거의 15년 전 | 0

답변 있음
Calculating Mean inside a loop
If you have Statistics Toolbox, you can use |grpstats|. In general, if you're doing a lot with variables in groups, you might w...

거의 15년 전 | 0

| 수락됨

답변 있음
variable coefficient
All the solvers can handle variable coefficients - they are completely ignorant of the details of the equations. All they requi...

거의 15년 전 | 0

| 수락됨

답변 있음
please help me to rewrite this code correct
A few problems leap out at me right away: # |x1 = x0 - f\diff(f)| Slashes in MATLAB are interpreted as "solve the system of eq...

거의 15년 전 | 0

답변 있음
Changing grid lines to a solid line instead of dashed
set(gca,'GridLineStyle','-') You can't change the gridline color independently of the axis color. The closest you can do is: ...

거의 15년 전 | 0

답변 있음
How to move from one gui page to another by clicking push button?
I do this for things like help windows: # Set the |'Tag'| property in each window # In the callback, use |findobj| to find the ...

거의 15년 전 | 2

답변 있음
Optimization Simple search
Can you explain what you want beyond |min(x)|?

거의 15년 전 | 1

답변 있음
common colorbar
Hard to say without seeing the code, but it looks like there's some condition that makes it possible for |layoutColorbar| to com...

거의 15년 전 | 0

| 수락됨

답변 있음
How to save statitiscs displayed in workspace as text file?
Do you mean you want a list of variable names, sizes, classes, bytes used,...? If so, you could do |vars = whos|, then save/wri...

거의 15년 전 | 0

| 수락됨

답변 있음
errors in this code - 1D PDE with Boundary Condition
I don't know exactly what you're trying to do with |t| and |T| (and associated |nt| and |NT|), but the result is that |c| and |C...

거의 15년 전 | 0

더 보기