Answered
Homework matlab problem - Determine r1, r2 and surface area - use matrix?
_EDITED_ syms R1 R2 h S positive r1s = subs([1000 - 1/3*pi*h*(R1^2 + R2^2 + R1*R2),... pi*(R1+R2)*sqrt((R2-R1)...

15 years ago | 2

Answered
Numerical Integration
a = 1 % eg, input value a b = 5 % input value b g1 = 2 % input value g1 f = @(x)x.^2 % input function f g = @(t)t....

15 years ago | 2

| accepted

Answered
convolution of the corner pixel
>> image2_11 = [0 0 0;0 1 2;0 3 4] image2_11 = 0 0 0 0 1 2 0 3 4 >>L = ...

15 years ago | 0

| accepted

Answered
Calculating annual means for different time periods
variant *corrected* [14:14 MDT] %{ data - your array (double array) in view : data = [195101 ...

15 years ago | 0

| accepted

Answered
struct array
[A(:).id] = B.id

15 years ago | 0

| accepted

Answered
create merged waves
t=0:.001:3; plot(t,sin(2*pi*50*t)+4*sin(2*pi*.33*t))

15 years ago | 1

Answered
to find average value in a particular range of a matrix
variant 1 for the intervals: 1:100, 101:200,...,601:700 out = mean(reshape(yourmtx,100,[])); variant 2 for the intervals...

15 years ago | 1

Answered
PPVAL , a short question
x = linspace(1,3,3) breaks=[1 2 3]; coefs=[1 1; 1 2]; pp = mkpp(breaks,coefs) y=ppval(pp,[1 2 3])

15 years ago | 0

Answered
HOW TO DIVIDE RANDOMLY
r = 5; n = size(a,1); k = n/r; groups5 = reshape(permute(reshape(a(randperm(n),:),k,[],2),[1 3 2]),k,[]);

15 years ago | 0

| accepted

Answered
how to divide into groups equally
n = 5; k = size(a,1)/n; groups5 = reshape(permute(reshape(a,k,[],2),[1 3 2]),k,[]);

15 years ago | 0

| accepted

Answered
how get it?
nchoosek(x,3)

15 years ago | 0

Answered
How to sort array matrix, finding means of output for matching months and reading stations?
A = sortrows(data); [a1,~,n] = unique(A(:,1)); out = [0:12;a1 accumarray([n A(:,2)],A(:,3),[n(end) 12],@mean)];

15 years ago | 1

Answered
statistics, discrete math, combinations question
you want it? n = 30; k = 11; out = prod(n-k+1:n)

15 years ago | 0

Answered
primes function
k = 1e4:2e4; out = k(isprime(k)); variant prms = primes(20000); out = prms(prms>=10000);

15 years ago | 3

Answered
cubic spline function
use functions from |Curve Fitting Toolbox| x = [0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4]'; y = [107,110,112,113.5,114,112,10...

15 years ago | 0

Answered
how can make for-loop in an if-end command for 'and(&) ' all arrays?
if all(yourmatrix(:,1)<1) a=2; end

15 years ago | 1

| accepted

Answered
make zero some rows of a matrix
r(r(1,2)-r(:,2)>=2,:) = 0

15 years ago | 1

| accepted

Answered
Find index in matrix
[~,indrow] = ismember([101004,1012],A(:,1:2),'rows')

15 years ago | 0

Answered
HOW TO SORT INTO GROUPS
out = reshape(permute(reshape(a,2,[],2),[1,3,2]),2,[])

15 years ago | 0

| accepted

Answered
sort a matrix depending on first row
out = sortrows(B.',1).' variant [~,inx]=sort(B(1,:)); out = B(:,inx);

15 years ago | 13

Answered
How to convert matrices in a unique cell
Your matrix A and B C = {A, B} variant for 100 matrixes vars = whos; c=cell(numel(vars),1); for j1=1:numel(c),c{j1} ...

15 years ago | 0

| accepted

Answered
sincronyzing 2 matrixes
* Tlat - vector latitude for matrix Temperature. * Tlon - vector longitude for matrix Temperature. * Blat - vector latitude fo...

15 years ago | 0

Answered
replacement of for loop in matlab
img(img <= 25) = 255

15 years ago | 0

| accepted

Answered
Plot a vector that contain dates in concatenated number format and plot it using dates
A = [[20000101.1 20000101.2 20000101.3 20000912.15]]; d = datenum(num2str(A'),'yyyymmdd.HH'); out = datestr(d,'mmm dd yyyy...

15 years ago | 1

| accepted

Answered
how to process in descending order
out = sortrows(data,-1)

15 years ago | 2

Answered
How to define the abstract symbolic of 'f=f(x,y,z)' at Matlab-Smbolic.
syms x y z f g = x * f + y * f^2 + z g1 = subs(g,f,'f(x,y,z)') gj = jacobian(g1,[x y z]) for j1 = [x y z],gj = sub...

15 years ago | 1

Answered
how to sort data
data = reshape({5 'R' 3 'E' 1 'A' 4 'P'},2,[])' out = sortrows(data,1) or out = reshape(sortrows(data,1)',1,[]) if d...

15 years ago | 1

Answered
how can i get a horzenital vector?
X1 = reshape(X',1,[])

15 years ago | 1

| accepted

Answered
selcting 3 values from top 10 values
My variant X = randi(500,1000,1); [~,IR] = sort(rand(100,10)); R = X(bsxfun(@plus,IR(1:3,:),0:size(IR,2)-1));

15 years ago | 0

Answered
Convert double
B = num2cell(A)

15 years ago | 1

| accepted

Load more