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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 1

| akzeptiert

Gelöst


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

mehr als 7 Jahre vor

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

Gelöst


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.

mehr als 7 Jahre vor

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 2

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

mehr als 7 Jahre vor | 0

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

Mehr laden