Answered
I simply want the colors of bars in a bar graph to depend on the y value.
NEW ANSWER Here's a method to do what you want. Modify code to fit your color map scheme. ClrMap = colormap('jet'); X = 1:10;...

7 years ago | 0

| accepted

Answered
How to save different data into same file?
Seems like this was already answered here: <https://www.mathworks.com/matlabcentral/answers/16000-multiple-figures-to-pdf-s> ...

7 years ago | 0

Answered
Multithreading with N thread
NEW ANSWER Matlab has it own scheduler called Matlab job scheduler (MJS). This will handle all your job scheduling. If you wa...

7 years ago | 0

Answered
take cells outside arrays to form new matrix
mean(cellfun(@(x) x(1,4), myarrays))

7 years ago | 0

| accepted

Answered
Need to apply some tricky string interpolation for a for loop
Read the following about why labeling variables "T5_11" and "T5_10" is extremely difficult to work with. <https://www.mathwork...

7 years ago | 0

Answered
How to modify and run this Script???
FileName = 'inputfile.txt'; S = fastaread(FileName); for f = 1:length(S) FileNameExp = regexp(S(f).Header, 'tr\|(\w+...

7 years ago | 1

| accepted

Solved


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

7 years ago

Answered
How to I enable java through matlab command line?
NEW ANSWER Start matlab without "-nojvm". "nojvm" means no java virtual machine. OLD ANSWER Import the java librari...

7 years ago | 0

| accepted

Answered
matlab OOP how to transfer value from properties to methods ?
classdef OOP_101 properties a=5 b=10 end methods function c=adding(obj) ...

7 years ago | 1

Answered
How much is the Matlab function "sort()" calculating-efficient?
<https://www.mathworks.com/matlabcentral/answers/96656-what-type-of-sort-does-the-sort-function-in-matlab-perform> They said ...

7 years ago | 0

| accepted

Answered
How to understand the Memory [Maximum posible Array] result ?
You could use the |whos| command to determine the size of a variable/array. More info on data types in Matlab: <https://www...

7 years ago | 0

| accepted

Answered
How can I make this program run, it was copied from a text book, but it still has errors= line 3(bdown =firwd(159,1,2,...).. I changed line 3's firwd to fir, and it was till wrong Please help.
Either you do not have the function |firwd| on your matlab path or that function does not exist. Look in your book for |firwd| f...

7 years ago | 0

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

7 years ago

Answered
speed-up the given code
This might be a variant of the xy-problem that @Stephen points out. <http://xyproblem.info/> Solve X: you want to add the va...

7 years ago | 0

| accepted

Answered
How to clear the checkbox using commands?
s = settings; s.matlab.desktop.workspace.ArraySizeLimitEnabled.PersonalValue = false

7 years ago | 1

Answered
How can I open a generic (not defined) EXCEL file ?
Is this what you want to do? Have user select an excel file, and then open the excel file with MS Office, or whatever applicatio...

7 years ago | 0

| accepted

Answered
How can I average a 4-D array every nth element without using too much loops
data = rand(476, 238, 1, 2699); N = floor(2699/5); data_zeros = zeros(476, 238, 1, N); %Preallocate this for speed k ...

7 years ago | 1

| accepted

Answered
using switch, case and comparing strings
The |switch| statement is used incorrectly. Remove the "str ==" after |case|. function Menu(varargin) %varargin = {'ho...

7 years ago | 1

| accepted

Answered
Please Help! GUI problem for 'function varargout = NNEW(varargin) | Error: Function definitions are not permitted in this context.'
How exactly are you "running" the code? The error you have now is caused when you invoke the "function" command directly. ...

7 years ago | 0

Answered
Can I call a function defined within another function .m file?
The next closest thing is to define an object class with static methods (give.m) %give.m classdef give methods(Stat...

7 years ago | 0

Answered
scatterplot points cut in half
I used to have issues like this too. Try |print| to save the image instead, and use |painters| renderer. print(gcf, 'figu...

7 years ago | 0

| accepted

Answered
why am i getting this error-Characters adjacent to a ** wildcard must be file separators.
The error message seems pretty clear. Characters adjacent to a wildcard must be file separators. files=dir('D:\trmm2\todel\...

7 years ago | 0

Answered
Too much calculus time on 'lsqcurvefit' + 'fsolve'
Your |Iteor| is causing a lot of issues since it's calling |rteor| 4 times, meaning it's doing repeated |fsolve| and |integral| ...

7 years ago | 1

| accepted

Answered
add white gaussian noise
signal_noise=awgn(signal,1,'measured') SNR = 1 means 0 dB.

7 years ago | 0

Answered
Can anyone please help with a question in relation with RGB image ?
I can try to interpret that in the context of matlab: 1. Open the image using imread. Should get a MxNx3 matrix. ...

7 years ago | 0

Answered
Cell array and strings
Take a read here: <https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically...

7 years ago | 0

Answered
Bind plot with some figure
In this case, you should specify which axes to plot on. See the example below: %Initialize the figures Gx = gobjects(1, ...

7 years ago | 0

| accepted

Answered
converting a cell array of doubles in a matrix
A = {rand(1,10000), rand(1,10000)}; B = vertcat(A{:});

7 years ago | 2

Answered
Save with identical file- and variable name
Assuming your |Data| is a structure containing your variables, here's one way to make file names = variable names: Data = s...

7 years ago | 0

| accepted

Answered
standalone - Cannot CD to INIT (Name is nonexistent or not a directory). Error in => Main.m at line 39
Looks like your standalone is trying to add a path that doesn't exist. Your "~ismcc" is always true in the standalone version. T...

7 years ago | 0

| accepted

Load more