已回答
How to apply uitable to compute and display values those two purposes at the same time?
Sorry didn't quite get your problem. are you trying to update the uitable as program is runing? If it involves a loop in your c...

4 years 前 | 0

已回答
How do I save values in my loop as a column vector?
You can use h1(:) instead to make hi1 explicitely a column vector. This has a potential risk too if you h1 is actually a matrix ...

4 years 前 | 0

已回答
hello, I am receiving an error . It says Undefined function or variable 'grayImage'. please let me know how i can define the function . here is my code
you have to have image data first which the grayImage is supposed to be. you can use imread to read an image in your disk for ex...

4 years 前 | 0

| 已接受

已回答
Assigning colours to a group of columns when using plot
Dot indexing doesn't support this. You can use set(p(1:10), 'Color', 'red'); instead. A further note is that when you use dot i...

4 years 前 | 1

| 已接受

已回答
How can I label images with numbers for the purposes of machine learning?
One solution is to save images with the same number of mms in one folder and name that folder with the number of mms. You can lo...

4 years 前 | 0

已回答
Fullfile function gives me a false reading with the slash symbol
fileToRead = fullfile('C:\Users\thomas\Files\', [CCC '.csv']);

4 years 前 | 1

| 已接受

已回答
i need a example code for Single-level discrete 2-D wavelet transform
Say x is your signal and you’d like to do an n-level decomposition, using [C, L] = wavedec(x, n, ‘db2’); db2 is the wavele...

4 years 前 | 0

已回答
How can I properly index a table using isnan? (R2020a)
Either use dot notion or {} pair to access a table element. Try R.Var1(1) for example.

4 years 前 | 0

| 已接受

已回答
How to show word from excel?
subT = T(T.NO == 1, [2 5 6]); Will be the first record with the 2nd 5th and 6th variable as a new table.

4 years 前 | 0

| 已接受

已回答
Trying to put values from one array into another
A(:) ./ size(A, 1) * ones(1, size(A, 1)); If I understand what you said correctly, the above script will give you what you ne...

4 years 前 | 0

已回答
Copyfile/ movefile when filenames are not directly available
flagged is a cell so you couldn’t access it using parentheses and dot motion. flagged{i} is your ith element in flagged. For ...

4 years 前 | 1

| 已接受

已回答
How to add the value of the 3 highest elements automatically from a vector?
[~, ind] = sort(y); y(ind(end-2, end)) = y(ind(ind-2, end)) + ax; Should meet your need.

4 years 前 | 1

已回答
Substract Each Element in A Matrix MAT1 from all the elements of another Matrix MAT2
What MATLAB version are you using? Newer versions actually support operations between e.g. a vector and a 2-d matrix if they ha...

4 years 前 | 0

已回答
Extracting values that are greater than the threshold
outAlert = Alert(Alert(:, 3) > 21, :); should be what you want to have

4 years 前 | 0

| 已接受

已回答
Monthly data to seasonal using sum (how to use splitapply)
Try below tbl = CELL{1}; tbl.month = month(tbl.dates); tbl.season = floor(tbl.month ./ 3); tbl.season(tbl.season == 4) = 0...

4 years 前 | 1

| 已接受

已回答
FFT of a time-valued signal, then IFFT doesn't return the same signal
fs=200000; time=0:1/fs:2-1/fs; data=load(['S09H4R2.dat']); Ffrapp=2*fft(data(:,1))./length(data(:,1)); Fsarf=2*fft(data(:,2)...

4 years 前 | 0

| 已接受

已回答
How can i create an array with datetime values as one column and integers as one column?
you can use table instead of an array. table can have columns with different types. e.g., a = yourDatetime; b = yourInteger...

4 years 前 | 0

| 已接受

已回答
Plot implicit function with the summation inside
z1 = @(w_c, mu) 1 + w_c / pi ... * sum((-1).^n / n .* 2 * pi^2 * n .* t ... % are you sure that the first / and the second ...

4 years 前 | 0

已回答
How do I perform a channel with probability?
% simulate a sequence r r = [ones(100, 1); zeros(100, 1)]; ind = randperm(length(r)); r = r(ind); % randsrc generate a...

4 years 前 | 0

| 已接受

已回答
how to center a string
function out = padline(c, n) if n > length(c) n2add = floor((n - c) / 2); out = [repmat(‘ ‘, 1, n2add) c repmat(‘ ‘, 1, n - leng...

4 years 前 | 0

| 已接受

已回答
How do I set legend labels depending on number of plotted data?
So using your style legendStr = []; for iL = 1:numberOfObj legendStr = [legendStr; string(inputdlg([‘what is the legend # ’...

4 years 前 | 0

| 已接受

已回答
Error: Line 91 Column: 44 When calling a function or indexing a variable , use parentheses. Otherwise, check for mismatched delimiters
Matlab uses comma not ; Parameter names are without spaces. And you have an extra ) that doesn’t have a ( to match it.

4 years 前 | 0

已回答
How to add values into a vector with for loop in a function
It looks that in your function test1, the second parameter SOC_a is supposed to be a vector. While in your main function, when ...

4 years 前 | 1

已回答
Error using legend MATLAB R2019b
what is your signalLabels? Is that a cell or a string matrix?

4 years 前 | 0

| 已接受

已回答
Legend in plot using forloop
Not quite sure what you meant by "the legend stays wrong", but please try this if my guess is correct. figure(1) ee = linspace...

4 years 前 | 0

| 已接受

已回答
Creating a matlab function that reads the raw input data, given in the text file.
Is the text file contains data with fixed columns and rows? If yes, you can try using readtable. If there is a headline in the t...

4 years 前 | 0

已回答
How to store a string of n elements as one element of a matrix
You may want to try a cell array instead? N{i, j} = Nff;

4 years 前 | 0

已回答
strtok is only using the first character of my delimiter instead of the full character vector
why don't you use strsplit instead? >> a = strsplit('Hello World', 'HAIR') a = 1×1 cell array {'Hello World'} ...

4 years 前 | 0

已回答
Plotting a graph with multiple constraints
x >= 2 & x <= 5 this express will consider both constraints in. Is this what you need?

4 years 前 | 0

已回答
Function that squares each elemnt of a matrix
If you only want to square each element of a matrix, you use .^ For example: A = randn(100, 100); B = A.^2;

4 years 前 | 0

加载更多