Risposto
Help on creating structures??
You could enter your data into a two-column cell array and then use CELL2STRUCT: data = {'Krista', [10 5 1993]; ... ...

circa 10 anni fa | 0

| accettato

Risposto
EngWinDemo Starts a New Instance?!
I suspect the issue is in trying to have the non-admin privileged engwindemo.exe connect to the admin privileged MATLAB process....

circa 10 anni fa | 0

Risposto
How do i use eval function when the sentence has apostrophe (') in it?
If you need EVAL, I'd suggest using SPRINTF to form your expression. This lets you see the command you are writing more natural...

circa 10 anni fa | 0

Risposto
How can I create a list of .m files currently open in the editor?
The MATLAB Editor API should handle this. Try: >> openFiles = matlab.desktop.editor.getAll; >> fileNames = {openFiles.Fil...

circa 10 anni fa | 4

| accettato

Risposto
regexp to match certain words in a string
Looking at your string, I see parameter value pairs in the pattern of Param{Value}Param{Value}. If that is the case, then a reg...

circa 10 anni fa | 0

| accettato

Risposto
Interface Matlab Project with C++ Project
Here are a couple more ways to consider interfacing MATLAB with C++: * Write <http://www.mathworks.com/help/matlab/matlab_ext...

circa 10 anni fa | 1

| accettato

Risposto
How do I use regular expression to match the last character of a sentence?
Here's a regular expression that might be helpful, which matches if the last character in the string is "." or "!" or "?". >...

circa 10 anni fa | 1

| accettato

Risposto
disp() output to command line significantly delayed, not right in time relative to the further program progress?
I would first suggest trying FPRINTF in place of DISP to see if that produces different behavior. Here is an example call: ...

circa 10 anni fa | 0

| accettato

Risposto
how to find the depth from the image?
You can use IMFINFO to find the bit depth of an image. For example: >> info = imfinfo('ngc6543a.jpg'); >> info.BitDepth ...

circa 10 anni fa | 1

Risposto
Call embedded matlab function from command line
The code for the MATLAB Function block does not exist as a stand-alone file that you can call in MATLAB. However, you can progr...

circa 10 anni fa | 0

| accettato

Risposto
How to use Comma delimiter for this .txt file. I have a file which looks like this. I have to separate them column wise with comma as delimiter. Urgent. Thanks in advance.
Assuming this text is in a file named mydata.txt and you want to read it into MATLAB, you can use TEXTSCAN. In the data, I see ...

circa 10 anni fa | 0

Risposto
setter fails/ gets passed by
I believe using the code below reproduces the unexpected behavior you write about, where a set on the top-level object does not ...

circa 10 anni fa | 1

Risposto
How can I change a simulink "matlab function" using the command window?
You can get and set the code for a MATLAB Function block using the steps in <http://www.mathworks.com/matlabcentral/answers/1026...

circa 10 anni fa | 0

| accettato

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

circa 10 anni fa

Risolto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

oltre 10 anni fa

Risolto


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

oltre 10 anni fa

Risolto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

oltre 10 anni fa

Risolto


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

oltre 10 anni fa

Risolto


Add two numbers
Given a and b, return the sum a+b in c.

oltre 10 anni fa

Risolto


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

oltre 10 anni fa

Risolto


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

oltre 10 anni fa

Risolto


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

oltre 10 anni fa

Risolto


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

oltre 10 anni fa

Domanda


Which MATLAB blogs should I follow?
I would like a list of blogs related to MATLAB to use for my own reading and to recommend to others. The blogs can be introduct...

oltre 10 anni fa | 3 risposte | 3

3

risposte

Risposto
Loading images from a .MAT file
The code shown only saves the names of the image files and not the image data itself. This is because the variable 'ListOfImage...

oltre 10 anni fa | 0

| accettato

Risposto
How do I use 'ErrorHandler' in arrayfun?
Rather than use ErrorHandler here, consider writing your logic into a function that acts on a scalar struct. This function woul...

oltre 10 anni fa | 0

| accettato

Risposto
How can you create an empty table object with non-zero rows or non-zero columns?
You can use cell2table to initialize an empty table by providing a cell array of desired dimensions. For example, this initiali...

oltre 10 anni fa | 4

Risposto
Looking for an example showing short-cirkuit (&&) superior to normal (&) operation
The short-circuiting behavior of && is occasionally useful for performance optimization. If you use more intensive conditions, ...

oltre 10 anni fa | 0

Risposto
How to access .exe file through matlab .m file?
You can use the SYSTEM command to execute a .exe file and capture its program output in MATLAB. doc system

oltre 10 anni fa | 0

| accettato

Risposto
How to comment out unused arguments in function header
Consider writing your functions to take parameter/value pairs. By doing this, you could define optional parameters that don't n...

oltre 10 anni fa | 1

| accettato

Carica altro