Respondida
can this loop be vectorized?
I'm seeing a slight (1.25ish times) speedup with the bsxfun approach function speedyhypot() X = repmat(0:5:1000,201,1); Y...

alrededor de 12 años hace | 1

Respondida
matrix C from A and B
Or use |setxor| >> C = setxor(A,B,'rows')

alrededor de 12 años hace | 0

Respondida
How to check if a 3d matrix has any 2D submatrix with non zero elements?
pagesWithNonZeros = squeeze(any(any(x,1),2)) You can pass _dim_ into |any| to test if there are any nonzero elements in tha...

alrededor de 12 años hace | 1

| aceptada

Respondida
Traveling salesman intlinprog function in 2013b
If your company/agency/university is current on SMS then you should be able to upgrade to R2014a at no additional cost.

alrededor de 12 años hace | 0

Respondida
In Matlab when issuing a custom warning, the message-id is not being recognized. How do I correct this?
It doesn't like the hyphen: warning('Custom:data_missing','Can''t access Customer Terms for data point #%d.',i)

alrededor de 12 años hace | 0

| aceptada

Respondida
sum values of histogram bins
Building on The Cyclist's answer, use |accumarray| to do the summing: x = randn(100,1); edges = -10:10; [~, idx] = histc(...

alrededor de 12 años hace | 0

| aceptada

Respondida
Help for codes about strength of materials.
This is just the initialization code for a GUIDE generated user interface. It looks like someone started a new user interface w...

alrededor de 12 años hace | 1

| aceptada

Respondida
How to force matlab to save before exit?
Inside of your <http://www.mathworks.com/help/releases/R2014a/matlab/ref/finish.html |finish.m|> file, you can save the files us...

alrededor de 12 años hace | 0

| aceptada

Respondida
How do I change the font size for text in my figure?
I think what you want to do is set the _'Default'_ font size for the axes set(gca,'DefaultTextFontSize',18) Now any text...

alrededor de 12 años hace | 3

Respondida
Chnage number display format
How are you writing it right now? If you are using |fprintf| you can change the format spec. For example: fprintf(1,'%10....

alrededor de 12 años hace | 0

Respondida
Viewing answers numerically from pdetool box
Under the file menus the bottom option is always export the relevant data: <</matlabcentral/answers/uploaded_files/13204/Capt...

alrededor de 12 años hace | 0

| aceptada

Respondida
Suppress callbacks generated by GUIDE
I don't believe so. You can always retroactively delete the callbacks in the property inspector and in the generated MATLAB f...

alrededor de 12 años hace | 1

Respondida
undefined function or method 'ocr' for input arguments of type 'unit8'
|ocr| was released in the Computer Vision System Toolbox in R2014a so if you are on an older release or don't have CVST, you wil...

alrededor de 12 años hace | 1

Respondida
How can I return a char of object variable name from a method
Why not just store it as a property? *More* If it ONLY needs to work from _one_ method calling _oneother methods (i.e. not...

alrededor de 12 años hace | 1

| aceptada

Respondida
New to MATLAB - How to use imread/imshow commands?
You need to put the string in quotes. Also not sure about the double \\ I = imread('C:\Users\username\Desktop\untitled.png...

alrededor de 12 años hace | 0

| aceptada

Respondida
How to implement TSP?
<http://www.mathworks.com/help/releases/R2014a/optim/ug/travelling-salesman-problem.html>

alrededor de 12 años hace | 0

Respondida
matrix , rows , selection , help
C = A(ismember(A(:,1:2),B,'rows'),:)

alrededor de 12 años hace | 0

| aceptada

Respondida
index exceed matrix dimension error
dbstop if error Will stop when the error occurs so you can inspect every variable at the time of the error. It should then...

alrededor de 12 años hace | 0

Respondida
Can a PhD student use Matlab's student version?
You should absolutely talk to your University's MathWorks' Account Manager. In general most of us technical folks on here won...

alrededor de 12 años hace | 0

| aceptada

Respondida
To take parameter of a fit from one section to use in another fit in the next section.
% Sample data x = (1:10).'; y = cumsum(rand(10,1)); % First fit ft = fittype(@(m,b,x)m.*x+b); fr = fit(x,y,ft) ...

alrededor de 12 años hace | 0

| aceptada

Respondida
GPU programming with MATLAB
You should probably discuss your requirements with your friendly MathWorks Account Manager.

alrededor de 12 años hace | 0

Respondida
Can Matlab (Windows) display 10 bit images on a 10 bit monitor using a suitable graphics card?
This depends on the renderer. It looks like OpenGL can handle it, painters cannot. hfig = figure; surf(peaks); colormap(...

alrededor de 12 años hace | 0

| aceptada

Respondida
How can I define f(x) = x/x in MATLAB (Symbolic Computation)
MuPad can handle a function like x/x without automatic simplification. I'm not sure why you want this though. Why do you care ...

alrededor de 12 años hace | 1

Respondida
axes doesn't work in matlab 6
Set the figure's _'HandleVisibility'_ to be _'on'_. set(fig,'HandleVisibility','on')

alrededor de 12 años hace | 0

| aceptada

Respondida
Is there a way to suppress command outputs to command window?
evalc('yourmainfile');

alrededor de 12 años hace | 7

Respondida
How to use find function to find consistent value in column?
Look at |diff()| This will tell you the difference between rows.

alrededor de 12 años hace | 0

| aceptada

Respondida
Integration of displacement to velocity then acceleration
Don't you mean take the derivative of displacement with respect to time to get velocity and again for acceleration? doc dif...

alrededor de 12 años hace | 0

| aceptada

Respondida
Creating a hard link among properties of an object?
A couple of thoughts Why not just make AllVariables a dependent property. Then every time it's queried it's calculated on th...

alrededor de 12 años hace | 0

| aceptada

Respondida
if statements concerning vectors
if probabilitiesWanted == 2 swtNPVProb(3:10) = nan end

alrededor de 12 años hace | 0

Respondida
Compiled uitable crashes in standalone application
Use a |drawnow| as you have. This will flush the event queue which will force MATLAB to hold until this happens regardless of h...

más de 12 años hace | 0

Cargar más