Risposto
concatenating matrices
Hi Maithili, just a warning: the final matrix will need 24000*24000*8/(1024^3)GB, so approx 4.3 GB of memory. Should work but...

oltre 14 anni fa | 0

Risposto
using the values in popup menu function in pushbutton_callback
Hi, you have two options: either, the popupmenu1_Callback stores the values for I, V, p using e.g. guidata and the pushbutton...

oltre 14 anni fa | 0

| accettato

Risposto
numerical integration
Hi, I would suggest to compute the position of the singularity (e.g. using fzero) and try quadgk on the left integral and the...

oltre 14 anni fa | 0

Risposto
selecting multiple strinfs of variables
Hi Stef, I guess you are looking for ismember: ismember(mdata(:,2), {'b1' 'b2'}) Titus

oltre 14 anni fa | 0

| accettato

Risposto
ERROR IN MATLAB CODER...
Hi, it looks as if the demo fails (and echodemo does not produce a "nice" error message). I would suggest to run the demo jus...

oltre 14 anni fa | 2

Risposto
Fixed point (matematice)
Hi, and in addition to Richards observation: it's always not a bad idea to do something like iter = 0; maxIter = 50; ...

oltre 14 anni fa | 0

Risposto
Number and alphabet
Hi, you can use isvarname for this purpose, something like str = get(handles.edit1, 'string'); if isvarname(str)) ...

oltre 14 anni fa | 1

Risposto
How to get a directory size
Hi Karine, you are right, MATLAB does not compute the size of a folder: the bytes for directories are always zero. You wil...

oltre 14 anni fa | 0

Risposto
Code Error - Matrix dimensions must agree
Hi, and what about A1, E1, R? Are they 1x1 as well or is one of them a vecotr/matrix? Titus

oltre 14 anni fa | 0

| accettato

Risposto
Matlab standalone executable deployment- error using phantom function
Hi Sabya, just a guess: you know that input parameters to standalone applications are always passed as strings? This can be h...

oltre 14 anni fa | 2

Risposto
can't find Matlab coder generated mexFunction
Hi, perhaps the third computer is a 32bit MATLAB/Windows? Just enter mexext in the 3rd computer. If it returns mexw32...

oltre 14 anni fa | 0

Risposto
errror using uigetdir
Hi, if you take a look at TestFiles(1).name you will see the ".", which is the current folder. Several possibilities: if you ...

oltre 14 anni fa | 0

| accettato

Risposto
message length
Hi Vino, if you do edit msgbox you will see at line 274 (at least in R2012a I'm looking at) a call to textwrap with a...

oltre 14 anni fa | 1

| accettato

Risposto
load
Hi Tor, if you want to load to a variable you need to use the functional form, i.e., TRD = load('Trondheim_MT_Daily.txt...

oltre 14 anni fa | 0

Risposto
load
Hi Tor, I don't 100% understand the question: .txt is just as .dat or similar an "indicator" that it's a text file (ascii, no...

oltre 14 anni fa | 0

| accettato

Risposto
How to define parameters of masked subsystem as tunable parameters (for code generation using Embedded coder)
Hi Genin, they should appear: if you use workspace variables for your subsystem mask parameters, those variables should appea...

oltre 14 anni fa | 0

Risposto
removing case sensitivity in matlab
Hi Som, No, there is no way to change this. Older versions used to be more tolerant to casing but today casing is required. O...

oltre 14 anni fa | 1

Risposto
first forward and backward central diference
Hi, o.k., let's start with the h: 0:t:10^-5 will be the zero. Start with e.g. h = 0.01; Take a look at the ch...

oltre 14 anni fa | 0

Risposto
how to inherit the data type of the inputs in a C Mex Sfunction
Hi Grapevine, yes, that's right. You will need to register the mdlSetOutputPortDataType function, see matlabroot\simulink\src...

oltre 14 anni fa | 1

| accettato

Risolto


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

oltre 14 anni fa

Risolto


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

oltre 14 anni fa

Risolto


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

oltre 14 anni fa

Risolto


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

oltre 14 anni fa

Risposto
Using embedded matlab funciton to find high accuracy derivative
Hi, this is a misunderstanding of how Simulink works: Simulink computes every timestep on it's own. So when your embedded MAT...

oltre 14 anni fa | 1

| accettato

Risposto
Dynamically add edit boxes using uicontrol and how to get the reference
Hi, * add the handle from the uicontrol to the handles structure: handles.edit = zeros(1, 10); handles.edit(i) = uico...

oltre 14 anni fa | 1

| accettato

Risposto
Parfor on GPU
Hi Sampath, probably not. I guess it would make not much sense anyway, because the two functions would share the same computa...

oltre 14 anni fa | 0

Risposto
array to matrix
Hi Som, the function you are looking for is named repmat Titus

oltre 14 anni fa | 0

Risposto
Help using MatLab coder.
Hi, when compiling to an executable you need to provide a main function (a file containing void main() { /* call the...

oltre 14 anni fa | 0

Risposto
Simulink - simulation time slows WAY down and information omitted from scope
Hi, you are most likely changing the problem to be stiff as Kaustubha wrote, therefore try e.g. ode15s which should make larg...

oltre 14 anni fa | 0

| accettato

Risposto
Programatically test-run a model before RTW build
Hi, without solving the problem (I guess) I would suggest to modify the code to feval(ThisModel, [], [], [], 'compile');...

oltre 14 anni fa | 0

Carica altro