답변 있음
How do I break axis to show data that have large variation?
Search in the FileExchange for "break axis": https://www.mathworks.com/matlabcentral/fileexchange?q=axis+break

거의 4년 전 | 1

답변 있음
At least one END missing, yet I have written end
At least one bug is here: sum8 = sum8 + (exp(-(p(2) / p(3)) * (exp(p(3) * x(i)) - 1))) * ... (p(3) * x(i) * exp(p(3 * x(i)...

거의 4년 전 | 0

| 수락됨

답변 있음
I had to reset my PC, matlab still running. After reboot Appdesigner can't open file properly. It seems to be running but blank window only appears..
Maybe the Matlab installation is damager (re-install) or just the preferences (re-create them by renaming the preferences folder...

거의 4년 전 | 1

| 수락됨

답변 있음
the function can only take one input argument
Either modify the call to create the vector dynamically: analyzeT([28,44,50,33]) % ^ ^ Or create a new input...

거의 4년 전 | 1

| 수락됨

답변 있음
How to auto run the slider using a button?
The shown code creates a figure programmatically. Using the AppDesigner would be useful to insert an element in a uifigure , whi...

거의 4년 전 | 0

답변 있음
Using sendmail with gmail oauth2 credentials
I assume this helps: https://www.mathworks.com/matlabcentral/answers/1672544-using-gmail-after-may-30-2022

거의 4년 전 | 0

| 수락됨

답변 있음
How to introduce a constraint and stop condition in ode45 ?
Both is done by an event function. There you can check the values of the current trajectory and stop the integration. If the val...

거의 4년 전 | 1

답변 있음
How is the filter function algorithm implemented in MATLAB?
The code is shiown in the last paragraph. So you have posted a valid answer to your question already. You find a corresponding ...

거의 4년 전 | 0

| 수락됨

답변 있음
imrotate3 gives me just zeros with 'linear'
I cannot confirm this, but it is even stranger: BW = rand(5, 5, 5) > 0.5; BW2 = imrotate3(BW, 45, [0, 1, 0], 'linear', 'crop'...

거의 4년 전 | 0

| 수락됨

답변 있음
Enabling push button after an error occurred?
Matlab stops, when an error occurs. If it does not run anymore, it cannot modify buttons. The solution is to catch errors: try...

거의 4년 전 | 0

| 수락됨

답변 있음
Can anyone knowledge me what is the meaning of this syntax?
Start with simplifying the code: S = stepinfo(ScopeData(:, 2), ScopeData(:, 1)); STime = S.SettlingTime; brig...

거의 4년 전 | 0

답변 있음
Separate matrix each 3 columns and save outputs each iteration
With some bold guessing, what "different names" means (better mention, what you want): data = reshape(1:30*90, 30, 90); % So...

거의 4년 전 | 0

| 수락됨

답변 있음
How to count the number of peaks from a graph with a certain threshold?
findpeaks will solve the problem: [PKS,LOCS] = findpeaks(Y, 'MinPeakHeight', yourThreshold) Maybe you use Y and X depending on...

거의 4년 전 | 0

답변 있음
resampling of large dataset
SIGNALS(:,u)=signal; This let the array SIGNALS grow in each iteration. Therefore a new larger array must be created and the ol...

거의 4년 전 | 0

답변 있음
Import data from text file with lines of unequal length as fast as possible.
Sorry, I'm not proud of this code, but it 23% faster on my machine for a test file with 6000 lines: filename = 'sample.txt' ; ...

거의 4년 전 | 1

답변 있음
How to create a matrix through a nested loop?
x = 1:0.5:10.5; y = 1:0.5:10.5; speaker1pos = [4.7, 2.3]; speaker2pos = [8.6, 4.8]; L_w1 = rand; L_w2 = rand; for j = ...

거의 4년 전 | 0

답변 있음
MATLAB unresponsive on startup
Try to recreate the preferences folder: C:\Users\<USERNAME>\AppData\Roaming\MathWorks\MATLAB\<VERSION> Rename this folder and ...

거의 4년 전 | 0

답변 있음
Changing tick labels on x axis
This is pure voodoo: axisticks = ([-0.1:0.2:1.5]) cfg.xmin = ([min(axisticks)]) cfg.xmax = ([max(axisticks)]) cfg.xticks = (...

거의 4년 전 | 1

| 수락됨

답변 있음
Align/intersect two vectors of different size and non-exact matches then trim the edges
Problem 2: A = [21 26 30.8 34.7 36 39.9]; limit = 3.9; match = true(size(A)); a = A(1); for k = 2:numel(A) if ...

거의 4년 전 | 0

| 수락됨

답변 있음
Trying to use if to create a table
Remember, that the if condition must be a scalar. You provide a comparison of two vectors: if data.price(1:end-1)<data.price(2:...

거의 4년 전 | 0

답변 있음
cell2mat command not giving expected result
There are no empty array in the provided data, but the sizes of the vectors differ: all are row vectors, but they have between 1...

거의 4년 전 | 0

답변 있음
How can i use two variables while using eval command
If you really need different arrays, because the contents have different sizes, use a cell array: Utt = cell(10, 5); for i = 1...

거의 4년 전 | 0

답변 있음
Updating many field values at once
F = fieldnames(data); for k = 1:numel(F) data.(F{k}) = data.(F{k})(updated_values); end

거의 4년 전 | 0

| 수락됨

답변 있음
Can you please confirm whether 2022 version update_2 has the code fixes of 2022 version update_1
Yes, the updates are cumulative. The higher versions contains the changes of the lower versions also.

거의 4년 전 | 1

| 수락됨

답변 있음
Wildcard file name matching with multiple dots on Windows
List = dir('*.txt.*') List = List(contains({List.name}, '.txt.'))

거의 4년 전 | 0

답변 있음
ode23, too slow
Reading the files in each iteration is a very time-consuming method. Do this once only and store the values in a persistent vari...

거의 4년 전 | 1

| 수락됨

답변 있음
Getting error in this code.
A simpler version - note that sqrt(x) is much cheaper than x^0.5: betasqr = 0.2; gamma = 0.3; psi = 0.001; mu = 1...

거의 4년 전 | 1

| 수락됨

답변 있음
commands like hold on, hold off, grid on not working
Posting code is safer than paraphrasing what the code is expected to do. To be sure: Does this reproduce the problem: figure; ...

거의 4년 전 | 0

답변 있음
compare every element in the first array with the second array
X = [1,3,5,9]; Y = [1,2,4,9]; Z = zeros(size(X)); for k = 1:numel(X) Z(k) = Y(find(Y >= X(k), 1)); end Z This doe...

거의 4년 전 | 1

| 수락됨

답변 있음
Extract values from one field of structure, write into array
Why do you call str2double? What is the contents of the 'name' fields? What is the wanted output? Mentioning the type of inputs ...

거의 4년 전 | 2

더 보기