답변 있음
How to insert an image into an image in matlab ?
image1 = rand(100, 200, 3); % Noisy image2 = ones(20, 30, 3); % White s1 = size(image1); s2 = size(image2); image3 = i...

대략 4년 전 | 1

답변 있음
Is there a way to convert binary with Don't care to corresponding decimal values in MATLAB?
You can ectract the wanted bits by bitget such that the ignored bits simply vanish.

대략 4년 전 | 0

답변 있음
What's the link between the size of XData and the original graphic?
The values of the line have a range until 22028.5, which is the "2x10^4". The number of values can be 1025. This means, that t...

대략 4년 전 | 0

| 수락됨

답변 있음
How to generate a matrix with entries of -1 and +1 of size N x M where all the columns are unique ?
N = 3; M = 8; R = 1 - 2 * rem(floor(pow2(1-N:0).' .* (0:M-1)), 2)

대략 4년 전 | 0

답변 있음
Is it possible to download MATLAB R2015b 32-bit?
Yes. If you have a license for a current version, you can download and install an old version also.

대략 4년 전 | 0

답변 있음
I have issue to resolve the equation using the For loop as MATLAB isn't providing this opportunity.
L = [0 100 200 200 200 30 300]; P = [0 1500 1700 1600 2000 1800 3000]; n = 5; twt = zeros(1, 5); for k = 1:5 twt(...

대략 4년 전 | 0

| 수락됨

답변 있음
vecnorm seems slower than it should be
I can confirm your observation. A = rand(1e4, 1000) - 0.5; tic for k = 1:50 x1 = mean(abs(A),2); end toc; % Overhead ...

대략 4년 전 | 1

| 수락됨

답변 있음
Alternative method to dec2bin function
Some simplifications: % Replace: flag = true; while flag == true % by while true If you have checked for: if bin(i) == ...

대략 4년 전 | 0

| 수락됨

답변 있음
For loops in strings
energy = zeros(1, 50); for k = 1:50 [data, fs] = audioread(sprintf('Sound(%d).wav', k)); energy(k) = sum(data.^2); ...

대략 4년 전 | 0

답변 있음
I keep receiving an error saying "execution of script drawpolygon as a function is not supported", even though it has previously worked.
The message means, that drawpolygon is a script. Then it does not have input nd output arguments: h = drawpolygon; % ^^^ om...

대략 4년 전 | 0

답변 있음
How can I split measured data in separate vectors, depending on sign value?
Start with a simple loop approach: v = [1 2 3 4 5 4 3 2 1 2 3 4 5 4 3 2 1]; dv = [false, diff(v) > 0, false]; ini = strfi...

대략 4년 전 | 0

답변 있음
csv file to matlab
Do you mean "import"? What about csvread or the modern readtable?

대략 4년 전 | 0

| 수락됨

답변 있음
Group consecutive and non-consecutive values in a vector
nV1 = 8; V2 = [1,2,4,6,7]; grp = cumsum([true, diff(V2)~=1]); C = splitapply(@(x) {x}, V2, grp); if V2(end) == nV1 C...

대략 4년 전 | 3

| 수락됨

답변 있음
how to get/obtain a specific column of a cell array
While this is trivial using the original numerical matrix, it is a mess using cells. This shows, that for your problem the decis...

대략 4년 전 | 0

| 수락됨

답변 있음
how to add graph to output text file???
Text files cannot contain diagrams. So either export the diagrams and import them together with the text to e.g. Word. Or create...

대략 4년 전 | 0

| 수락됨

답변 있음
How I download Matlab compiler toolbox free trial
MathWorks does not offer free trials of the compiler toolbox, as far as I know. You can get an official answer by asking the sal...

대략 4년 전 | 0

답변 있음
Interpolate strings from an x y interval to a corresponding x y interval.
The solution is not to do this with strings directly, but with indices: idx = interp1(table1{:, 1}, 1:height(table1), table2{:,...

대략 4년 전 | 0

| 수락됨

답변 있음
Need to plot points
scatter() is a "high-level" function for drawing. Such functions clear the contents of the axes automatically. To collect the ou...

대략 4년 전 | 0

| 수락됨

답변 있음
i have a list of data and i have to select first 5th column of each row ..then simultaneously 6th column and 7th column
With some guessing: T = table(categorical({'karan';'varun';'ravina'}), ... [25;45;12],... {'Surgery';'orthopaedic';'o...

대략 4년 전 | 0

답변 있음
Save data in cell using get function
I'm not sure, if I understand, what you are asking for. This part of the code looks strange: app.tables = cell(1, length(loadf...

대략 4년 전 | 0

답변 있음
STL file from catia apparently empty?
As I thought, the file does not contain any data. The contents is really: solid CATIA STL endsolid CATIA STL Of course, this ...

대략 4년 전 | 0

| 수락됨

답변 있음
Why do I get an infinity number in matrix X2?
X3 is growing massively until it reachs Inf. Simply insert some output, e.g. by removing the semicolon from "X2=X3;" to observe ...

대략 4년 전 | 0

답변 있음
How can I manipulate with fields in structure.
A loop over the field names can achieve this: s = struct('field1',zeros(44,1),'field2',ones(44,1),'field3',randn(44,1)); % Tha...

대략 4년 전 | 0

답변 있음
Cell2mat not working for high cell count
This means, that the arrays stored in the cell do not have matching sizes. Check this: sizeZ = [cellfun('size', z(:), 1), cellf...

대략 4년 전 | 0

답변 있음
Finding erf using Maclaurin series breaks down around x = 5
Your code is almost correct and working, except for: factorial(n). When n is a double, this tends to overflow soon. So calculate...

대략 4년 전 | 0

| 수락됨

답변 있음
how to save values in a matrix from a loop
A completely different approach: x = [2 2 2 3 3 5; 6 6 5 5 5 7]; nRow = size(x, 2); y = cell(1, nRow); % Pre-allocate:...

대략 4년 전 | 1

답변 있음
Why am I getting an out of index error?
What is x1? The error message means, that it has 2 elements only, but you request x1(3). Your function handle takes the input x...

대략 4년 전 | 0

답변 있음
high pass filter of IIR
What is n? %X = cos(20*pi*5*n*1/100) - sin(pi*2*n*1/100); %Y2 = 0.765*X - 1.53*(X-1) + 0.765*(X-2) + 1.475*(Y2 - 1) - 0.587*(Y...

대략 4년 전 | 0

답변 있음
identify consecutive occurrence of 1 in a binary array
A = [0,0,0,0,1,1,0,0, ... % Using a row vector instead 1,0,1,1,1,1,0,0, ... 0,1,1,0,1,0,0,1]; % Find longest r...

대략 4년 전 | 0

답변 있음
Calculate angle between vectors
See: https://www.mathworks.com/matlabcentral/answers/16243-angle-between-two-vectors-in-3d The actual numerically stable formu...

대략 4년 전 | 0

더 보기