답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 0

답변 있음
take cells outside arrays to form new matrix
mean(cellfun(@(x) x(1,4), myarrays))

7년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 1

| 수락됨

문제를 풀었습니다


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년 초과 전

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 1

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 0

문제를 풀었습니다


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년 초과 전

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
How to clear the checkbox using commands?
s = settings; s.matlab.desktop.workspace.ArraySizeLimitEnabled.PersonalValue = false

7년 초과 전 | 1

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 1

| 수락됨

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

7년 초과 전 | 1

| 수락됨

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 1

| 수락됨

답변 있음
add white gaussian noise
signal_noise=awgn(signal,1,'measured') SNR = 1 means 0 dB.

7년 초과 전 | 0

답변 있음
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년 초과 전 | 0

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

7년 초과 전 | 0

답변 있음
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년 초과 전 | 0

| 수락됨

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

7년 초과 전 | 2

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 0

| 수락됨

더 보기