Answered

i got index exceeds matrix dimensions.??

You should put a breakpoint at that line and then check the dimensions of the curs variable. without running your code and with...

i got index exceeds matrix dimensions.??

You should put a breakpoint at that line and then check the dimensions of the curs variable. without running your code and with...

10 months ago | 0

| accepted

Answered

Replotting Data vs. Storing Plots/Images

I think the answer would be dependent on how many points are in each line and the size of the images you're going to be pulling ...

Replotting Data vs. Storing Plots/Images

I think the answer would be dependent on how many points are in each line and the size of the images you're going to be pulling ...

2 years ago | 0

Answered

How to create a checkerboard matrix without inbuilt function.

There are much easier ways to do this than nested for loops, reshape is readily available. if you *must* do it with for loops y...

How to create a checkerboard matrix without inbuilt function.

There are much easier ways to do this than nested for loops, reshape is readily available. if you *must* do it with for loops y...

2 years ago | 0

| accepted

Answered

does someone know if it's possible to have popupmenu in inputdlg?

Absolutely you can, however its not as straight forward as inputdlg() or questdlg(). you'll want to look at the example here: ...

does someone know if it's possible to have popupmenu in inputdlg?

Absolutely you can, however its not as straight forward as inputdlg() or questdlg(). you'll want to look at the example here: ...

2 years ago | 0

| accepted

Answered

How can I change the LSBs of consecutive elements of an array?

you could use bitand() a = [23, 255, 67, 89, 45, 90, 34, 12]'; n=3; b = bitand(a ,255-n,'uint8') disp(dec2bin(a)) di...

How can I change the LSBs of consecutive elements of an array?

you could use bitand() a = [23, 255, 67, 89, 45, 90, 34, 12]'; n=3; b = bitand(a ,255-n,'uint8') disp(dec2bin(a)) di...

2 years ago | 0

Answered

import multiple spreadsheats at once (.xlsx files)

well first you'll want to get away from generating variables in that fashion as you'll basically have A400 or more which is hard...

import multiple spreadsheats at once (.xlsx files)

well first you'll want to get away from generating variables in that fashion as you'll basically have A400 or more which is hard...

2 years ago | 0

Answered

Looking for a word in a 2D array

I would take a look at the function strfind(), and lower() or upper(). strfind() will return the starting index value of the ...

Looking for a word in a 2D array

I would take a look at the function strfind(), and lower() or upper(). strfind() will return the starting index value of the ...

2 years ago | 0

Answered

Project 3D points to a surface

you could try something like this. my curve and fit method is probably different however what you can do is use find() to deter...

Project 3D points to a surface

you could try something like this. my curve and fit method is probably different however what you can do is use find() to deter...

2 years ago | 1

Answered

Can I match data from several find functions?

what you should do is get rid of the find() for each parameter filter. keep it as a logical and then you can directly use the l...

Can I match data from several find functions?

what you should do is get rid of the find() for each parameter filter. keep it as a logical and then you can directly use the l...

2 years ago | 0

| accepted

Answered

How to average plots that differ in x and y data?

