Answered
Matlab does not recognise hyphen
if I stop in the debugger and execute the command it does work Then there must be another problem. The debugger can influence t...

8 years ago | 0

Answered
How do I replace a vector with zeros, and replace them with the number based on the phrase I have? Look at code to make more sense.
Either concatenate the vectors: data = load(handel); phrase = [2,3,0,3,0,4,0,3,1,3,0,3,0,4,1,4,0,3,0,4,0,3,1,4,0,3,0,4,2,3,0...

8 years ago | 0

Answered
Plotting the same variable that changes 3 times on the one graph, for seven graphs at the same time.
With some guessing: As far as I understand you want to draw into the same figures in each iteration. Then create the figures be...

8 years ago | 0

| accepted

Answered
Making UK flag with MATLAB
Repetition of my comment: img = zeros(100, 300, 3); % Now 300 pixels wide y = round(linspace(1, 100, 200)); % A diagonal, ...

8 years ago | 0

| accepted

Answered
Detect if variable is a GUI container
Perhaps you mean: ishghandle(Variable) or isgraphics(Variable, 'panel') % To detect a panel object % [EDITED] This means: ...

8 years ago | 0

Answered
What is the problem in this code plz help
For your second question: "write the function designfilt instead of bandstop": B = designfilt('bandstopfir', 'SampleRate', 8000...

8 years ago | 1

| accepted

Answered
How to plot data sequences from multiple files in a loop?
What about: plot3(mydata{k}(:, 2), k, mag); Omit the shg and axis tight commands inside the loop, because here they waste time...

8 years ago | 0

Answered
Create new field within struct based on other fields within same struct
With some bold guessing: name = {METAKETA_behave.Field}; % Replace 'Field' by the name of your field name(strncmp(name, 'vid...

8 years ago | 1

Answered
How to write the Text in Text Box using For Loop
Of course the shown code cannot work. By the way, prefer to pos the error message instead of the general statement "didn't work"...

8 years ago | 0

Answered
How to save multiple matrices into multiple text files?
It is a very bad idea to create variables with indices hidden in the name, see TUTORIAL: How to avoid Eval . If the variables a...

8 years ago | 0

| accepted

Answered
How do i convert V=pi*h^2*[3R-h]/3 equation into a function. I have V and R and need to find h
R = 13; V = 9; fcn = @(h) pi * h^2 * (R - h / 3) - V; format long g fzero(fcn, -1) fzero(fcn, 1) fzero(fcn, 40) t = -1...

8 years ago | 0

Answered
How to use double fonts in MATLAB?
No, this is not possible. Matlab requires one font in the command window. Even recognizing "having english words" is not trivial...

8 years ago | 0

Answered
how to interpolate column?
What about: A = [1,1.2,1.4,1.6,1.8; ... 1.3,1.6,1.7,2,2.2; ... 1.8,2,2.5,2.6,2.7]; n = 7; B = interp1(1:size(A, 2...

8 years ago | 1

| accepted

Answered
How to make this be a loop?
Start with simplifying your code: file_path = 'Images\20\'; img_path_list = dir(fullfile(file_path,'*.jpg')); % Safer tha...

8 years ago | 0

Answered
Matlab 2018b crash at startup in window 10
Matlab and OneDrive? I used these expressions in an internet search engine and found: https://www.mathworks.com/matlabcentral/an...

8 years ago | 0

Answered
Save figure with minimal white space and use FaceAlpha
Enabling the alpha blending sets the Renderer to OpenGL. Then a bitmap image is exported, because OpenGL does not create vector ...

8 years ago | 0

Answered
ode45 keeps saying that my function must return a column vector
This is a job for the debugger. Type this in te command window: dbstop if error Run the code again until Matlab stops at the e...

8 years ago | 2

Answered
How do I easy change email address for a user, same user but different email-address, due to re-organisation
What about https://www.mathworks.com/mwaccount/profiles/edit ? You can edit your mail address associated with your license here....

8 years ago | 0

Answered
save n-Numbers of last interation from a loop
n = 6; fehlerVec = nan(1, n); while app.stopRegler == false b = getBrightness(app,app.sensorPos(1),app.sensorPos(2...

8 years ago | 1

| accepted

Answered
Trying to make a function for Caesar Encryption -- need help.
I assume, that word is a string or char vector. Then numWord = uint8(word); converts it to a vector of type uint8. Now for i ...

8 years ago | 0

| accepted

Answered
Sir i tried to plot a spectrogram for an audio . it showing error.
[audio, fs] = audioread('asianelephantspeaker.wav'); audioMono = (audio(:, 1) + audio(:, 2)) / 2; spectrogram(audioMono, 256, ...

8 years ago | 1

Answered
How can I change all the pixels in an image to gray?
image = rand(200, 200, 3); % a random RGB image image(:) = 0.6; % The R, G and B level of all pixels is 0.6 now ...

8 years ago | 0

| accepted

Answered
"Variable index exceeds table dimensions" Error
If the failing line is: data_test=data(1:30000,4); use the debugger to find the cause. Type this in the command window: dbsto...

8 years ago | 1

| accepted

Answered
How can I access files from a matlab directory using a user input to select the file to plot the data? Using a For Loop
The messages are clear: "Warning: Escaped character '\w' is not valid. See 'doc sprintf' for supported special characters." and...

8 years ago | 1

Answered
Alternative for interp1 for fast computation
You can try this C-Mex function for a linear interpolation: https://www.mathworks.com/matlabcentral/fileexchange/25463-scaletime...

8 years ago | 2

| accepted

Answered
Want to create colors depending on the number of columns i got in my X
What about: CMap = parula(rows)

8 years ago | 0

| accepted

Answered
MATLAB Command Window Only
Maybe this helps: https://www.mathworks.com/matlabcentral/fileexchange/32005-cmdwintool CmdWinTool('lean') Maybe this helps al...

8 years ago | 0

Answered
how to form a indexed matrix?
The quetsion is not really clear. With some bold guessing: A = [1 2 3; 3 2 1; 2 3 1]; B = 2; C = [10 20 50; 60 80 90 ; 20 ...

8 years ago | 0

| accepted

Answered
how to efficiently encode two values as a unique entitiy
A = 3; B = 3; Q = [1, 1, 1, 2, 2, 3, 3, 3; ... % A 1, 2, 3, 2, 3, 1, 2, 3; ... % B 1, 2, 3, 4, 5, 6, 7, 8].'; ...

8 years ago | 0

| accepted

Answered
How to correctly change a variable from a single number to an array.
e = [0.03 0.035]; k = [3 3]; a = [0.05 0.05]; n = 500000; u = zeros(n, 2); v = zeros(n, 2); t = zeros(n, 1); % Initial c...

8 years ago | 1

| accepted

Load more