Community Profile

Contact

Top 1% contributor

You could also download it yourself here: <http://www.mathworks.com/products/compiler/mcr/index.html> Version 8.1 correspo...

accepted

3

Answered 1 year ago

If your x is the output of an ODE solver, then it might not hit x2 = 1 exactly and you will need to interpolate. You could us...

Answered 2 years ago

Assuming that the second column of a is always >= the first column of a, then this is an efficient solution. mA = max(a(:));...

You can use BITXOR, V = uint16( round(65535*rand(5,1)) ); V2 = bitxor(V,1+2+4); % 1+2+4 = 7 = 0000000000000111 de...

Although I don't recommend programming like this in MATLAB, sometimes writing out the logic out explicitly can make it run extre...

Very ugly, but works: UnsortedText = {'BBB 1'; 'AAA 10'; 'AAA 9'; 'AAA 1'; 'BBB 2'; 'BBB 19'; 'BBB 9'; 'CCC 0'; 'CCC 9' ;...

210 downloads

3 years ago

73 views

0

The number of Ramen shops in Tokyo (as indicated by tabelog.com)

54 views

Number of sushi restaurants in Tokyo (as listed on tabelog.com)

As mentioned in the links below in Jan Simon's answer, there is the matlab.desktop.editor X = matlab.desktop.editor.getAll ...

Answered 3 years ago

sum(bsxfun(@times,reshape(A,8,[]), 2.^(7:-1:0)'))

Answered 4 years ago

Both answers are correct. d/dx[ (x+y)^2/2 ] = d/dx[ x^2/2 + x*y + y^2/2 ] = x + y d/dx[ x^2/2 + x*y ] = x + y The a...

You could probably just differentiate numerically. But if you wanted to do it analytically, that's not so hard either. The coeff...

6465 views

Responded 4 years ago

I think you can set a good initial condition and bounds automatically based on the data. Given your desired equation: A+B*(1.0-...

5116 views

A few observations: 1. A lot of the operations you are doing can me written more efficiently as matrix operations (dot prod...

2

This seems to work well: % Making some random data... N = 1000; K = 100; A = sprand(N*K,N,0.0001); [r,c,val...

This vectorized solution uses complex exponentials and works about 2 orders of magnitude faster for large vectors. M = exp(...

Given some image, for example (just to make a random image): I = conv2(randn(500),ones(10)) > 10; imshow(I); To keep...

If you know the times that you want to stop and restart it at, could you maybe use the SimState to resume the simulation, someth...

I think you might be better off grouping your multiplications so that you maximize matrix-vector products instead of matrix-matr...

Here are two possible ideas. Given a circle center and a normal vector: R = 0.25; %Radius xyz = randn(1,3); %Circle cent...

The fastest way to do something generally depends on the size and structure of your data. Don't assume loops are slower. For si...

If the exponent was a scalar, say a=2, then : a = 2; 3^2 = 9 = exp(2 * log(3)) If you define z = 2*log(3), then ...

Maybe something like this? XX=[100.0000 167.3203 359.0253 410.6382 585.7535 716.6290 712.9424 476.9977 364.5553 185.7535 ...

No. But you can specify a "tag" of "32", and then use that to refer to the object using FINDOBJ. For example: figure ...

For one system: sys = rss(3); h = stepplot(sys1); h.Response.Name = 'Bill'; Or multiple systems: sys1 = rss(3...

Use 2-D convolution: I = [ 5 4 3; 9 8 6; 6 3 4;] I_1 = I; I_2 = I; I_1(2:en...

You're pretty close. Except you don't want to solve 'x^2 + y^2 = 0' You want to solve 'x^2 + y^2 = R^2' --------------...

Instead of having this %obtains the slider value from the slider component handles.temporalFiltWeight = get(handles.tem...

Load more