Questions tagged as 'matlab'

1
answer

MatLab's non-return function

I need to make a function in matlab where it will not have any variables as return, only parameters, is it possible?     
asked by 07.03.2018 / 01:51
1
answer

Straight brackets (brackets) wrong?

I have this function in Matlab cn = reshape(repmat(sn, n_rep, 1), 1,[]); In Python I have the following code: import numpy as np from numpy.random import randint M=2 N=2*10**8 ### valor de Dados n_rep = 3 ## numero de repetições sn = ran...
asked by 07.10.2017 / 00:27
1
answer

trapeze rule in matlab!

Good evening. Could someone help me? I need to create a function in matlab that solves integrals by the "Compound Trapezoid Rule". I know how the "Trapeze Rule" works, but how to do the implementation in matlab?     
asked by 08.11.2017 / 01:10
1
answer

MATLAB image processing

How to convert a grayscale image to a color image (rgb)? img=im2double(imread('37_M.jpg')); figure(1), imshow(img,[]), title('original'); t=imgaussfilt3(img,0.2); figure(2), imshow(t,[]), title('original filtro'); img2=rgb2gray(t); figure(3),...
asked by 31.05.2016 / 21:23
2
answers

How to use function return in Scilab or MatLab?

I'm doing a simple numerical program. But I can not use return of functions in Scilab can anyone help me? The function has to solve a calculation and then return the value for this variable to continue to be manipulated by the program....
asked by 11.06.2015 / 13:03
1
answer

Calculation of moving average in MATLAB

How to calculate the average of 12 months of a time series in MATLAB, so that, by setting the year of January to ten the year you want the average, the month of jan in year x is the average of Jan to ten in year x -1, the month of fev of the yea...
asked by 25.09.2014 / 20:48
1
answer

Create a scan window in MATLAB

I am trying to create in matlab a script that makes a sub-array (3x3 search window) go through a larger array looking for minimum values for each 3x3 cell portion that is parsed. When the script finds this minimum value cell, it places it as the...
asked by 14.09.2014 / 22:52
1
answer

How to write the intermediate result of a for loop in array, at each iteration?

below is the attempt to code to calculate the following situation: I have two vectors: "q_qp" and "pe", I need each element of the "pe" vector to multiply all elements of "q_qp", for example: the value of 9.528007810207796E-5 of "pe" multipl...
asked by 04.11.2014 / 23:42
1
answer

I can not calculate the auto values and auto vectors of an array

How do I calculate the auto vectors and auto values of an array in MATLAB?     
asked by 28.10.2014 / 21:50
1
answer

Save file in columns

I need to save the data from a .txt file to open in excel. I can save the data, so that each loop is saved one below the other, but I can not save it in columns. The first two columns are the same, what is different are the last two co...
asked by 10.12.2018 / 14:42