Questions tagged as 'matlab'

0
answers

Refresh variable cycle Matlab

I am currently creating a Matlab script to generate a file with the characteristics of a signal. This is the code used: clear; folder = dir('sonidos'); m = length(folder); fileW = fopen('caracteristicas.txt','wt'); for i = 3:m file = str...
asked by 14.02.2017 / 18:10
0
answers

How to obtain a phase diagram of an FFT in MATLAB?

You see, I have a vector in matlab that accumulates the voltages obtained in time. Then, this vector took out the fft and I get another vector with the values of voltage versus frequency. My question is: what command would allow me to take th...
asked by 29.09.2016 / 09:25
1
answer

Read binary files in C (fread Matlab)

In Matlab I have a binary file read like this: fid = fopen('nombrearcihvo', 'r', 'ieee-le') the contents are short floating, or 32 bits (4 bytes) and to read the first element I use the following: fread(fid, 1, 'float32') And throws me...
asked by 06.11.2017 / 18:34
1
answer

How to compare images in MATLAB?

See this image so you can understand me: link I want to focus on GETTING a 3rd more complete image starting: Image 1: focus from a left angle. Image 2: focus from a right angle. CREATE an Image 3: Result of the "fusion and union" o...
asked by 06.12.2017 / 17:18
1
answer

How would you calculate the probability of an infinite sequence of random numbers from 0 to 9

I have the following list: 6 4 8 7 6 3 6 4 6 X Could you calculate the probabilities for each number (0..9) based on a pattern or average of occurrences? Example: Our record says that after a 6 comes a 4 or a 3, and 9 events have occurre...
asked by 10.04.2017 / 17:17
0
answers

Help with the dir function in Matlab

I would like to put the name of the files that the sentence returns in an array listing = dir (' letter .wav'); for that I use the sentence listing (n) .name; which I want to put into each of the positions of an array called vec, I use the for...
asked by 23.12.2018 / 09:12
0
answers

Problem running Python program in MatLab "Undefined variable" and "or class" py.our_module.our_script.our_function "."

I have MatLab 2017b. I followed the example of the following video to the letter: link I even downloaded without altering the code provided by the author of the video in the description: link import numpy def our_function(text):...
asked by 18.12.2018 / 20:18
0
answers

How to use set (handles,.) in a GUI for MATLAB What does the error refer to as Undefined variable "handles" or class "handles.Data_a1"?

At the time of using the GUI and it does not allow me to establish the values obtained in an editable box, I also use a function to determine the value of the coefficients in the program but the data is deleted from them, as I can solve this pro...
asked by 06.12.2018 / 01:43
0
answers

Matlab Lagrange

I have a code for the Lagrange polynomial but I have an error and I do not know how to solve it. function polLagrange(xk,yk) x = min(xk)-0.5:0.1:max(xk)+0.5; n = length(xk); m = length(yk); p = zeros(1,n); for i = 1:n suma = 0; %displa...
asked by 12.11.2018 / 00:48
0
answers

How can I apply a for cycle to several columns in a matrix?

I am working with EEG signal analysis. I have built the code to apply signal filters and apply pwelch. But I have not been able to apply a for cycle so that the process is repeated from one column to another generating the results I want per col...
asked by 07.11.2018 / 00:48