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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 1

| accettato

Risolto


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

oltre 7 anni fa

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

Risolto


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.

oltre 7 anni fa

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 2

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

Carica altro