2 answers

Matlab : Minimum of matrix

I need to find the minimum of an entire matrix and it's 'coordinates'. In a matrix like matrix = 8 7 6 5 4 3 2 1 The minimum would be 1 at (2, 4).

2 answers | 46 secs ago by Ain on Stack Overflow stackoverflow.com
1 answer

Matlab - Plotting PCA Analysis

I have a 21x5 sized matrix (top5features) containing values for 5 different feature types extracted from 21 cancer nodules. I am trying to apply principal component analysis on my data and plotting ...

1 answers | 36 mins ago by eag on Stack Overflow stackoverflow.com
0 answers

Extracting a part of a sparse matrix is extremely slow

A is a Matlab sparse matrix. Under some circumstances the following code snippet is really slow: fprintf('\nTest. ') tic A_cut = A(entry_range, entry_range); toc asize = size(A) anonzero = nnz(A) ...

1 answer

Constructing an approximate periodical function x(t) giving its Fourier series coefficient(MATLAB)?

I want to Constructing a code for periodical function x(t) for example from -5 to 5 and then plot it Fourier series coefficient is a piece wise function and the time increment is 0.01 from 0 up to 8 ...

1 answer

Matlab:Image processing, collect 3 color channel's pixel

i'm trying to addition rgb channel pixel value.It will be easy,but i'm a fresh hand in matlab. For red channel it's my code; for i=1:width for t=1:height value=y(i,t,1); red=red+value; ...

1 answer

plot a hi res compass rose in matlab

I'm trying to figure out how to plot a 1-degree resolution compass rose in matlab, that looks something similar to this: I have tried various compass and polar plots but they don't seem to allow ...

1 answers | 3 hours ago by k3it on Stack Overflow stackoverflow.com
1 answer

creating a 2D circular mesh in Matlab

I have some data on a horizontal line (x,y,data) (2991*3) with y=0. Instead of plotting the line in a Cartesian coordinate system, I would like to transform that line into a quarter circle and plot ...

0 answers

I cannot process a sequence of files in a for loop with function readtable() in matlab2014a

I am trying to use readtable() function to process text files (test1.txt, test2.txt, ...) in a for loop but after the first iteration I get the warning "Warning: Variable names were modified to make ...

5 answers

Is there a Matlab conditional IF operator that can be placed INLINE like VBA's IIF

In VBA I can do the following: A = B + IIF(C>0, C, 0) so that if C>0 I get A=B+C and C<=0 I get A=B Is there an operator or function that will let me do these conditionals inline in MATLAB ...

0 answers

video read in matlab -audio output port is not relavant

If i execute this statement or the similar videoFileWriter or even multimediafilereader in matlab 2012b videoFileReadera = vision.VideoFileReader(filename,'AudioOutputPort',true); i am getting ...

1 answer

Huge fort.# files when running gfortran

I am using gfortran for an application and running the Fortran through a Matlab mex file. I have noticed that in the current directory when I run the Fortran file, on my mac, it creates a fort.9 or ...

1 answers | 10 hours ago by AD0AE on Stack Overflow stackoverflow.com
1 answer

read matlab v7.3 file into python list of numpy arrays via h5py

I know this has been asked before but in my opinion there are still no answers that explain what is going on and don't happen to work for my case. I have a matlab v7.3 file that is structured like so, ...

1 answers | 11 hours ago by user2593236 on Stack Overflow stackoverflow.com
2 answers

3d Ring in Matlab using Patch

I am trying to make a 3d ring in a matlab. Following is something similar to what I am upto: t = linspace(0,2*pi); rin = 0.1; rout = 0.25; xin = 0.5 + rin*cos(t);% 0.5 is the center of the ring xout ...

2 answers | 11 hours ago by Umz on Stack Overflow stackoverflow.com
1 answer

Two y-axes plot for multiple data set in Matlab

I am trying to create two y-axes plot in Matlab. I have two groups of data, with each group having three plots of similar type. When I am trying to plot it, the scaling on right hand side y-axis get ...

1 answers | 11 hours ago by Dushyant Kumar on Stack Overflow stackoverflow.com
0 answers

Segmentation referring only to one of the RGB channels

I'm a beginner in MATLAB and I am doing a project for my Image Processing exam. My code has to segment different seeds from the white background. the scope is to obtain every seed in RGB 8-bit format ...

