Beantwortet
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...

etwa 12 Jahre vor | 1

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

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 1

| akzeptiert

Beantwortet
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.

etwa 12 Jahre vor | 0

Beantwortet
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)

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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(...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 3

Beantwortet
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....

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 1

Beantwortet
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...

etwa 12 Jahre vor | 1

Beantwortet
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...

etwa 12 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

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

etwa 12 Jahre vor | 0

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

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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) ...

etwa 12 Jahre vor | 0

| akzeptiert

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

etwa 12 Jahre vor | 0

Beantwortet
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(...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

etwa 12 Jahre vor | 1

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

etwa 12 Jahre vor | 0

| akzeptiert

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

etwa 12 Jahre vor | 7

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

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 12 Jahre vor | 0

| akzeptiert

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

etwa 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 0

Mehr laden