Risposto
rgb2ind function not working
That's odd. Make sure something screwy didn't happen with you path. What happens when you type which rgb2ind It should p...

oltre 12 anni fa | 0

| accettato

Risposto
How to plot position vs time
t = 0:1000; % Your time vector x = log(t); % Position is natural log of time plot(t,x) % Plot your data

oltre 12 anni fa | 1

| accettato

Risposto
random Gaussian
normrnd(mu,sig,m,n)

oltre 12 anni fa | 0

Risposto
Computational problem
You might not need to. It sounds like bsxfun would help you out. You essencially want to multiply every element of vector A with...

oltre 12 anni fa | 0

Domanda


Arithmetic to Functional Converter
I was wondering if anyone knows of a way to convert arithmetic to functional synatx. For example, I'd like to convert the string...

oltre 12 anni fa | 4 risposte | 0

4

risposte

Risposto
Generating a third function from two existing functions
t = linspace(0,10,1e5); y1=1+0.1*cos(2*pi*100.02*t); y2=1+cos(2*pi*100*t); y3=y1.*y2;

oltre 12 anni fa | 0

Risposto
how to change default behavior of 'times' function
<http://www.mathworks.com/matlabcentral/fileexchange/23821-bsxops>

oltre 12 anni fa | 0

| accettato

Risposto
How to increase memory and max array length!?
Buy more RAM. By my calculation, a 2^16x2^16 matrix of doubles would require 32 GB of RAM. Chances are you'll be making at least...

oltre 12 anni fa | 0

| accettato

Risposto
find length of a line use 2 dots
dist = sum(sqrt(diff(x).^2+diff(y).^2))

oltre 12 anni fa | 1

| accettato

Risposto
trying to create a new vector from 2 vectors.
You'll want to check the size of them. Sounds like one or more of your vectors are column vectors [Nx1]. You want to make sure t...

oltre 12 anni fa | 0

Risposto
Triangle centroid
Just average all the coordinates. For example, if you have a vector containing x coordinates and a vector containing y coordinat...

oltre 12 anni fa | 2

| accettato

Risposto
finding an item in an array
<http://www.mathworks.com/matlabcentral/fileexchange/28113-findseq>

oltre 12 anni fa | 0

Risposto
While/for loop to write a set of values, varying in each column, when they are both in a certain range.
You want to find the rows that satisfy your need. inRangeX = XY(:,1) >= 510 & XY(:,1) <= 530; % First column between 510-53...

oltre 12 anni fa | 0

| accettato

Risposto
merging the matrices
C = [A B]; C = reshape(C',[],3)'

oltre 12 anni fa | 0

Risposto
Constant variable
Justin. You'll want a very handy function, findseq. It can be downloaded on the file exchange. http://www.mathworks.com/matlabce...

oltre 12 anni fa | 0

Risposto
constant variable
Justin. You'll want a very handy function, findseq. It can be downloaded on the file exchange. <http://www.mathworks.com/matlabc...

oltre 12 anni fa | 0

Risposto
Preventing unwanted variables being saved in .mat file
save([fn,'.mat'],'sch_cycle','sch_grade',sch_key_on','sch_metadata'); help save doc save

oltre 12 anni fa | 0

| accettato

Risposto
how to extract elements along specified dimension of array
A = rand(100,100,10,10); dim = 4; sz = size(A); inds = repmat({1},1,ndims(A)); inds{dim} = 1:sz(dim); A(inds{:}...

oltre 12 anni fa | 1

| accettato

Risposto
Determining the second last row
sch_cycle=xlsread('C:\Autonomie practice\cycle.xls','Input_data'); nrows = size(sch_cycle,1)-1;

oltre 12 anni fa | 0

| accettato

Risposto
how sort just nonzero values?
c=[8 0 5 0 1 0 4]; c_new = sort(c,'descend')

oltre 12 anni fa | 0

Risposto
CALCULATION OF MAXIMUM VALUE IN EVERY ROW
m = [ 3 4 5 6 9 0 1 2 3]; mx = max(m,[],2); % EDIT: was max(m,2); Oops out = bsxfun(@eq,m,mx);

oltre 12 anni fa | 5

Risposto
How to plot logarithmic graph in matlab
doc semilogx doc semilogy

oltre 12 anni fa | 0

Risposto
Finding intersection point of the lines
<http://www.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections>

oltre 12 anni fa | 2

| accettato

Risposto
Replace efficiently values in matrix without for-loops
B = b(A);

oltre 12 anni fa | 0

Risposto
calculating and plotting non continuous function
Brat. Your code is illegible. Please use the "code" button when typing it so that it's easier to follow.

oltre 12 anni fa | 0

Risposto
Is it possible to express an exponential in terms of a quadratic?
x = 0:0.1:10; y = exp(x); p = polyfit(x,y,2); x_extrapolated = 10.1:0.1:20; y_extrapolated = polyval(p,x); ...

oltre 12 anni fa | 0

Risposto
determing file size
im1_stats = dir(filename_image1); im2_stats = dir(filename_image2); ratio = im1_stats.bytes./im2_stats.bytes

oltre 12 anni fa | 0

| accettato

Risposto
delete zeros rows and columns
u = I; zc = ~any(u); u(:,zc) = []; zr = ~any(u,2); u(zr,:) = [];

oltre 12 anni fa | 1

| accettato

Risposto
How to convert a matrix to a Gray scale image?
M = randi(255,[1e3 1e3]); % Your Matrix image(M); colormap('gray')

oltre 12 anni fa | 0

Risposto
looking for an explicit answer to my integral
x.*(asin((x-1)./x)-sqrt(2*x-1)./x^2))

oltre 12 anni fa | 0

Carica altro