主要内容

Results for


function b = most_change(a)
a(:,1)=a(:,1)*0.25;
a(:,2)=a(:,2)*0.1;
a(:,3)=a(:,3)*0.05;
a(:,4)=a(:,4)*0.01;
d=sum(a,2);
c=max(d);
for i=1:length(d)
if d(i)==c
b=i;
end
end
i got wa please explain idont understand
I would like to receive your feedback:
  • would you find useful to have spellcheck built into the MATLAB Editor?
(Consider also an associated toggle, positioned somewhere in the Editor, that would enable/disable the spellcheck for selective use)
Lately, I am writing many quick analyses for publish() and I find that first publishing to MS Word (to check the spelling) and then re-publishing to .html, after manual corrections, disrupts the working.
IMHO, the idea to include spellcheck into the editor would be consistent with the renewed visibility of the PUBLISH tab.
Given a tic tac toe board:
1 represents X
0 represents empty.
-1 represents O
It is X's move. If there is an immediate win possibility, choose a square for an immediate win. Otherwise return 0.
Return absolute index of the square of choice. If multiple square are valid, return them in order.
Example:
Input a = [ 1 0 1
-1 1 0
0 -1 -1]
Output wins is [4 8]
Can anyone explain it in detail?
I'm confused with the sentence I marked ans bold style.
Thanks a lot~~~
I've written a valid answer to the last Cody problem, but it is not even close to the best answer. I have no idea how they made this short answer. To unlock it I need to solve another Cody question, but there are none left... :(
Anybody know how to unlock the last question?
Hi,
i'm "solving" number 30 cody's problem.
I think to solve that whit sortrows function.
If I have a z vector:
j = sqrt(-1);
z = [-4 6 3+4*j 1+j 0];
my funtion is:
function z = complexSort(z)
z(2,:)=sqrt(real(z).^2+imag(z).^2);
z=sortrows(z',-2);
z=z(:,1);
end
End it return the result
z =
6.0000 6.0000
3.0000 - 4.0000i 5.0000
-4.0000 4.0000
1.0000 - 1.0000i 1.4142
0 0
The question is: why imagine part in input is positive e sortrows trasform it in negative?
best regards
Marco
NOTE: this discussion is continued at MATLAB Answers Wish-list #6 (and bug reports)
This topic is for features you would like to see for the MATLAB Answers facility itself, and also for bug reports about the MATLAB Answers facility.
This topic is the follow on to the earlier Wish-list for MATLAB Answer sections. That topic grew large enough to become unwieldy; and Mathworks has made enough changes to make a number of the past points no longer of relevance. There was also a more limited purpose <http://uk.mathworks.com/matlabcentral/answers/216662-new-design-of-the-forum-grey-on-white-wish-list-3-bug-reports
I suggest one wish (or bug report) per answer, so that people can vote their wishes.
I'm curious, is there something you wish to do with MATLAB but you can't, maybe something you can do with other similar software but can't with MATLAB?
For new entries, please use the follow-up thread here. Please do not post new answers in this thread.
This topic (which was not started by Mathworks) is for features you would like to see for this MATLAB Answers facility.
I suggest one wish per answer, so that people can vote for individual wishes.
What should you post where?
Wishlist threads (#1 #2 #3 #4 #5 #6): bugs and feature requests for Matlab Answers
Frustation threads (#1 #2): frustations about usage and capabilities of Matlab itself
Missing feature threads (#1 #2): features that you whish Matlab would have had
Next Gen threads (#1): features that would break compatibility with previous versions, but would be nice to have
@anyone posting a new thread when the last one gets too large (about 50 answers seems a reasonable limit per thread), please update this list in all last threads. (if you don't have editing privileges, just post a comment asking someone to do the edit)