Answered
How to draw a ellipses with known foci?
To start your question you can do something like this where you setup your knowns. Here i don't know anything about your image ...

11 years ago | 0

Answered
Autozoom in a subplot
you can use the linkaxes() to do just that. ax(1) = subplot(2,2,1); plot(rand(1,10)*10,'Parent',ax(1)); ax(...

11 years ago | 1

| accepted

Answered
For-Loop Midpoint Help
since you want it to do both +50 and -50 you can't have the if/else structured that way. you'll have to do break it up. if you...

11 years ago | 1

| accepted

Answered
How do you make multiple variable assignments from s struct?
I completely understand trying to have readability for an equation. However instead, put a nice commented note in before or aft...

11 years ago | 0

Answered
Efficient Code for Filling Rows of an Array involving Indices Ranges
so... it is certainly a brain teaser to do this without a loop. so far i'm up to this. A=zeros(3,4); B = [1 3;2 4;1 1];...

11 years ago | 0

Answered
How to workaround the plotyy copyobj error?
This is a bit lengthy but you can try something like this where you save the data in userdata if the original data is nolonger a...

11 years ago | 0

| accepted

Answered
Decimal to Binary Vector
Have you tried the <http://www.mathworks.com/help/matlab/ref/dec2bin.html?searchHighlight=dec2bin dec2bin()> function built into...

11 years ago | 0

Answered
How can i edit to an uitable's cell with only one click ;;;
You can try to do something like this function Untitled() f = figure data = rand(3); colnames = {'X-Data', 'Y-Data...

11 years ago | 1

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

11 years ago

Answered
How can I subtract columns for each row by using a for loop
you can use combnk() or nchoosek to determine the combination of column subtraction and perform a for loop for each combination....

11 years ago | 1

Answered
how to plot points in different colors based on class?
you can find which indexes have either class and plot accordingly. x1 = rand(10,1); x2= rand(10,1); class = (-1).^ran...

11 years ago | 1

Answered
When using the import tool to import data from an excel file, how do I convert the spreadsheet dates to datenumbers?
you'll have to have the rules for the "unimportable Cells" portion to have: * Convert Spreadsheet dates to datenum * exclude...

11 years ago | 0

Answered
set function doesn't work
What you can do is this. hfig = figure; % set(hfig,'KeyPressFcn',@(hobject,event) set(hobject,'UserData',event)) ...

11 years ago | 0

| accepted

Answered
How to automatically change the number of digits to the right of the decimal point in the fprintf function
If i understand your question correctly make the '%f' statement a string variable outside of the fprintf() command that us used ...

11 years ago | 0

Answered
How to convert the present data into another format?
to expand on Roger's answer you you can build the structure like this a = randi(10,1,351); b = randi(10,1,351); c...

11 years ago | 2

Answered
Help with loading in a GUI
Since you already have a file name called lets say 'data_001.dat' and the folder path from the first file store those in handles...

11 years ago | 0

| accepted

Answered
multiple scatter plots with different sizes
Use the hold functionality and plot them as you will do normally for a plot. example: x = linspace(0,3*pi,200); rng...

11 years ago | 0

| accepted

Answered
how to plot a 10*10 grid map and how to number the grid cells? (sample pic is attached here)
you can use the text() to insert the grid labeling. here is an example. this is for labeling 1x1 pixels but it is scalable for...

11 years ago | 1

Answered
I want to open a dialog box for typing notes while my program is running. Then save those notes to a file.
Here is a simple code that you can adapt. if you want to try to run this create a GUIDE project that has only a button and an a...

11 years ago | 0

Answered
matrix with different randperm rows
Well there is a randperm() function that will give you a random permuation. How to get it as a MxN matrix without a loop will t...

11 years ago | 0

Answered
data=get(handles.uitableName,'Data') If we do this, it extract all the data from table.Is there any way that i can extract selected data (highlighted) only?
with a combination of the data you extracted and table = findjobj(handles.uitable1); row = table.getComponent(0).getCom...

11 years ago | 0

Answered
saving plot figures without opening
The saveas, from what i can understand, does a screen capture but since the figure is invisible there isn't anything there. try...

11 years ago | 0

Answered
Function for opposite of isnan?
you would go ~isnan() to reverse the 1's to zeros and zeros to be 1.

11 years ago | 4

| accepted

Answered
Combine 2 Structures / have a nice weekend
you can go OldInputData = [OldInputdata InputData] only if they contain the same structures inside. Since you're just c...

11 years ago | 0

| accepted

Answered
Matlab matrix operations without loops
you can get rid of the second for loop; tic for h=1:r dist1(h,:)= sum((repmat(data(h,:),rP,1) - pb).^2,2)...

11 years ago | 0

| accepted

Answered
Calculate and crop image based on coordinates
the documentation on imcrop (correct function name) should tell you if it is correct, but i think it looks to be correct. I...

11 years ago | 0

Answered
Need suggestion for the right plot
how does the data of krefsim and lsqlinnonlinsim compare? are they completely meshed together such that a surf of the data woul...

11 years ago | 0

Answered
how to increase the number of values displayed on the X-axis matlab
you'll have to do something like this after you create the subplot. newLim = get(gca,'XLim'); newx = linspace(newLim(...

11 years ago | 1

Answered
define multiplication by zero for Inf
create a function called mymult(A,B) or myprod(A,B) that checks for inf and corresponding zero. then make that result index 0. ...

11 years ago | 1

Answered
xlsread and password protected Excel files
you would have to use activeX. Since getting data from excel using activeX is documented fairly well i'll leave here how to ope...

11 years ago | 0

Load more