Community Profile

photo

Pedro Villena


Last seen: 2 years ago Active since 2012

Mechanical Engineering,
Industrial Automation Engineering,
Aerospace Engineering.

Statistics

All
  • 5-Star Galaxy Level 2
  • Personal Best Downloads Level 1
  • First Review
  • First Submission
  • 3 Month Streak
  • Knowledgeable Level 4
  • First Answer
  • Solver

View badges

Content Feed

View by

Answered
Can't enter if statement
if round(s*1000)/1000 == 0.025, ... end

10 years ago | 0

| accepted

Answered
Can anyone please debug the error
You had made some errors: * symsum is a symbolic command for symbolic variables. symsum(x(k),k,0,9) -> sum(x) * i...

10 years ago | 0

| accepted

Answered
How can I write a function called triAreaN that computes the area of N triangles?
function A = triAreaN(B,H) if numel(B)==numel(H), A = 0.5*(B.*H); else error('B and H must be same length'); e...

10 years ago | 0

| accepted

Answered
how to create speech waves with equal loudness in matlab
I suggest you to use Microsoft Anna (Text to Speech) and save the sound in a *.wav file or *.mp3 file. Then import the sound ...

10 years ago | 0

| accepted

Answered
How do I remove background noise from a sound wave?
Create and Implement LMS Adaptive Filter to remove the filtered noise from desired signal mtlb_noisy = y; noise = n; ...

10 years ago | 4

| accepted

Answered
how can I convert a binary matrix to a linear data?
reshape(A',1,[])

11 years ago | 2

| accepted

Answered
Renaming file name with variable.
e = '20120319'; copyfile('TempFile.htm',[e '.htm']);

11 years ago | 0

| accepted

Answered
best way to store large time series data
The *EAS3* file format is used to *store floating point data in IEEE format and to exchange the files between different computer...

11 years ago | 0

| accepted

Answered
getting smaller arrays in sequence from a big array
A = randi(100,1,1000); %matrix of 1x1000 n = 100; for i=1:floor(numel(A)/n), eval(sprintf('A%d=A(%d:%d);',i,(i-1)*n+...

11 years ago | 1

| accepted

Answered
how to convert .bmp to .txt file
rgb = imread('myImageFile.bmp'); dlmwrite('myImageFile.txt',rgb);

11 years ago | 1

| accepted

Answered
Data Acquisition (Really easy question)
global dioLine ledsLine DIO = digitalio('mcc','0'); if isempty(dioLine) dioLine = addline(DIO,0:7,1,'out'); ...

11 years ago | 0

| accepted

Answered
How can I replicate this matrix
n=3; %% three times m=2; %% plus two times for the final row F2 = []; for k=1:size(F,1), F2 = [F2; repmat(F(k,...

11 years ago | 0

| accepted

Answered
How do I set a loop for ODE?
correction in your script: [t,X] = ode45(@SORODE_Z,tspan,X0,options,z);

11 years ago | 0

| accepted

Answered
Concatenate cells: making column and row headers
table(2:numel(row)+1) = row; table(2:numel(col)+1,1) = col;

11 years ago | 0

| accepted

Answered
Can somebody tell me what is wrong with the following code?
num2str(u) doc num2str

11 years ago | 0

| accepted

Answered
How do I estimate a transfer function and a bode response from sample data ?
Use an Nonparametric System Identification Theory, like *Ziegler-Nichols Method*. Ziegler-Nichols Method is a graphical techn...

11 years ago | 0

| accepted

Answered
How to save, for loop
for i=1:n, X = DATA1(i,1); %% DATA1 is an array Y = DATA2{i,1}; %% DATA2 is a cell Z(i,:) = X-Y; end save Z ...

11 years ago | 0

| accepted

Answered
How to read from one column of excel (from row 40 to 80) and can match it with the other column as well?
data = xlsread('1612_2.xls','A40:AF80');

11 years ago | 1

| accepted

Answered
Why the result of acosd (0) only 90?
*ACOSD* is a SISO function that returns only one output value for each input value (real or complex). You could see the behav...

11 years ago | 0

| accepted

Answered
Design a low pass filter for time domain data
* You need the sampling rate to design a digital filter, but if you want to design an analog filter, you don't need the sampling...

11 years ago | 0

| accepted

Answered
Command to calculate the coordinates of points
P = [X (-A-Y)]; P1 = P(1,:) P2 = P(2,:) ...

11 years ago | 0

| accepted

Answered
reshape a matrix in a special manner
A = rand(100,130); step = 10; C = cell2mat(arrayfun(@(i,j) mean(A(:,i:j),2),... 1:step:length(A)-step, 1+step:step:...

11 years ago | 0

| accepted

Answered
Replacing 5 bits in a binary value
C = dec2bin(A); D = dec2bin(B); n = 4; %% start bit position from MSB (1st bit position is 1) C(:,n:n+size(D,2)-1)=D %...

11 years ago | 0

| accepted

Answered
Microcontroller Implementation for solar power systems in Simulink
<http://www.mathworks.es/es/help/simulink/slref/sfunctionbuilder.html>

11 years ago | 0

| accepted

Answered
how to make code global
>>arrayfun(@(i) myFunction(i),1:100); *myFunction.m* function [] = myFunction(imageNumber) %RGB = imread('Image100...

11 years ago | 1

| accepted

Answered
Transfer function in Simulink different from Matlab
Gs = (1/s^2) * (1 - 2*exp(-s*0.5) + exp(-s)) Gs = 1/s^2 - (2/s^2)*exp(-s*0.5) + (1/s^2)*exp(-s) <<http://img846.imageshack...

11 years ago | 0

| accepted

Answered
finding mean in row wise
mean1 = mean(D(:,1:3),2), mean2 = mean(D(:,4:5),2), mean3 = mean(D(:,6:7),2), or D1 = [37.8518 22.2652 45.1886...

11 years ago | 0

| accepted

Answered
how to find values from text file
data = textread('lalit.txt'); r = unique(data); for i=r', c = data(data(:,1)==i,2); z(i,1) = mean([min(c) ...

11 years ago | 1

| accepted

Answered
how to write code for fft?
fs = 5000; t = 0:1/fs:1; signal = rand(size(t)); %%%% test data fft_in = reshape(signal(1:256*floor(numel(signal)/256)),2...

11 years ago | 0

| accepted

Answered
how to write this in simple m file function
myMFile.m function [S] = myMFile(a,x,K) %w = W-Wmin; w = (0:0.01:3); S = (1-exp(-a.*x.*w).*K;

11 years ago | 0

| accepted

Load more