Answered
Creating a Matrix that is a manipulation of another matrix
There are lots of ways how about element by element multiplication like: x = magic(4) trans = [ones(4,2) -ones(4,2)] ...

nästan 7 år ago | 0

Answered
Averaging multiple cells element by element
% my code to create dummy data x = randi(10,5,7); npsoutOrgN = mat2cell(x,5,ones(1,7)); %put all into an array %np...

nästan 7 år ago | 0

Answered
How to show with a line/arrow the center/one/two standard deviation of the normal distribution plot?
would something like this work? x = .03*randn(10000,1)+.34; [N,X] = hist(x,100); hfig = figure; bar(X,N) hold o...

nästan 7 år ago | 0

Answered
Sorting an array using Loops
Was there an issue with how Cedric edited your code because i do not see how the function is able to get max1 as 5000. specific...

nästan 7 år ago | 0

Answered
Why isn't three divided by two 1.5?
because it's rounding due to your setting x and y as integers and not double or single precision.

nästan 7 år ago | 2

Answered
Compare values in a table to a set of criteria
matlab does not do conditionals like that. you'll need to use the logical operands to accomplish this. so if it isn't a ce...

nästan 7 år ago | 1

Answered
How do I write a for loop for multiple situations?
You do not need loops to determine the N-of a kind. If you follow the assignment you should be looking at the sorted array and ...

nästan 7 år ago | 0

| accepted

Answered
How to do this in GUI ?
so the behavior of the pushbutton_callback() function is to run when the push button is pressed. so you are 99% there. get rid...

nästan 7 år ago | 1

| accepted

Answered
matlab simplification of code
There is no need to perform the for loop and this problem can be solved through matrix arithmetic. to simplify it lets say ...

ungefär 7 år ago | 1

Answered
How to define a function
check the documentation on functions <http://www.mathworks.com/help/matlab/ref/function.html>. after that it'll look something ...

ungefär 7 år ago | 0

Answered
using publish with a function rather than script
yes it can. follow my example: so i started a function called plotme() function plotme(A,B) figure,plot(A,B) then ...

ungefär 7 år ago | 2

Answered
Sliding neighborhood - how to vectorize?
why not use conv2? signalInBlock2 = zeros(230, 230); tic temp = conv2(noised,ones(32,32),'valid'); signalIn...

ungefär 7 år ago | 0

| accepted

Answered
cycling through both linestyle and linecolor
To answer the last question you can write your own plot function as i have below: function hplot = cblindtest(pnts) hplo...

ungefär 7 år ago | 1

Answered
How to change the color and remove values from wind rose?
I think i understand what you're trying to accomplish so you can try something like the example below: %generate some dum...

ungefär 7 år ago | 0

| accepted

Answered
List toolboxes currently in use by session
license('inuse') will show the toolboxes checked out

ungefär 7 år ago | 2

Answered
What can I use as a Plus or Minus sign?
s=(-800/(2*.1))+[1 -1]*(sqrt(((800/(.1*2))^2)-(1/(.1*.000001))))

ungefär 7 år ago | 1

| accepted

Answered
Time series code not quite right, thoughts?
are you looking to something more like this? T=10000; %why generate e it 4 times when randn can generate it for you e...

ungefär 7 år ago | 0

Answered
Why does char give me an empty output?
char() converts the values into the 7-bit ASCII characters. use num2str() or the other equivalent functions to convert numbers ...

ungefär 7 år ago | 1

Answered
How to use dlmwrite in a for loop?
matlab is not going to fill in the %d number for you. you should be using something like sprintf to a variable to generate the f...

ungefär 7 år ago | 0

| accepted

Answered
How can I plot distribution with shades?
you'd do something like this where you would use fill to generate the ranges of the distribution t = 0:.1:10; x = 2*t.^...

ungefär 7 år ago | 0

Answered
Plotyy making extra lines
Main reason is because you're concatenating the two arrays [x x] and [y2 y3] as they are 1xN each so in the code you're just plo...

ungefär 7 år ago | 0

| accepted

Answered
GUI issue : How to show two images in two axes based on two list boxes
I do not think i understand the problem clearly but first thing comes to mind is that axes do not have a 'string' property. ...

ungefär 7 år ago | 0

Answered
Drawing line between elements with same values in a 2D matrix
clf A = [1 2 3 4 5 6;1 3 5 4 6 9;4 1 3 8 7 5]; y = 2:0.1:2.2; x = 8:13; [X Y] = meshgrid(x,y); [oI]= find(A==1)...

ungefär 7 år ago | 0

Answered
How to plot three Y-axes with same X-axis in matlab
Easiest solution is to browse the file exchange. a quick search provided me with <http://www.mathworks.com/matlabcentral/fileex...

ungefär 7 år ago | 0

Answered
How can I find this six digit number?
Where are you getting stuck? This is a simple linear algebra question (Ax=B) hint use mldivide() or the shortcut \. You have 6...

ungefär 7 år ago | 1

Answered
how you could adjust this script to guarantee that there is at least one letter and at least one digit?
generate a alpha numeric template like: N=20 minreq = 0; while ~minreq alphanum = randi(2,1,N) minreq =...

ungefär 7 år ago | 0

Answered
Controling my GUI with just two keys..(for disable people)
I'm not familiar with the original software that Stephen Hawking used but a simple solution is a function that looks at the time...

ungefär 7 år ago | 0

Answered
How to show total execution time using MATLAB GUI
you can try something like this: function matlabanswersexample() figure hstring = uicontrol('style','text','unit','...

ungefär 7 år ago | 0

Answered
how to add a waitbar in while...end loop?
Depending on what your while condition is. If you are approximating maybe something like this (which converges a bit too fast t...

ungefär 7 år ago | 1

Load more