Most voted "matlab" questions
MATLAB (Matrix Laboratory) is a high performance interactive software for numerical calculation.
Learn more…123 questions
Sort by count of
-
15
votes1
answer780
viewsMusical similarity from MPEG-7 descriptor patterns
I am doing research in the area of musical similarity for music recommendation and created a test database with 1,000 songs. I would like to create a playlist with 10 songs similar to a song chosen…
-
15
votes1
answer1287
viewsHow to generate sound in Matlab from a wave?
If I create a sine wave: x=0:0.1:6*pi; is the range of the wave y=sin(x); is the wave with amplitude 1 f=440; is the desired frequency How to generate a sound from this data? I tried to sound(y, f),…
-
11
votes1
answer2490
viewsPattern recognition
I have hundreds of digital images of dogs and cats, I need to make an algorithm to recognize when the dog is and when the cat is. What steps should I take?
-
5
votes1
answer523
viewsNewton Fractal, roots of equation z 4=1
I’m trying to plot a graph of an image called Newton Fractal: Follows model: The problem is to plot the roots of the equation z^4 = 1, where it has 4 roots being (-1, 1, i and -i), where to find the…
matlabasked 9 years ago Alan Nascimento 113 -
5
votes1
answer239
viewsProblem with file reading . WAV
Hi, I’m trying to read a file. 5s wav filled with "silence" to test the code in C. I was able to read the header but while trying to extract the date field where it contains the content itself (…
-
4
votes2
answers3369
viewsHow to do Multiple Linear Regression?
-- Rephrased question -- I have the following code mdl = LinearModel.fit(X_train,y_train); pred = predict(mdl,X_test); in which X_train is a matrix [m x n] with m examples and n Features (past time…
-
4
votes1
answer117
viewsResize a vector in Matlab
Good afternoon. Here’s the following, I used the following function to create an empty array that later stores certain values requested from the user: fragil = zeros(1, 10); %criaçao do vetor idF =…
-
3
votes2
answers1841
viewsHow to forecast values of a variable?
Long live. I don’t know much or anything about predicting values. My problem is knowing how to predict future values of a certain variable based on a set of previously annotated values ... Know…
-
3
votes1
answer118
viewsHow do I save matrices on hard drive?
How do I save matrices created in MATLAB to the hard disk?
matlabasked 10 years, 1 month ago Moallison. 51 -
3
votes1
answer5456
viewsHow to open a . txt file in Matlab that has many elements?
When the matrix has few elements the dlmread command fucks but in the case of a high-order matrix does not. I would like to have access to the matrix columns.
-
3
votes1
answer790
viewsHow to change time, read and chart in MATLAB?
I am a meteorological student and analyze data from micrometeorological towers. On each line of my file, .csv has tower code, year, day and minute hour. 110,2015,005,2359 1º I would like to know how…
-
3
votes0
answers99
viewsHow do I run Fortran from Matlab?
I need to run a Fortran file from Matlab. Which is the best compiler when using windows What are the steps to create an executable file. Thanks for your help,…
-
3
votes0
answers35
viewsThe Handle function is not converting - Matlab
Hello, I’m getting this mistake: Conversion to function_handle from double is not possible. I have already searched for the bug and tried to change the code but without success. Could you give a…
-
3
votes1
answer678
viewsHow to assign values to a vector?
I want to create an array in Matlab that takes 5 values from the 'tot' variable'. In my program I have a tot variable that gets 1/2 tot=1/2; I want the vector called 'xi' at first position to…
-
3
votes1
answer648
viewsStore values with the "for" command
My doubt: How can I save the values of the 'for' command for objects that have an area greater than 50? I need to store the numbers of these objects because later I will calculate the distance…
matlabasked 7 years, 4 months ago Bruno Falcon 31 -
3
votes1
answer81
viewsDoes Matlab enable interactive (real-time) data export?
Good afternoon, I am using Matlab in order to receive real-time HTML data to generate graphs that are constantly updated, but I still haven’t found anywhere how I could export these graphs to other…
-
3
votes3
answers183
viewsif and logical connectives
I need to find the fewer number and the second to smallest number of five typed numbers. But this strange fact is happening: #Subtrair o menor numero encontrado do numero digitado dif1 = n1 - menor…
-
2
votes2
answers304
viewshow to terminate program in windows from Matlab?
Is there any way to terminate a program in windows from a command in Matlab? Possibly using a batch... but I don’t know the commands to manage programs in windows or how to run it from Matlab. I can…
-
2
votes1
answer1273
viewsHow to read a spreadsheet with date and time in Matlab?
How do I import data from an excel spreadsheet that contains date and time (e.g.: 10/22:45:10) in Matlab?
-
2
votes2
answers144
viewsMatlabfunction() similar to MATLAB in R
There is a function similar to matlabFunction() MATLAB? Or how to do this in R? The function in MATLAB. syms x dados = inputdlg({'P(x): ', 'Q(x): ', 'R(x): ', 'N: '},'Dados'); P =…
-
2
votes2
answers935
viewsHow to forecast future values of a time series?
I have values of a time series with a sampling every 5 minutes. How can I predict future values using only this information? How can I model something over a period of time and use it to predict the…
-
2
votes1
answer2434
viewsMerge a Plot and image into Matlab
I’m conducting a medical imaging work that aims to isolate the area of the lungs and place an outline. I isolated the area corresponding to the lungs and created a Plot with the contours. My…
-
2
votes2
answers12986
viewshow to import data in excel format to Matlab
I want to import data from excel to Matlab, I’ve tried with importdata but there is some thing that doesn’t add up. I see «Nan» instead of numbers in the matrix
matlabasked 9 years, 6 months ago Sandy Margarida Santos 21 -
2
votes1
answer4594
viewsHow to create a table in MATLAB?
I’m doing a job I want to create the following table: I have tried several commands like table and readtable and always returns me the following message : Undefined function 'readtable' for input…
-
2
votes1
answer340
viewsMatlab to R translation with system(sprintf())
I am trying to translate the following Matlab code to R: clear all nsta = [1,2,3]; npx = [2,3,4,5]; npu = [2,3,4,5]; nmax = 2500; nome = 'MODEL1b'; system(sprintf('del %s.log',nome)); nfiles = 0;…
-
2
votes2
answers62
viewsMATLAB - Data is lost when closing the FOR loop
I’m having trouble with a loop loop that counts the white pixels of a piece of an image and stores the position x and y of the piece and the total of white pixels. When printing the values within…
-
2
votes2
answers3737
viewsSave txt file to Matlab
Good, I have a program that runs in loop and I need to save the results of each loop. Within the loop i call several functions and in each function I need to save the results. I have used in every…
matlabasked 6 years, 7 months ago Juliano Cardoso 21 -
2
votes2
answers255
viewsPossibility challenge in c,c++ or Matlab
I’m in need of a program that gives me the possibilities of the following equation: x*y = 1700/57 Whereas x and y are positive reals resulting from two integers ("a" and "b") different from 1 to…
-
2
votes1
answer159
viewsDistributing points evenly in a circle
I started to make a code to randomly distribute points evenly in a circle, but by generating a point located with a random theta angle between 0 and 2π and with a distance from the center of the…
-
2
votes0
answers88
viewsNeural networks: how to adjust a line in the predicted values
I don’t know much about this world of artificial intelligence, but I have a data set that tends to be a linear function, and one thing I needed was to find the angular coefficient of the line that…
-
2
votes1
answer90
viewsHow to make a generic implementation of the Bisection method in MATLAB?
Good night, I’m having the following problem: The code developed in Matlab to calculate roots of the equation using bisection method is bugging, perhaps in the calculation process (loops); The idea…
-
1
votes1
answer254
viewsSVM Stats from MATLAB gives test error
The following MATLAB code trains a binary classifier of MATLAB given a set of vectors and tests another set of vectors in this classifier: %Número mínimo de iterações optSVM = statset('MaxIter',…
-
1
votes1
answer434
viewsMount an RGB matrix that is equivalent to a Grayscale with an altered color
I have a matrix in Matlab of one dimension or Grayscale, but I would like to create an equivalent in RGB in which all this black, i.e. all zero is a shade of green. And that all other colors white…
-
1
votes1
answer625
viewsCenter a Plot on top of an image in Matlab
I’m crowding over an image, however with the code below the Plot happens at the beginning of the image at 0.0. I would like it to be done from the centre of the image in question. Excerpt from the…
-
1
votes1
answer2979
viewsGenerate animation from graph
I am generating a graph with the following command: X = linspace(0, 1, n); Y = linspace(0, 1, n); surf(X,Y,B(:,:)); But how to make it generate an animation of the graphic? I know nothing of…
matlabasked 10 years, 5 months ago Gabriel Duarte 565 -
1
votes1
answer223
viewsHow do I find the unique values of a matrix?
How do I find the unique values of a matrix in MATLAB?
matlabasked 10 years, 1 month ago Moallison. 51 -
1
votes1
answer1108
viewsHow to create color palette in MATLAB?
How do I make a color palette in MATLAB? I just want the palette, as in the image, and not graphics or things like that....…
-
1
votes1
answer224
viewsProgramming in MATLAB
I have a simulation ready in MATLAB and every time I run I need to save the result. What command do I use to save each result separately and then join them together and see which curve fits these…
matlabasked 9 years, 8 months ago Moallison. 11 -
1
votes0
answers50
viewsDrying method and bvp
Is asked to resolve m* d 2 y/dt=-g-gamma*dy/dt such that y(20)=0, with the initial conditions I’ve already put in the code. What is wrong? %3. [value,x0,numIter] = f_secante(@find0_p3,0, 1, 0.0001,…
-
1
votes0
answers290
views3D reconstruction MATLAB
I am developing my TFG with Matlab where from a figure in Upper Image 20X20 and a figure Lower tbm 20x20 I get the possible kernel in other N central images. However to present the result I need to…
-
1
votes0
answers889
viewsHow to calculate r Squared (r 2) with the test examples?
I broke my dice into one set for training and another for testing. I would like to know if I can calculate the value of r 2 for the set of test examples. I created two models: one model with SVR and…
-
1
votes0
answers205
viewsGenetic Algorithms in Matlab
I need to optimize 30 functions in Matlab using Genetic Algorithms. The initial data are: Dimensão=10 Rodadas = 51 Número Máximo de avaliações(MaxFES)= Dimensão*10000 Espaço de Busca=[-100,100]…
-
1
votes0
answers37
viewsEdge Detection of a frame
I have a video, and I need for each frame do edge Detection (prewitt), because I only need the contours of my area of interest. After doing the edge Detection of each frame, I need to measure the…
-
1
votes0
answers307
viewsHow to normalize multiple images in Matlab
I have a set of 1000 randomly generated images through the Gaussian noise, as I would to normalize them (same standard deviation and same average for all images). THANK YOU!!
-
1
votes0
answers189
viewsStereo Vision in Matlab
Hello! I’m trying to run a matlab algorithm that uses only matlab functions. The program should initially calibrate the cameras, extract their parameters and generate a disparity map through two…
-
1
votes1
answer1834
viewsAdd elements to an array in Matlab
Basically, I need to enter a single for, add elements to an array or list (I don’t know if it’s in the language) and then divide the values by the amount of interactions. Very simple, if it were in…
matlabasked 9 years ago AbnoanMuniz 181 -
1
votes1
answer113
viewsGenerate struct in dynamically Matlab, with different size fields
I have a demand that is the following, I want to create a set of images and I will relate them, for that I create a struct vector similar to resultsInfo =…
matlabasked 9 years ago Daniel Magalhães Bicalho 31 -
1
votes0
answers147
viewsUpdate variable value with slider in MATLAB
I have a struct file: x.head=imread('Brain.jpg'); Whos x I have a slider: G3.slide = uicontrol('style','slide',... 'unit','pix',... 'position',[400 280 120 30],... 'min',-10,'max',10,'val',1,...…
-
1
votes1
answer2394
viewsHow to use the "print" command to show string variables together with integers in MATLAB?
I am doing an exercise in MATLAB, but I always come across an error about function syntax print, he says I can’t put strings and integers together to be shown, but I’ve seen similar examples Follows…
matlabasked 8 years, 4 months ago Eduardo Silva 113 -
1
votes1
answer758
viewsHow to make an average of a curve?
I’m taking a temperature curve with an LM35 but I can’t get an average of the temperature curve to perform my calculations. Follow a picture of my curve:…