Answered
how can I produce zero mean pseudo random number which only takes -1 and 1 as amplitude?
If you need a vector with n (even!) elements, the values {1, -1} and the mean 0: x = [ones(n/2, 1); -ones(n/2, 1)]; x = ...

9 years ago | 2

Answered
How do i combine two different sized vectors?
It is possible. Assuming, that you data do not contain NaNs: X1 = [3;2;1;-1;2;3]; Y1 = [3.5;2.5;1.5;-1.5;2.5;3.5]; ...

9 years ago | 0

Answered
How to select first entry of multiple xlim
Perhaps you mean: for i=1:2 ax = subplot(1,2,i) axLim = get(ax, 'XLim'); x1 = axLim(1); end Or do...

9 years ago | 0

Answered
How can I change get output of jacobian in decimals instead of variables?
Would this work: double(Atest) ?

9 years ago | 0

Answered
how is it possible in matlab to execute more than while loops(for infinite time) in parllel
Maybe. It would take infinite time to check this. Note that Matlab cannot know, if a loop runs infinitely or not. So the ques...

9 years ago | 0

Answered
r2008a expired in 2017???
This is the next question concerning a license, which expired at the 11-Nov-2017. This is not a bug, but the intended behavior f...

9 years ago | 0

Answered
How to read a specific line begining with a known number from a text file?
Str = fileread(FileName); CStr = splitstr(Str, char(10)); Lines = CStr(strncmp(CStr, '4561 ', 5)); Dates = strrep(...

9 years ago | 0

| accepted

Answered
Block averaging a large matrix
A fast C-Mex would be <https://www.mathworks.com/matlabcentral/fileexchange/24812-blockmean>, but currently it works with UINT8 ...

9 years ago | 0

| accepted

Answered
I want my k value in for look to carry over to the next loop
The cleaned loop version: for k = 1:N xvec(k) = 1 + 4 / k; end Although you can parenthesis where you want, it i...

9 years ago | 2

Answered
Help finding error in Matlab code
You define xVorPos and yVorPos: xVorPos = zeros(numFrames, 1); yVorPos = zeros(numFrames, 1); Then you run a loop: ...

9 years ago | 0

Answered
Polyfit will not work on my computer.
The problem occurs in |normest1|. The failing line looks unsual for Matlab code: est = full(temp(n)); v = zeros(n,1); v(m(n...

9 years ago | 0

Answered
Problems with fft on audios
Did you read the documentation of <https://de.mathworks.com/help/matlab/ref/fft.html |fft|>. There you find an example for plott...

9 years ago | 1

Answered
what's the meaning of I2(roughmask)=0 ?
Assuming that "roughmask" is a logical array, the code line "I2(roughmask)=0" sets all values of the array I2 to 0, if the corre...

9 years ago | 0

Answered
Approximate derivative within ODE function.
If you have the first derivative, you can approximate the second derivative by the one or two sided quotient of differences: ...

9 years ago | 0

| accepted

Answered
Search for a number pattern in an array
"Without using strfind"?! Why? Is this a homework? Then RunLength from the FileExchange might not be usable also. Then look in t...

9 years ago | 0

Answered
positive numbers using while loop
ready = false; while ~ready d = input('Please input a positive number: '); ready = (d > 0); end

9 years ago | 0

| accepted

Answered
Erro fprint EXERCISE VII.7 HAFFNER
While the code is completely unreadable due to the avoided formatting (did you see the "{} Code" button?), it is not needed to u...

9 years ago | 2

| accepted

Answered
Error using set in GUI
I guess, that static text has the handle "handles.Ca1". Then: set(handles.Ca1, 'String', sprintf('%g', Ca1e)); % ...

9 years ago | 0

| accepted

Answered
Are there some issues, if I run programs in MATLAB R2017a that I have created using MATLAB R2010a?
The graphic system has changed in R2014b substantially. The new system is called "HG2". There are many different possibility tha...

9 years ago | 0

Answered
integer strings decoding ... speed optimization
[EDITED] Consider all rows of c: function m = c2m(c,types) [s1, s2] = size(c); numpos = s2 / 2; m = cell(...

9 years ago | 0

Answered
Convertion from grayscale value to RGB vector
Your |processo| array is a double array with the range [0, 1], but the frames obtained from the movie might have the type INT8 w...

9 years ago | 0

Answered
parfor iteration counter display: dynamic \n at EOL?
You use |parfor| to run the different jobs independently in parallel. Now you want, that the threads communicate with each other...

9 years ago | 0

| accepted

Answered
I AM GETTING INDEX EXCEEDS MATRIX DIMENSIONS error? PLEASE HELP?
Start with an auto-indentation to make the code readable: Ctrl-A Ctrl-I. Omit the brute clearing header "clc; close all; clear a...

9 years ago | 1

Answered
Datenum Problem in Octave???
The first line 'yearmonthdayt [hh:mm]' cannot be parsed correctly. Try this: datenum(cellstr(dt(2:end, :), 'yyyymmmddHH:MM'...

9 years ago | 0

| accepted

Question


Open UIGETFILE on 2nd monitor
How can I open a |uisetfile| or |uigetfile| dialog on a 2nd monitor? Unfortunately I assume the answer will depend on the Mat...

9 years ago | 2 answers | 0

2

answers

Answered
Taking a value from a previous for loop
Store all intermediate results in a pre-allocated vector function [y, t] = Uler(N,h,y0) t = 0; S = floor(N/h); y =...

9 years ago | 0

Answered
Subtract column vectors from eachother in every possible constelation
With some guessing: n = 7; Sample = rand(10, n); Testp = rand(10, n); gamma = Sample - reshape(Testp, 10, 1...

9 years ago | 0

Answered
Output argument "variable name" (and maybe others) not assigned during call to "function name"
There is a list of IF branches, but it is not guaranteed, that at least one of the branches is executed: % To define radi, ...

9 years ago | 0

Answered
Get details from a file
Images can contain meta information, e.g. in the IPTC or EXIF sections of JPEGs. If the author is stored there, you can find too...

9 years ago | 0

Answered
Write a function file that converts temperature in degrees Fahrenheit (^F) to degrees Centigrade (^C). Use input and fprintf commands to display a mix of text and numbers. Recall the conversion formulation, C = 5=9 *(F- 32).
Please use the chance to search in the net or in the forum before asking a new question. You would find e.g.: * <https://www....

9 years ago | 0

Load more