you can do something like x1 = 0:.01:4; x2 = 0:.03:5; x3 = 0:.02:6; y1 = sin(3*pi*x1); y2 = sin(3*pi*x...

How to average plots that differ in x and y data?

you can do something like x1 = 0:.01:4; x2 = 0:.03:5; x3 = 0:.02:6; y1 = sin(3*pi*x1); y2 = sin(3*pi*x...

2 years ago | 0

Answered

How to get the central data of a matrix?

you'd use the parameter 'same' in the convolution function x = [0 1 2 3 4 5 4 3 2 1 0] conv(x,[0 1 0],'same') otherwise ...

How to get the central data of a matrix?

you'd use the parameter 'same' in the convolution function x = [0 1 2 3 4 5 4 3 2 1 0] conv(x,[0 1 0],'same') otherwise ...

2 years ago | 0

| accepted

Answered

Change axes limits interactively

you can try something like this, which really depends on how you want the user to input the different limits function uiexa...

Change axes limits interactively

you can try something like this, which really depends on how you want the user to input the different limits function uiexa...

2 years ago | 1

| accepted

Answered

error using randi: size inputs must be scalar

you actually want to do for n=1:4 a{n}= randi(10,n)-1; b{n}= randi(10,n)-1; fprintf('n = %d:\n', n)...

error using randi: size inputs must be scalar

you actually want to do for n=1:4 a{n}= randi(10,n)-1; b{n}= randi(10,n)-1; fprintf('n = %d:\n', n)...

2 years ago | 0

Answered

How can I plot mean +/- 1 standard deviation for every data point in my dataset ?

have you looked up the function errorbar()? it should get you what you'll need

How can I plot mean +/- 1 standard deviation for every data point in my dataset ?

have you looked up the function errorbar()? it should get you what you'll need

2 years ago | 0

Answered

searching through RNA sequence for a string of characters

so, do you store the full compliment data in an array such that you can %gen dummy data comp = 'AGCT'; list = comp(ran...

searching through RNA sequence for a string of characters

so, do you store the full compliment data in an array such that you can %gen dummy data comp = 'AGCT'; list = comp(ran...

2 years ago | 0

Answered

Outputting gyroscope data to array

you're overwriting it with the p(n) as n only goes from 1 to 10 again and again. you'll have to increment p(#) beyond n or mult...

Outputting gyroscope data to array

you're overwriting it with the p(n) as n only goes from 1 to 10 again and again. you'll have to increment p(#) beyond n or mult...

2 years ago | 0

Answered

how to plot normalized column vs another colomn

must be missing something as you have it right there plot("your other column",i./max(i),'.') then you'd fit a line and e...

how to plot normalized column vs another colomn

must be missing something as you have it right there plot("your other column",i./max(i),'.') then you'd fit a line and e...

2 years ago | 0

Answered

How do I create an animation with a coloured sphere changing in time? (for climate modelling)

you can do something like this [x,y,z] = sphere(30); [sx sy]=meshgrid(-1:.01:1,-1:.01:1); I=3*sin(2*pi*2*sx)+cos(2*pi...

How do I create an animation with a coloured sphere changing in time? (for climate modelling)

you can do something like this [x,y,z] = sphere(30); [sx sy]=meshgrid(-1:.01:1,-1:.01:1); I=3*sin(2*pi*2*sx)+cos(2*pi...

2 years ago | 0

Answered

How to upload an image to a GUI frame?

so i take it you have an axes frame that you've tagged as imagedisplay. i'm curious why with said function you don't get warnin...

How to upload an image to a GUI frame?

so i take it you have an axes frame that you've tagged as imagedisplay. i'm curious why with said function you don't get warnin...

2 years ago | 0

Answered

Repeating If statement after variable change

not sure what you mean by repeat first with SS(1)==# as it wouldn't do the first if statement but the lower elseif statement. i...

Repeating If statement after variable change

not sure what you mean by repeat first with SS(1)==# as it wouldn't do the first if statement but the lower elseif statement. i...

2 years ago | 0

| accepted

Answered

How do I piece together a 2-dim image using 3 given images, each representing R, G, B?

you should be using cat(3,red,green,blue) because you want to stack in the 3rd dimension. x = randi(3,3,3) x = ...

How do I piece together a 2-dim image using 3 given images, each representing R, G, B?

you should be using cat(3,red,green,blue) because you want to stack in the 3rd dimension. x = randi(3,3,3) x = ...

2 years ago | 0

| accepted

Answered

Legend for a graph displaying multiple runs

you can look into specifying which points/lines are plotted in the legend() help documentation. I made a quick example that y...

Legend for a graph displaying multiple runs

you can look into specifying which points/lines are plotted in the legend() help documentation. I made a quick example that y...

2 years ago | 1

| accepted

Answered

I need to create a 3 by 3 window and calculate mean within the window. This window is to move through the image. How can I do it?

I would take a look at the conv() and conv2() function. you would use something like [1 1 1;1 1 1;1 1 1]/9 to get mean. and the...

I need to create a 3 by 3 window and calculate mean within the window. This window is to move through the image. How can I do it?

I would take a look at the conv() and conv2() function. you would use something like [1 1 1;1 1 1;1 1 1]/9 to get mean. and the...

2 years ago | 0

Answered

How to make a 2D graph from text file

I can point out a few things. # if you look at M isn't that what you're trying to plot with A? as it should include both c...

How to make a 2D graph from text file

I can point out a few things. # if you look at M isn't that what you're trying to plot with A? as it should include both c...

2 years ago | 0

Answered

how to replace values of a matrix, if another matrix meet certain conditions?

i may be over simplifying it but doesn't the greater than (>) inequality just do it? A=magic(5) B=A>18

how to replace values of a matrix, if another matrix meet certain conditions?

i may be over simplifying it but doesn't the greater than (>) inequality just do it? A=magic(5) B=A>18

2 years ago | 1

Answered

Pulse train with duty cycle variable.

why not try something like this: t=0:per/1000:per-per/1000; %define period normal = zeros(1,numel(t)); normal(t<per*dut...

Pulse train with duty cycle variable.

why not try something like this: t=0:per/1000:per-per/1000; %define period normal = zeros(1,numel(t)); normal(t<per*dut...

2 years ago | 0

Answered

Is there a way to remove the nested for loops from this segment of code? I'm trying to make the code generic so it can take in n-number of moment arrays.

to make it more generic you could do something like momentind = [1 1 1 1 1 1] cind = 1; while momentind(end)~=3;...

Is there a way to remove the nested for loops from this segment of code? I'm trying to make the code generic so it can take in n-number of moment arrays.

to make it more generic you could do something like momentind = [1 1 1 1 1 1] cind = 1; while momentind(end)~=3;...

2 years ago | 0

Answered

save snapshot image in a variable within a loop!!

from what i see get snapshot returns a NxMx(1 for mono 3 for color) and you're trying to stuff it into a 1x1. what you should t...

save snapshot image in a variable within a loop!!

from what i see get snapshot returns a NxMx(1 for mono 3 for color) and you're trying to stuff it into a 1x1. what you should t...

2 years ago | 0

Answered

Reading within parentheses in MATLAB

since you've got the right idea and cellfun() is troublesome and sometimes confusing, i've coded it for you here: dumdata...

Reading within parentheses in MATLAB

since you've got the right idea and cellfun() is troublesome and sometimes confusing, i've coded it for you here: dumdata...

2 years ago | 0

Answered

problem in for loop for plotting

do you mean you're missing the first spectrum because you put the figure after the first instance of subplot? you should move f...

problem in for loop for plotting

do you mean you're missing the first spectrum because you put the figure after the first instance of subplot? you should move f...

2 years ago | 0

| accepted