2 answers

How come matlab run slower and slower when running a program that takes long time to execute?

There is a program that my matlab runs, since there are two gigantic nested for-loop, we expect this program to run more than 10 hours. We ask matlab to print out the loop number every time when it is ...

0 answers

How to determine input sequence in c-mex s-function?

I am implementing a c-mex sfunction in simulink for accelerating the multiplication of two matrices. So far it is working, but I found out that the input ordering/sequence is depended of the naming ...

1 answer

How to find mean of struct datatype in MATLAB?

I want to find the eccentricity of an image. img = imread('47.jpg'); ecc=regionprops(img,'Eccentricity'); ecc = 255x1 struct array with fields: Eccentricity ecc(255) ...

1 answers | 12 hours ago by parie on Stack Overflow stackoverflow.com
0 answers

Invalid MEX-Files

I have compiled and run my Matlab code sucessfully in my computer, but there is something wrong when I run it on annother. The error information as following: bash-3.1# sh ...

1 answer

speed up program execution [matlab]

I want to run the following .m file in matlab: function [relativeErrors] = plotRelativeErrors() initialPrice = 115.47; sigma = 1.34*10^(-2); tau = 0; days = 40; Strike = 114; Time = days/365; ...

1 answer

Questions with integral2 , Double, Syms and Dot calucations

I got 2 questions here. 1. If I have y = a*x^2 + 5. What function can make it into y = a.*x.^2 +5. As you seen, dot was inserted. It's easy, but kinda diffcult to describe, but please have patience ...

1 answers | 14 hours ago by sunson29 on Stack Overflow stackoverflow.com
0 answers

Snake Scan Ordering

I have wrote the snake scan ordering but I don't know whether it is right or wrong! I firstly coverted the 256*256 matrix to 8*8 matrixs and did snake scan ordering in these small matrixs. Might you ...

15 hours ago by pic on Stack Overflow stackoverflow.com
1 answer

Text written with 'text' disappears when using 'plot'

I have a list of points, each of which has an index. I am trying to draw a circle around some of them and write the point index beside it as shown in the code below. The problem is, text function ...

1 answers | 15 hours ago by Misaki on Stack Overflow stackoverflow.com
1 answer

How to add noise signal to a sinusoidal signal with a specified ratio of dB in Matlab?

I want to add a noise signal to a signal which is a combination of three sinusoidal signals with different amplitude, frequency and phase. How to add this noise signal to the sinusoidal signal so that ...

1 answers | 16 hours ago by joshua on Stack Overflow stackoverflow.com
1 answer

Reshaping the mean Matlab

This may be easy. I've got a variable that's (16x155). When I take the mean of that variable, it becomes (1x155). What I need it to be is (1x16). How do I do this? Appreciate any tips!!

1 answers | 18 hours ago by Laura on Stack Overflow stackoverflow.com
5 answers

How to show histogram of RGB image in Matlab?

I read an image in matlab using input = imread ('sample.jpeg'); Then I do imhist(input); It gives this error: ??? Error using ==> iptcheckinput Function IMHIST expected its first input, I ...

5 answers | 20 hours ago by E_learner on Stack Overflow stackoverflow.com
0 answers

matlab ode 45 - locating an event very close to the initial conditions

I have a problem with matlab's events location function. I want to find all the zeros of the velocity of my function, and stop the integration at every zero founded. I used an events function, setting ...

1 answer

when accessing teacher(1,2) why it doesn't execute both names khan and taj?

The MATLAB code teacher(1)=struct('FirstName','Sohaib','LastName','Khan'); teacher(2)=struct( 'FirstName','Murtaza','LastName','Taj'); ...

1 answers | 21 hours ago by Adnan Ahmad on Stack Overflow stackoverflow.com
2 answers

Find accuracy of neural network application result

I couldn't find anything useful about accuracy of results in neural network, I run character recognition example in Matlab, after network training and simulation by input test, how can I compute ...

2 answers

Matrix multiplication computation time in MATLAB

In Linear Algebra by David Lay, he asks which of the two matrix computation way is faster: A*(A*x) OR (A*A)*x Where A is an nxn matrix and x is nx1 vector (matrix product is well defined.) I made ...

2 answers | yesterday by user3100754 on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3