Respondida
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;...

más de 7 años hace | 0

| aceptada

Respondida
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> ...

más de 7 años hace | 0

Respondida
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...

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

Respondida
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+...

más de 7 años hace | 1

| aceptada

Resuelto


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...

más de 7 años hace

Respondida
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...

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

Respondida
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 ...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

Resuelto


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.

más de 7 años hace

Respondida
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...

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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 ...

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 1

| aceptada

Respondida
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. ...

más de 7 años hace | 0

Respondida
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...

más de 7 años hace | 0

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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\...

más de 7 años hace | 0

Respondida
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| ...

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

Respondida
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. ...

más de 7 años hace | 0

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

más de 7 años hace | 0

Respondida
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, ...

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 2

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Cargar más